diff options
author | px4dev <px4@purgatory.org> | 2013-09-03 21:21:41 -0700 |
---|---|---|
committer | px4dev <px4@purgatory.org> | 2013-09-11 13:42:29 -0700 |
commit | ed4b34547c1bddeb696b9e3c46bdb15407a845c9 (patch) | |
tree | 7cf819104ff8cb2cb54698b7c952c715c776be42 /src/drivers/boards/px4fmu-v2/px4fmu2_init.c | |
parent | f49e444ce3b074919ebd187983be5ff0913c5111 (diff) | |
download | px4-firmware-ed4b34547c1bddeb696b9e3c46bdb15407a845c9.tar.gz px4-firmware-ed4b34547c1bddeb696b9e3c46bdb15407a845c9.tar.bz2 px4-firmware-ed4b34547c1bddeb696b9e3c46bdb15407a845c9.zip |
Make the init code compile if we don't have the granule allocator / dma allocator required
Diffstat (limited to 'src/drivers/boards/px4fmu-v2/px4fmu2_init.c')
-rw-r--r-- | src/drivers/boards/px4fmu-v2/px4fmu2_init.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/drivers/boards/px4fmu-v2/px4fmu2_init.c b/src/drivers/boards/px4fmu-v2/px4fmu2_init.c index c5d0377bc..ae2a645f7 100644 --- a/src/drivers/boards/px4fmu-v2/px4fmu2_init.c +++ b/src/drivers/boards/px4fmu-v2/px4fmu2_init.c @@ -78,10 +78,6 @@ /* Configuration ************************************************************/ -#if !defined(CONFIG_GRAN) || !defined(CONFIG_FAT_DMAMEMORY) -# error microSD DMA support requires CONFIG_GRAN and CONFIG_FAT_DMAMEMORY -#endif - /* Debug ********************************************************************/ #ifdef CONFIG_CPP_HAVE_VARARGS @@ -102,6 +98,11 @@ * Protected Functions ****************************************************************************/ +#if defined(CONFIG_FAT_DMAMEMORY) +# if !defined(CONFIG_GRAN) || !defined(CONFIG_FAT_DMAMEMORY) +# error microSD DMA support requires CONFIG_GRAN +# endif + static GRAN_HANDLE dma_allocator; /* @@ -155,6 +156,12 @@ fat_dma_free(FAR void *memory, size_t size) gran_free(dma_allocator, memory, size); } +#else + +# define dma_alloc_init() + +#endif + /************************************************************************************ * Name: stm32_boardinitialize * |