driver: qdec - fix step limits
Corrected the condition that checks the maximum number of steps allowed. Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
This commit is contained in:
parent
0a7d8d4452
commit
36f907e43c
1 changed files with 1 additions and 1 deletions
|
@ -88,7 +88,7 @@ static int qdec_nrfx_channel_get(const struct device *dev,
|
|||
irq_unlock(key);
|
||||
|
||||
BUILD_ASSERT(steps > 0, "only positive number valid");
|
||||
BUILD_ASSERT(steps <= 2148, "overflow possible");
|
||||
BUILD_ASSERT(steps <= 2048, "overflow possible");
|
||||
|
||||
val->val1 = (acc * FULL_ANGLE) / steps;
|
||||
val->val2 = (acc * FULL_ANGLE) - (val->val1 * steps);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue