1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-24 16:55:36 +03:00

Add comment about duplicate initialization of timers and DMAs

This commit is contained in:
jflyper 2018-01-31 19:53:24 +09:00
parent 6efe34d4da
commit 825bc7aaba
2 changed files with 8 additions and 0 deletions

View file

@ -157,6 +157,10 @@ void pwmDshotMotorHardwareConfig(const timerHardware_t *timerHardware, uint8_t m
return;
}
// Note that a timer and an associated DMA are initialized more than once.
// To fix it, getTimerIndex must be expanded to return if a new timer has been requested.
// However, since the initialization is idempotent, it is left as is in a favor of flash space (for now).
motor->timer = &dmaMotorTimers[getTimerIndex(timer)];
/* Set the common dma handle parameters to be configured */