File tree 1 file changed +6
-1
lines changed
1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -115,6 +115,8 @@ void HardwareTimer::pause()
115
115
/* Starting from G4, new Channel state implementation prevents to restart a channel,
116
116
if the channel has not been explicitly be stopped with HAL interface */
117
117
TIM_CHANNEL_STATE_SET_ALL (&(_timerObj.handle ), HAL_TIM_CHANNEL_STATE_READY);
118
+ #endif
119
+ #if defined(TIM_CHANNEL_N_STATE_SET_ALL)
118
120
TIM_CHANNEL_N_STATE_SET_ALL (&(_timerObj.handle ), HAL_TIM_CHANNEL_STATE_READY);
119
121
#endif
120
122
}
@@ -144,9 +146,12 @@ void HardwareTimer::pauseChannel(uint32_t channel)
144
146
#if defined(TIM_CHANNEL_STATE_SET)
145
147
/* Starting from G4, new Channel state implementation prevents to restart a channel,
146
148
if the channel has not been explicitly be stopped with HAL interface */
149
+ #if defined(TIM_CHANNEL_N_STATE_SET)
147
150
if (isComplementaryChannel[channel - 1 ]) {
148
151
TIM_CHANNEL_N_STATE_SET (&(_timerObj.handle ), getChannel (channel), HAL_TIM_CHANNEL_STATE_READY);
149
- } else {
152
+ } else
153
+ #endif
154
+ {
150
155
TIM_CHANNEL_STATE_SET (&(_timerObj.handle ), getChannel (channel), HAL_TIM_CHANNEL_STATE_READY);
151
156
}
152
157
#endif
You can’t perform that action at this time.
0 commit comments