Skip to content

Commit de1e1c5

Browse files
ldurswfpistm
andauthored
Fix compiler warning on HardwareTimer (#2256)
Signed-off-by: ldursw <[email protected]> Co-authored-by: Frederic Pillon <[email protected]>
1 parent 49b8eef commit de1e1c5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: libraries/SrcWrapper/src/HardwareTimer.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,10 @@ void HardwareTimer::pause()
168168
*/
169169
void HardwareTimer::pauseChannel(uint32_t channel)
170170
{
171+
if ((channel < 1) || (channel > TIMER_CHANNELS)) {
172+
return;
173+
}
174+
171175
int timAssociatedInputChannel;
172176
int LLChannel = getLLChannel(channel);
173177
if (LLChannel == -1) {

0 commit comments

Comments
 (0)