stm32l4 fix tim channel range checking

This commit is contained in:
Sergey Nikitenko 2021-03-12 21:44:53 +03:00 committed by Petro Karashchenko
parent 541b03b787
commit 0b9a36d142

View File

@ -1127,7 +1127,7 @@ static int stm32l4_tim_setchannel(FAR struct stm32l4_tim_dev_s *dev,
/* Further we use range as 0..3; if channel=0 it will also overflow here */
if (--channel > 4)
if (--channel > 3)
{
return -EINVAL;
}