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:
Carles Cufi <carles.cufi@nordicsemi.no>
Loading
Please sign in to comment