AP_HAL_ChibiOS: optimize bdshot ISRs

This commit is contained in:
Andy Piper 2021-04-01 12:19:16 +01:00 committed by Andrew Tridgell
parent cb3b37d181
commit f6b1e15b0e

View File

@ -191,6 +191,8 @@ void RCOutput::bdshot_ic_dma_deallocate(Shared_DMA *ctx)
// see https://github.com/betaflight/betaflight/pull/8554#issuecomment-512507625
// called from the interrupt
#pragma GCC push_options
#pragma GCC optimize("O2")
void RCOutput::bdshot_receive_pulses_DMAR(pwm_group* group)
{
// make sure the transaction finishes or times out, this function takes a little time to run so the most
@ -584,6 +586,7 @@ uint32_t RCOutput::bdshot_decode_telemetry_packet(uint32_t* buffer, uint32_t cou
uint32_t ret = (1000000 * 60 / 100 + decodedValue / 2) / decodedValue;
return ret;
}
#pragma GCC pop_options
#endif // HAL_WITH_BIDIR_DSHOT