rfLPC
A low level library for using NXP's LPC17xx SoC. Config is given for MBED prototyping board
|
Macro tools for easy implementation of other macros. More...
Go to the source code of this file.
Macros | |
#define | TOKEN_PASTE2(x, y) x ## y |
Concatenate two tokens together. | |
#define | TOKEN_PASTE(x, y) TOKEN_PASTE2(x, y) |
This macro allows concatenation of tokens even in recursive macro. | |
#define | RFLPC_SET_BIT(val, bit) (val) |= (1UL << (bit)) |
Sets a given bit to 1. | |
#define | RFLPC_CLR_BIT(val, bit) (val) &= ~(1UL << (bit)) |
Clears a given bit to 0. | |
#define | RFLPC_SET_BITS_VAL(val, bit_pos, bit_val, bit_count) |
Sets some bits values from the position of the LSB bit and the number of bits to set. More... | |
#define | rflpc_idle asm volatile ("wfi") |
Switch the CM3 to wait for interrupt mode (wfi asm instruction). More... | |
Macro tools for easy implementation of other macros.
Definition in file tools.h.
#define rflpc_idle asm volatile ("wfi") |
#define RFLPC_SET_BITS_VAL | ( | val, | |
bit_pos, | |||
bit_val, | |||
bit_count | |||
) |
Sets some bits values from the position of the LSB bit and the number of bits to set.
The bit_val is the values of the bits BEFORE shift
Definition at line 45 of file tools.h.
Referenced by rflpc_adc_sample(), and rflpc_dac_write().