Go to the documentation of this file.
19 #ifndef PERIPH_CPU_COMMON_H
20 #define PERIPH_CPU_COMMON_H
32 #define PROVIDES_PM_OFF
38 #define CPUID_ADDR (&NRF_FICR->DEVICEID[0])
42 #define CPUID_LEN (8U)
49 #ifdef CPU_MODEL_NRF52840XXAA
50 #define GPIO_PIN(x,y) ((x << 5) | y)
52 #define GPIO_PIN(x,y) ((x & 0) | y)
60 #define GPIO_UNDEF (UINT8_MAX)
71 #define GPIO_MODE(oe, ic, pr, dr) (oe | (ic << 1) | (pr << 2) | (dr << 8))
76 #define SPI_HWCS(x) (SPI_CS_UNDEF)
82 #define PERIPH_SPI_NEEDS_INIT_CS
83 #define PERIPH_SPI_NEEDS_TRANSFER_BYTE
84 #define PERIPH_SPI_NEEDS_TRANSFER_REG
85 #define PERIPH_SPI_NEEDS_TRANSFER_REGS
106 #define HAVE_GPIO_MODE_T
122 #define HAVE_GPIO_FLANK_T
146 #define HAVE_SPI_MODE_T
151 SPI_MODE_3 = (SPI_CONFIG_CPOL_Msk | SPI_CONFIG_CPHA_Msk)
159 #define HAVE_SPI_CLK_T
174 #define NWDT_TIME_LOWER_LIMIT (1)
176 #define NWDT_TIME_UPPER_LIMIT ((UINT32_MAX >> 15) * US_PER_MS + 1)
@ SPI_CLK_400KHZ
drive the SPI bus with 400KHz
@ SPI_MODE_3
CPOL=1, CPHA=1.
@ SPI_CLK_100KHZ
drive the SPI bus with 100KHz
uint8_t irqn
IRQ number of the timer device.
@ GPIO_IN_PD
configure as input with pull-down resistor
@ SPI_MODE_0
CPOL=0, CPHA=0.
@ GPIO_OD
configure as output in open-drain mode without pull resistor
uint8_t gpio_int_get_exti(gpio_t pin)
Retrieve the exti(GPIOTE) channel associated with a gpio.
uint8_t channels
number of channels available
@ GPIO_OUT
configure as output in push-pull mode
spi_mode_t
Available SPI modes, defining the configuration of clock polarity and clock phase.
@ GPIO_FALLING
emit interrupt on falling flank
@ GPIO_IN_PU
configure as input with pull-up resistor
@ GPIO_RISING
emit interrupt on rising flank
@ SPI_CLK_10MHZ
drive the SPI bus with 10MHz
@ GPIO_IN
configure as input without pull resistor
spi_clk_t
Available SPI clock speeds.
NRF_TIMER_Type * dev
timer device
@ SPI_CLK_5MHZ
drive the SPI bus with 5MHz
@ GPIO_OD_PU
configure as output in open-drain mode with pull resistor enabled
#define GPIO_MODE(oe, ic, pr, dr)
Generate GPIO mode bitfields.
@ GPIO_BOTH
emit interrupt on both flanks
uint8_t bitmode
counter width
gpio_mode_t
Available pin modes.
unsigned int gpio_t
GPIO type identifier.
@ SPI_CLK_1MHZ
drive the SPI bus with 1MHz
@ SPI_MODE_1
CPOL=0, CPHA=1.
@ SPI_MODE_2
CPOL=1, CPHA=0.