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:
parent
a7f50ad30a
commit
3c20108a99
3 changed files with 37 additions and 30 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue