1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-26 01:35:41 +03:00

Adding simplified timer calls for enabling ESC Serial and Soft Serial for AT32 (#14228)

This commit is contained in:
Jay Blackman 2025-03-28 21:31:30 +11:00 committed by GitHub
parent 06844745f6
commit 268952eeb5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 195 additions and 76 deletions

View file

@ -487,11 +487,7 @@ void onSerialRxPinChange(timerCCHandlerRec_t *cbRec, captureCompare_t capture)
// Synchronize the bit timing so that it will interrupt at the center
// of the bit period.
#ifdef USE_HAL_DRIVER
__HAL_TIM_SetCounter(self->timerHandle, __HAL_TIM_GetAutoreload(self->timerHandle) / 2);
#else
TIM_SetCounter(self->timerHardware->tim, self->timerHardware->tim->ARR / 2);
#endif
timerSetCounter(self->timerHardware->tim, timerGetPeriod(self->timerHardware->tim) / 2);
// For a mono-timer full duplex configuration, this may clobber the
// transmission because the next callback to the onSerialTimerOverflow