|
RKH
|
Files | |
| file | rkhdef.h |
| Defines constants and macros. | |
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. | |
| #define RKH_BIT | ( | bit | ) | (1u << (bit)) |
| #define RKH_BIT08 | ( | bit | ) | ((rui8_t)((rui8_t) 1u << (bit))) |
| #define RKH_BIT_MASK | ( | bit_mask, | |
| bit_shift | |||
| ) | ((bit_mask) << (bit_shift)) |
| #define RKH_BIT_MASK_08 | ( | bit_mask, | |
| bit_shift | |||
| ) | ((rui8_t)((rui8_t)(bit_mask) << (bit_shift))) |
| #define RKH_BIT_SET_08 | ( | val, | |
| mask | |||
| ) | ((val) = (rui8_t)(((rui8_t)(val)) | ((rui8_t)(mask)))) |
| #define RKH_BIT_CLR_08 | ( | val, | |
| mask | |||
| ) | ((val) = (rui8_t)(((rui8_t)(val)) & ((rui8_t) ~(mask)))) |
| #define RKH_BIT_IS_SET | ( | val, | |
| mask | |||
| ) |
Determine if specified bit(s) in a value are set.
| [in] | val | Value to check for specified bit(s) set. |
| [in] | mask | Mask of bits to check if set. |
| #define RKH_BIT_IS_CLR | ( | val, | |
| mask | |||
| ) |
Determine if specified bit(s) in a value are clear.
| [in] | val | Value to check for specified bit(s) clear. |
| [in] | mask | Mask of bits to check if clear. |
Determine if any specified bit(s) in a value are set.
| [in] | val | Value to check for specified bit(s) set. |
| [in] | mask | Mask of bits to check if set. |
Determine if any specified bit(s) in a value are clear.
| [in] | val | Value to check for specified bit(s) clear. |
| [in] | mask | Mask of bits to check if clear. |
| #define RKH_BIT16 | ( | bit | ) | ((rui16_t)((rui16_t) 1u << (bit))) |
| #define RKH_BIT32 | ( | bit | ) | ((rui32_t)((rui32_t) 1u << (bit))) |
| #define RKH_BIT_MASK_16 | ( | bit_mask, | |
| bit_shift | |||
| ) | ((rui16_t)((rui16_t)(bit_mask) << (bit_shift))) |
| #define RKH_BIT_MASK_32 | ( | bit_mask, | |
| bit_shift | |||
| ) | ((rui32_t)((rui32_t)(bit_mask) << (bit_shift))) |
| #define RKH_BIT_SET_16 | ( | val, | |
| mask | |||
| ) | ((val) = (rui16_t)(((rui16_t)(val)) | ((rui16_t)(mask)))) |
| #define RKH_BIT_SET_32 | ( | val, | |
| mask | |||
| ) | ((val) = (rui32_t)(((rui32_t)(val)) | ((rui32_t)(mask)))) |
| #define RKH_BIT_CLR_16 | ( | val, | |
| mask | |||
| ) | ((val) = (rui16_t)(((rui16_t)(val)) & ((rui16_t) ~(mask)))) |
| #define RKH_BIT_CLR_32 | ( | val, | |
| mask | |||
| ) | ((val) = (rui32_t)(((rui32_t)(val)) & ((rui32_t) ~(mask)))) |