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:
parent
06844745f6
commit
268952eeb5
10 changed files with 195 additions and 76 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue