From bd27d7fc26b8757c4a27c95bac6470d0a5c49afd Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 13 Feb 2019 18:44:45 +1100 Subject: [PATCH] HAL_ChibiOS: fixed build on F4 --- libraries/AP_HAL_ChibiOS/shared_dma.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libraries/AP_HAL_ChibiOS/shared_dma.cpp b/libraries/AP_HAL_ChibiOS/shared_dma.cpp index acd94bfbf5..45ad6a4f4c 100644 --- a/libraries/AP_HAL_ChibiOS/shared_dma.cpp +++ b/libraries/AP_HAL_ChibiOS/shared_dma.cpp @@ -122,11 +122,14 @@ void Shared_DMA::lock_core(void) locks[stream_id2].deallocate = deallocate; locks[stream_id2].obj = this; } - } else if (stream_id1 == STM32_DMA_STREAM_ID_ANY || - stream_id2 == STM32_DMA_STREAM_ID_ANY) { + } +#ifdef STM32_DMA_STREAM_ID_ANY + else if (stream_id1 == STM32_DMA_STREAM_ID_ANY || + stream_id2 == STM32_DMA_STREAM_ID_ANY) { // call allocator without needing locking allocate(this); } +#endif have_lock = true; }