nRF52 specific definitions for handling peripherals More...
nRF52 specific definitions for handling peripherals
Definition in file periph_cpu.h.
#include "periph_cpu_common.h"
Include dependency graph for periph_cpu.h:Go to the source code of this file.
| #define | CLOCK_CORECLOCK (64000000U) |
| System core clock speed, fixed to 64MHz for all NRF52x CPUs. | |
Peripheral clock speed (fixed to 16MHz for nRF52 based CPUs) | |
| #define | PERIPH_CLOCK (16000000U) |
| #define | ADC_NUMOF (9U) |
| The nRF52 family of CPUs provides a fixed number of 9 ADC lines. | |
| #define | UART_TXBUF_SIZE (64) |
| Size of the UART TX buffer for non-blocking mode. | |
| enum | { NRF52_AIN0 = 0 , NRF52_AIN1 = 1 , NRF52_AIN2 = 2 , NRF52_AIN3 = 3 , NRF52_AIN4 = 4 , NRF52_AIN5 = 5 , NRF52_AIN6 = 6 , NRF52_AIN7 = 7 , NRF52_VDD = 8 } |
| nRF52 specific naming of ADC lines (for convenience) More... | |
| typedef void(* | spi_twi_irq_cb_t) (void *arg) |
| Common SPI/I2C interrupt callback. More... | |
| void | spi_twi_irq_register_spi (NRF_SPIM_Type *bus, spi_twi_irq_cb_t cb, void *arg) |
| Register a SPI IRQ handler for a shared I2C/SPI irq vector. More... | |
| void | spi_twi_irq_register_i2c (NRF_TWIM_Type *bus, spi_twi_irq_cb_t cb, void *arg) |
| Register a I2C IRQ handler for a shared I2C/SPI irq vector. More... | |
| void | nrf5x_i2c_acquire (NRF_TWIM_Type *bus, spi_twi_irq_cb_t cb, void *arg) |
| Acquire the shared I2C/SPI peripheral in I2C mode. More... | |
| void | nrf5x_i2c_release (NRF_TWIM_Type *bus) |
| Release the shared I2C/SPI peripheral in I2C mode. More... | |
| void | nrf5x_spi_acquire (NRF_SPIM_Type *bus, spi_twi_irq_cb_t cb, void *arg) |
| Acquire the shared I2C/SPI peripheral in SPI mode. More... | |
| void | nrf5x_spi_release (NRF_SPIM_Type *bus) |
| Acquire the shared I2C/SPI peripheral in SPI mode. More... | |
| typedef void(* spi_twi_irq_cb_t) (void *arg) |
Common SPI/I2C interrupt callback.
| arg | Opaque context pointer |
Definition at line 92 of file periph_cpu.h.
| anonymous enum |
nRF52 specific naming of ADC lines (for convenience)
Definition at line 48 of file periph_cpu.h.
| void nrf5x_i2c_acquire | ( | NRF_TWIM_Type * | bus, |
| spi_twi_irq_cb_t | cb, | ||
| void * | arg | ||
| ) |
Acquire the shared I2C/SPI peripheral in I2C mode.
| bus | bus to acquire exclusive access on |
| cb | ISR handler to call on IRQ |
| arg | ISR handler argument |
| void nrf5x_i2c_release | ( | NRF_TWIM_Type * | bus | ) |
Release the shared I2C/SPI peripheral in I2C mode.
| bus | bus to release exclusive access on |
| void nrf5x_spi_acquire | ( | NRF_SPIM_Type * | bus, |
| spi_twi_irq_cb_t | cb, | ||
| void * | arg | ||
| ) |
Acquire the shared I2C/SPI peripheral in SPI mode.
| bus | bus to release exclusive access on |
| cb | ISR handler to call on IRQ |
| arg | ISR handler argument |
| void nrf5x_spi_release | ( | NRF_SPIM_Type * | bus | ) |
Acquire the shared I2C/SPI peripheral in SPI mode.
| bus | bus to release exclusive access on |
| void spi_twi_irq_register_i2c | ( | NRF_TWIM_Type * | bus, |
| spi_twi_irq_cb_t | cb, | ||
| void * | arg | ||
| ) |
Register a I2C IRQ handler for a shared I2C/SPI irq vector.
| bus | bus to register the IRQ handler on |
| cb | callback to call on IRQ |
| arg | Argument to pass to the handler |
| void spi_twi_irq_register_spi | ( | NRF_SPIM_Type * | bus, |
| spi_twi_irq_cb_t | cb, | ||
| void * | arg | ||
| ) |
Register a SPI IRQ handler for a shared I2C/SPI irq vector.
| bus | bus to register the IRQ handler on |
| cb | callback to call on IRQ |
| arg | Argument to pass to the handler |