Skip to content

Commit de1e1c5

Browse files
ldurswfpistm
andauthored
Fix compiler warning on HardwareTimer (#2256)
Signed-off-by: ldursw <37294448+ldursw@users.noreply.github.com> Co-authored-by: Frederic Pillon <frederic.pillon@st.com>
1 parent 49b8eef commit de1e1c5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

libraries/SrcWrapper/src/HardwareTimer.cpp

Lines changed: 4 additions & 0 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy