nRF5x common definitions for handling peripherals More...
nRF5x common definitions for handling peripherals
Definition in file periph_cpu_common.h.
#include "cpu.h"
Go to the source code of this file.
Data Structures | |
struct | timer_conf_t |
Timer configuration. More... | |
Macros | |
#define | CPUID_ADDR (&NRF_FICR->DEVICEID[0]) |
Starting offset of CPU_ID. | |
#define | CPUID_LEN (8U) |
Length of the CPU_ID in octets. | |
Functions | |
uint8_t | gpio_int_get_exti (gpio_t pin) |
Retrieve the exti(GPIOTE) channel associated with a gpio. More... | |
Override macro for defining GPIO pins | |
The port definition is used (and zeroed) to suppress compiler warnings | |
#define | GPIO_PIN(x, y) ((x & 0) | y) |
#define | GPIO_UNDEF (UINT8_MAX) |
Override GPIO_UNDEF value. | |
#define | GPIO_MODE(oe, ic, pr, dr) (oe | (ic << 1) | (pr << 2) | (dr << 8)) |
Generate GPIO mode bitfields. More... | |
#define | SPI_HWCS(x) (SPI_CS_UNDEF) |
No support for HW chip select... | |
#define | PERIPH_SPI_NEEDS_INIT_CS |
Declare needed shared SPI functions. | |
#define | PERIPH_SPI_NEEDS_TRANSFER_BYTE |
#define | PERIPH_SPI_NEEDS_TRANSFER_REG |
#define | PERIPH_SPI_NEEDS_TRANSFER_REGS |
WDT upper and lower bound times in ms | |
#define | NWDT_TIME_LOWER_LIMIT (1) |
#define | NWDT_TIME_UPPER_LIMIT ((UINT32_MAX >> 15) * US_PER_MS + 1) |
#define GPIO_MODE | ( | oe, | |
ic, | |||
pr, | |||
dr | |||
) | (oe | (ic << 1) | (pr << 2) | (dr << 8)) |
Generate GPIO mode bitfields.
We use 4 bit to encode the pin mode:
Definition at line 71 of file periph_cpu_common.h.
uint8_t gpio_int_get_exti | ( | gpio_t | pin | ) |
Retrieve the exti(GPIOTE) channel associated with a gpio.
pin | GPIO pin to retrieve the channel for |