1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-25 17:25:20 +03:00

Use CCM_CODE for DMA handlers on F3.

This shaves a few cycles when handling the DSHOT telemetry responses.
Fewer invalid packets.
This commit is contained in:
Dominic Clifton 2019-08-28 16:56:03 +02:00
parent 105093211d
commit 8731e4a003
2 changed files with 8 additions and 1 deletions

View file

@ -168,7 +168,13 @@ typedef enum {
.owner.resourceIndex = 0 \
}
#define DEFINE_DMA_IRQ_HANDLER(d, c, i) void DMA ## d ## _Channel ## c ## _IRQHandler(void) {\
#if defined(USE_CCM_CODE) && defined(STM32F3)
#define DMA_HANDLER_CODE CCM_CODE
#else
#define DMA_HANDLER_CODE
#endif
#define DEFINE_DMA_IRQ_HANDLER(d, c, i) DMA_HANDLER_CODE void DMA ## d ## _Channel ## c ## _IRQHandler(void) {\
const uint8_t index = DMA_IDENTIFIER_TO_INDEX(i); \
dmaCallbackHandlerFuncPtr handler = dmaDescriptors[index].irqHandlerCallback; \
if (handler) \