|
ic-macros
0.1.5
|
#include "ic_macros/assert_type.h"#include "ic_macros/ic_assert.h"#include "ic_macros/integer_cast.h"#include "zephyr/util.h"
Go to the source code of this file.
Macros | |
| #define | IC_CAST_ENUM(type, min, max, expr) |
| Compile-time constant safe cast from an integer type to an enum. More... | |
| #define | IC_Z_CAST_ENUM(type, min, max, expr) |
| Safe cast from from an integer type to an enum. More... | |
| #define IC_CAST_ENUM | ( | type, | |
| min, | |||
| max, | |||
| expr | |||
| ) |
Compile-time constant safe cast from an integer type to an enum.
| type | The enum type to cast to. |
| min | The minimum value of type, e.g. 0 or MY_ENUM_MIN. |
| max | The maximum value of type, e.g. MY_ENUM_MAX. |
| expr | The expression to cast. |
Definition at line 21 of file enum_cast.h.
| #define IC_Z_CAST_ENUM | ( | type, | |
| min, | |||
| max, | |||
| expr | |||
| ) |
Safe cast from from an integer type to an enum.
| type | The enum type to cast to. |
| min | The minimum value of type, e.g. 0 or MY_ENUM_MIN. |
| max | The maximum value of type, e.g. MY_ENUM_MAX. |
| expr | The expression to cast. |
Definition at line 36 of file enum_cast.h.