1
0
Fork 0
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:
kedeng 2025-07-08 12:43:33 +08:00
parent a82f0142c4
commit ecc5e863e0
2 changed files with 5 additions and 1 deletions

View file

@ -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 {

View file

@ -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)