mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-12 19:10:32 +03:00
Fix TIMUP timer validation and improve timer macro consistency
This commit is contained in:
parent
a82f0142c4
commit
ecc5e863e0
2 changed files with 5 additions and 1 deletions
|
@ -5426,7 +5426,7 @@ static void printPeripheralDmaoptDetails(dmaoptEntry_t *entry, int index, const
|
|||
|
||||
if (entry->presenceMask) {
|
||||
uiIndex = timerGetNumberByIndex(index);
|
||||
if (!(BIT(uiIndex) & entry->presenceMask)) {
|
||||
if (!(TIM_N(uiIndex) & entry->presenceMask)) {
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -29,6 +29,10 @@
|
|||
|
||||
#include "timerup.h"
|
||||
|
||||
#if defined(USED_TIMERS) && defined(TIMUP_TIMERS)
|
||||
STATIC_ASSERT((~USED_TIMERS & TIMUP_TIMERS) == 0, "All TIMUP timers must be used");
|
||||
#endif
|
||||
|
||||
PG_REGISTER_ARRAY_WITH_RESET_FN(timerUpConfig_t, HARDWARE_TIMER_DEFINITION_COUNT, timerUpConfig, PG_TIMER_UP_CONFIG, 0);
|
||||
|
||||
void pgResetFn_timerUpConfig(timerUpConfig_t *config)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue