Skip to content
Commit e50a8596 authored by Carles Cufi's avatar Carles Cufi
Browse files

drivers: sensor: qdec_nrfx: Fix build with no optimizations



The build of this driver fails when `CONFIG_NO_OPTIMIZATIONS=y` is set:

error: expression in static assertion is not constant
   98 |  BUILD_ASSERT(steps > 0, "only positive number valid");

error: expression in static assertion is not constant
   99 |  BUILD_ASSERT(steps <= 2048, "overflow possible");

Fix this by using a simple macro to avoid the compiler from getting
confused.

Signed-off-by: default avatarCarles Cufi <carles.cufi@nordicsemi.no>
parent 147d9cb1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment