mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-13 11:29:58 +03:00
Simplify TIMUP DMA option index and presenceMask handling
This commit is contained in:
parent
6ab37fd800
commit
c6ba65dfd8
3 changed files with 20 additions and 40 deletions
|
@ -5425,18 +5425,10 @@ static void printPeripheralDmaoptDetails(dmaoptEntry_t *entry, int index, const
|
|||
int uiIndex;
|
||||
|
||||
if (entry->presenceMask) {
|
||||
#if defined(STM32H7) || defined(STM32G4)
|
||||
if (entry->peripheral == DMA_PERIPH_TIMUP) {
|
||||
if (!(BIT(index + 1) & entry->presenceMask)) {
|
||||
return;
|
||||
}
|
||||
uiIndex = index + 1;
|
||||
} else {
|
||||
uiIndex = timerGetNumberByIndex(index);
|
||||
if (!(BIT(index + 1) & entry->presenceMask)) {
|
||||
return;
|
||||
}
|
||||
#else
|
||||
uiIndex = timerGetNumberByIndex(index);
|
||||
#endif
|
||||
uiIndex = index + 1;
|
||||
} else {
|
||||
uiIndex = DMA_OPT_UI_INDEX(index);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue