qei driver: fix potential overflow in qeiUpdateI
when quiUpdate isn't called for while an cnt(uint16_t) is above 32767 delta(int16_t) can overflow.
This commit is contained in:
parent
ec6cada170
commit
4a36fb944b
|
@ -238,7 +238,7 @@ typedef uint16_t qeicnt_t;
|
|||
/**
|
||||
* @brief QEI delta type.
|
||||
*/
|
||||
typedef int16_t qeidelta_t;
|
||||
typedef int32_t qeidelta_t;
|
||||
|
||||
/**
|
||||
* @brief Driver configuration structure.
|
||||
|
|
Loading…
Reference in New Issue