File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -115,6 +115,8 @@ void HardwareTimer::pause()
115115 /* Starting from G4, new Channel state implementation prevents to restart a channel,
116116 if the channel has not been explicitly be stopped with HAL interface */
117117 TIM_CHANNEL_STATE_SET_ALL (&(_timerObj.handle ), HAL_TIM_CHANNEL_STATE_READY);
118+ #endif
119+ #if defined(TIM_CHANNEL_N_STATE_SET_ALL)
118120 TIM_CHANNEL_N_STATE_SET_ALL (&(_timerObj.handle ), HAL_TIM_CHANNEL_STATE_READY);
119121#endif
120122}
@@ -144,9 +146,12 @@ void HardwareTimer::pauseChannel(uint32_t channel)
144146#if defined(TIM_CHANNEL_STATE_SET)
145147 /* Starting from G4, new Channel state implementation prevents to restart a channel,
146148 if the channel has not been explicitly be stopped with HAL interface */
149+ #if defined(TIM_CHANNEL_N_STATE_SET)
147150 if (isComplementaryChannel[channel - 1 ]) {
148151 TIM_CHANNEL_N_STATE_SET (&(_timerObj.handle ), getChannel (channel), HAL_TIM_CHANNEL_STATE_READY);
149- } else {
152+ } else
153+ #endif
154+ {
150155 TIM_CHANNEL_STATE_SET (&(_timerObj.handle ), getChannel (channel), HAL_TIM_CHANNEL_STATE_READY);
151156 }
152157#endif
You can’t perform that action at this time.
0 commit comments