Go to the source code of this file.
|
#define | GET_REG(REG) ((uint16_t) *(REG)) |
|
#define | SET_REG(REG, VAL) (*(REG) = (uint16_t)(VAL)) |
|
#define | CLR_REG_BIT(REG, BIT) SET_REG((REG), (~(BIT))) |
|
#define | CLR_REG_BIT_MSK_AND_SET(REG, MSK, BIT, EXTRA_BITS) SET_REG((REG), (GET_REG((REG)) & (MSK) & (~(BIT))) | (EXTRA_BITS)) |
|
#define | CLR_REG_BIT_MSK(REG, MSK, BIT) CLR_REG_BIT_MSK_AND_SET((REG), (MSK), (BIT), 0) |
|
#define | GET_REG_BIT(REG, BIT) (GET_REG(REG) & (BIT)) |
|
#define | TOG_SET_REG_BIT_MSK_AND_SET(REG, MSK, BIT, EXTRA_BITS) |
|
#define | TOG_SET_REG_BIT_MSK(REG, MSK, BIT) TOG_SET_REG_BIT_MSK_AND_SET((REG), (MSK), (BIT), 0) |
|
◆ CLR_REG_BIT
#define CLR_REG_BIT |
( |
|
REG, |
|
|
|
BIT |
|
) |
| SET_REG((REG), (~(BIT))) |
◆ CLR_REG_BIT_MSK
◆ CLR_REG_BIT_MSK_AND_SET
#define CLR_REG_BIT_MSK_AND_SET |
( |
|
REG, |
|
|
|
MSK, |
|
|
|
BIT, |
|
|
|
EXTRA_BITS |
|
) |
| SET_REG((REG), (GET_REG((REG)) & (MSK) & (~(BIT))) | (EXTRA_BITS)) |
◆ GET_REG
#define GET_REG |
( |
|
REG | ) |
((uint16_t) *(REG)) |
◆ GET_REG_BIT
#define GET_REG_BIT |
( |
|
REG, |
|
|
|
BIT |
|
) |
| (GET_REG(REG) & (BIT)) |
◆ SET_REG
#define SET_REG |
( |
|
REG, |
|
|
|
VAL |
|
) |
| (*(REG) = (uint16_t)(VAL)) |
◆ TOG_SET_REG_BIT_MSK
◆ TOG_SET_REG_BIT_MSK_AND_SET
#define TOG_SET_REG_BIT_MSK_AND_SET |
( |
|
REG, |
|
|
|
MSK, |
|
|
|
BIT, |
|
|
|
EXTRA_BITS |
|
) |
| |
Value:do { \
register uint16_t toggle_mask =
GET_REG(REG) & (MSK); \
toggle_mask ^= BIT; \
SET_REG((REG), toggle_mask | (EXTRA_BITS)); \
} while (0)
Definition at line 56 of file tools.h.