|
APM:Libraries
|
Miscellaneous utility macros and procedures. More...
Go to the source code of this file.
Macros | |
| #define | BIT(shift) (1UL << (shift)) |
| #define | BIT_MASK_SHIFT(mask, shift) ((mask) << (shift)) |
| #define | GET_BITS(x, m, n) ((((uint32)x) << (31 - (n))) >> ((31 - (n)) + (m))) |
| #define | IS_POWER_OF_TWO(v) ((v) && !((v) & ((v) - 1))) |
Miscellaneous utility macros and procedures.
Definition in file util.h.
| #define BIT | ( | shift | ) | (1UL << (shift)) |
1 << the bit number
Definition at line 40 of file util.h.
Referenced by gpio_read_bit(), gpio_set_mode(), gpio_toggle_bit(), gpio_write_bit(), i2c_lowLevel_deinit(), and i2c_lowLevel_init().
| #define BIT_MASK_SHIFT | ( | mask, | |
| shift | |||
| ) | ((mask) << (shift)) |
1.8.13