include: zephyr: sys: Introduce IS_BIT_SET() macro

This macro is defined in a few places which leads to macro redefinition
error e.g. when compiling prometheus network sample for NPCX boards.

Provide one definition of IS_BIT_SET() in util_macro.h to fix the
problem.

Signed-off-by: Patryk Duda <patrykd@google.com>
This commit is contained in:
Patryk Duda 2025-01-08 11:22:26 +01:00 committed by Benjamin Cabé
commit 22d3173a61
4 changed files with 9 additions and 4 deletions

View file

@ -10,7 +10,6 @@
/*
* NPCX register bit/field access operations
*/
#define IS_BIT_SET(reg, bit) (((reg >> bit) & (0x1)) != 0)
#define GET_POS_FIELD(pos, size) pos
#define GET_SIZE_FIELD(pos, size) size