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

PICO: Minor dma channel claim update

This commit is contained in:
blckmn 2025-06-26 07:59:44 +10:00
parent f11eea69ce
commit aeda0905c5

View file

@ -93,9 +93,10 @@ void dma_irq1_handler(void)
dmaIdentifier_e dmaGetFreeIdentifier(void) dmaIdentifier_e dmaGetFreeIdentifier(void)
{ {
const int channel = dma_claim_unused_channel(true); const int channel = dma_claim_unused_channel(false);
if (channel == DMA_INVALID) { // NOTE: dma_claim_unused_channel returns -1 if no channel is available
return DMA_INVALID; // No free channel available if (channel == -1) {
return DMA_NONE; // No free channel available
} }
return DMA_CHANNEL_TO_IDENTIFIER(channel); return DMA_CHANNEL_TO_IDENTIFIER(channel);
} }