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

Fixed assignment of random timer for pins without configured timer option.

This commit is contained in:
mikeller 2019-04-25 14:05:57 +12:00
parent 1db881f595
commit ceae2d88b6

View file

@ -81,7 +81,11 @@ const timerHardware_t *timerGetByTag(ioTag_t ioTag)
{
uint8_t timerIndex = timerIndexByTag(ioTag);
return timerGetByTagAndIndex(ioTag, timerIndex);
if (timerIndex) {
return timerGetByTagAndIndex(ioTag, timerIndex);
} else {
return NULL;
}
}
ioTag_t timerioTagGetByUsage(timerUsageFlag_e usageFlag, uint8_t index)