|
@@ -55,7 +55,7 @@
|
55
|
55
|
static volatile int8_t currentServoIndex[_Nbr_16timers]; // index for the servo being pulsed for each timer (or -1 if refresh interval)
|
56
|
56
|
|
57
|
57
|
FORCE_INLINE static uint16_t getTimerCount() {
|
58
|
|
- Tc * const tc = TimerConfig[SERVO_TC].pTimer;
|
|
58
|
+ Tc * const tc = TimerConfig[SERVO_TC].pTc;
|
59
|
59
|
|
60
|
60
|
tc->COUNT16.CTRLBSET.reg = TC_CTRLBCLR_CMD_READSYNC;
|
61
|
61
|
SYNC(tc->COUNT16.SYNCBUSY.bit.CTRLB || tc->COUNT16.SYNCBUSY.bit.COUNT);
|
|
@@ -67,7 +67,7 @@ FORCE_INLINE static uint16_t getTimerCount() {
|
67
|
67
|
// Interrupt handler for the TC
|
68
|
68
|
// ----------------------------
|
69
|
69
|
HAL_SERVO_TIMER_ISR() {
|
70
|
|
- Tc * const tc = TimerConfig[SERVO_TC].pTimer;
|
|
70
|
+ Tc * const tc = TimerConfig[SERVO_TC].pTc;
|
71
|
71
|
const timer16_Sequence_t timer =
|
72
|
72
|
#ifndef _useTimer1
|
73
|
73
|
_timer2
|
|
@@ -127,7 +127,7 @@ HAL_SERVO_TIMER_ISR() {
|
127
|
127
|
}
|
128
|
128
|
|
129
|
129
|
void initISR(timer16_Sequence_t timer) {
|
130
|
|
- Tc * const tc = TimerConfig[SERVO_TC].pTimer;
|
|
130
|
+ Tc * const tc = TimerConfig[SERVO_TC].pTc;
|
131
|
131
|
const uint8_t tcChannel = TIMER_TCCHANNEL(timer);
|
132
|
132
|
|
133
|
133
|
static bool initialized = false; // Servo TC has been initialized
|
|
@@ -204,7 +204,7 @@ void initISR(timer16_Sequence_t timer) {
|
204
|
204
|
}
|
205
|
205
|
|
206
|
206
|
void finISR(timer16_Sequence_t timer) {
|
207
|
|
- Tc * const tc = TimerConfig[SERVO_TC].pTimer;
|
|
207
|
+ Tc * const tc = TimerConfig[SERVO_TC].pTc;
|
208
|
208
|
const uint8_t tcChannel = TIMER_TCCHANNEL(timer);
|
209
|
209
|
|
210
|
210
|
// Disable the match channel interrupt request
|