RKH
Loading...
Searching...
No Matches
rkhdef.h File Reference

Defines constants and macros. More...

Go to the source code of this file.

Macros

#define RKH_BIT(bit)   (1u << (bit))
 Create bit mask with single, specified bit set.
 
#define RKH_BIT_MASK(bit_mask, bit_shift)    ((bit_mask) << (bit_shift))
 Shift a bit mask.
 
#define RKH_BIT_IS_SET(val, mask)
 Determine if specified bit(s) in a value are set.
 
#define RKH_BIT_IS_CLR(val, mask)
 Determine if specified bit(s) in a value are clear.
 
#define RKH_BIT_IS_SET_ANY(val, mask)    ((((val) & (mask)) == 0u) ? (RKH_NO) : (RKH_YES))
 Determine if any specified bit(s) in a value are set.
 
#define RKH_BIT_IS_CLR_ANY(val, mask)    ((((val) & (mask)) == (mask)) ? (RKH_NO) : (RKH_YES))
 Determine if any specified bit(s) in a value are clear.
 

Detailed Description

Defines constants and macros.

All constants and macros are prefixed with RKH_ to provide a consistent naming convention and to avoid namespace conflicts with other constants and macros in your application.

Definition in file rkhdef.h.