nrf51/include/periph_cpu.h¶
nRF51 specific definitions for handling peripherals
-
CLOCK_CORECLOCK¶ System core clock speed, fixed to 16MHz for all NRF51x CPUs.
1
(16000000U)
-
UART_IRQN¶ Redefine some peripheral names to unify them between nRF51 and 52.
1
(UART0_IRQn)
-
SPI_SCKSEL¶ 1
(dev(bus)->PSELSCK)
-
SPI_MOSISEL¶ 1
(dev(bus)->PSELMOSI)
-
SPI_MISOSEL¶ 1
(dev(bus)->PSELMISO)
-
HAVE_I2C_SPEED_T¶ Override I2C speed settings.
-
enum
i2c_speed_t¶ - I2C_SPEED_LOW
= 0x01 - not supported
- I2C_SPEED_NORMAL
= 100000U - normal mode: ~100kbit/s
- I2C_SPEED_FAST
= 400000U - fast mode: ~400kbit/s
- I2C_SPEED_FAST_PLUS
= 0x02 - not supported
- I2C_SPEED_HIGH
= 0x03 - not supported
- I2C_SPEED_LOW
-
PERIPH_I2C_NEED_READ_REG¶ Use read reg function from periph common.
-
PERIPH_I2C_NEED_WRITE_REG¶ Use write reg function from periph common.
-
HAVE_ADC_RES_T¶ Override ADC resolution values.
-
enum
adc_res_t¶ - ADC_RES_7BIT
= (0 << 4) - ADC resolution: 7 bit.
- ADC_RES_9BIT
= (1 << 4) - ADC resolution: 9 bit.
- ADC_RES_11BIT
- ADC resolution: 11 bit.
- ADC_RES_6BIT
= (0xa00) - not supported by hardware
- ADC_RES_8BIT
= (0xb00) - not supported by hardware
- ADC_RES_10BIT
= (2 << 4) - ADC resolution: 10 bit.
- ADC_RES_12BIT
= (3 << 4) - ADC resolution: 12 bit.
- ADC_RES_14BIT
= (0xc00) - not supported by hardware
- ADC_RES_16BIT
= (0xd00) - not supported by hardware
- ADC_RES_7BIT
-
struct
i2c_conf_t¶ I2C configuration options.
Structure for I2C configuration data.
I2C (TWI) configuration options.
I2C configuration structure.
I2C device configuration.
-
cc2538/include/periph_cpu.h::i2c_speed_tspeed¶ baudrate used for the bus
i2c bus speed
Bus speed.
bus speed
Configured bus speed, actual speed may be lower but never higher.
-
gpio.h::gpio_tscl_pin¶ pin used for SCL
scl pin number
used SCL pin
SCL GPIO pin.
-
gpio.h::gpio_tsda_pin¶ pin used for SDA
sda pin number
used MOSI pin
SDA GPIO pin.
-
I2C_TypeDef *
dev¶ USART device used.
i2c device
-
uint32_t
loc¶ location of I2C pins
-
CMU_Clock_TypeDef
cmu¶ the device CMU channel
-
cc2538.h::IRQn_Typeirq¶ the devices base IRQ channel
-
uint32_t
speed¶ the bus speed
-
I2C_Type *
i2c¶ Pointer to hardware module registers.
-
uint32_t
freq¶ I2C module clock frequency, usually CLOCK_BUSCLOCK or CLOCK_CORECLOCK.
-
cc2538.h::IRQn_Typeirqn¶ IRQ number for this module.
-
uint32_t
scl_pcr¶ PORT module PCR setting for the SCL pin.
-
uint32_t
sda_pcr¶ PORT module PCR setting for the SDA pin.
-
NRF_TWI_Type *
dev¶ hardware device
-
uint8_t
pin_scl¶ SCL pin.
-
uint8_t
pin_sda¶ SDA pin.
-
uint8_t
ppi¶ PPI channel to use.
-
NRF_TWIM_Type *
dev¶ TWIM hardware device.
-
uint8_t
scl¶ SCL pin.
-
uint8_t
sda¶ SDA pin.
-
SercomI2cm *
dev¶ pointer to the used I2C device
-
sam0_common/include/periph_cpu_common.h::gpio_mux_tmux¶ alternate function (mux)
-
uint8_t
gclk_src¶ GCLK source which supplys SERCOM.
-
uint8_t
flags¶ allow SERCOM to run in standby mode
-
stm32_common/include/periph_cpu_common.h::gpio_af_tscl_af¶ scl pin alternate function value
-
stm32_common/include/periph_cpu_common.h::gpio_af_tsda_af¶ sda pin alternate function value
-
uint8_t
bus¶ APB bus.
-
uint32_t
rcc_mask¶ bit in clock enable register
-
uint8_t
irqn¶ I2C event interrupt number.
-