1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-14 03:50:02 +03:00

Performance improvement based on feedback from @martinbudden

This commit is contained in:
blckmn 2017-01-30 22:17:01 +11:00 committed by borisbstyle
parent a7f50ad30a
commit 3c20108a99
3 changed files with 37 additions and 30 deletions

View file

@ -769,6 +769,10 @@ void timerForceOverflow(TIM_TypeDef *tim)
const timerHardware_t *timerGetByTag(ioTag_t tag, timerUsageFlag_e flag)
{
if (!tag) {
return NULL;
}
for (int i = 0; i < USABLE_TIMER_CHANNEL_COUNT; i++) {
if (timerHardware[i].tag == tag) {
if (timerHardware[i].usageFlags & flag || flag == 0) {