1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-12 11:00:02 +03:00

PICO: DMA Removing magic numbers

This commit is contained in:
blckmn 2025-06-25 04:56:29 +10:00
parent 4bb1edfba0
commit c284edb89c

View file

@ -68,8 +68,8 @@ typedef enum {
.owner.resourceIndex = 0 \
}
#define DMA_IDENTIFIER_TO_CHANNEL(identifier) ((identifier) - 1)
#define DMA_CHANNEL_TO_IDENTIFIER(channel) ((dmaIdentifier_e)((channel) + 1))
#define DMA_IDENTIFIER_TO_CHANNEL(identifier) ((identifier) - DMA_FIRST_HANDLER)
#define DMA_CHANNEL_TO_IDENTIFIER(channel) ((dmaIdentifier_e)((channel) + DMA_FIRST_HANDLER))
#define DMA_CHANNEL_TO_INDEX(channel) (channel)
dmaIdentifier_e dmaGetFreeIdentifier(void);