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:
Nicolas Reinecke 2016-05-15 20:11:18 +02:00
parent ec6cada170
commit 4a36fb944b
1 changed files with 1 additions and 1 deletions

View File

@ -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.