27#include "vendor/hw_soc_adc.h"
30#include "vendor/hw_ssi.h"
31#include "vendor/hw_uart.h"
40#define CPUID_ADDR (&IEEE_ADDR_MSWORD)
52typedef uint32_t gpio_t;
59#define PM_NUM_MODES (5)
65#define GPIO_UNDEF (0xffffffff)
70#define GPIO_MUX_NONE (0xff)
77#define GPIO_PIN(port, pin) (gpio_t)(((uint32_t)GPIO_BASE + \
78 (port << GPIO_PORTNUM_SHIFT)) | pin)
103#define PERIPH_I2C_NEED_READ_REG
104#define PERIPH_I2C_NEED_READ_REGS
105#define PERIPH_I2C_NEED_WRITE_REG
106#define PERIPH_I2C_NEED_WRITE_REGS
114#define HAVE_I2C_SPEED_T
138#define PERIPH_SPI_NEEDS_INIT_CS
139#define PERIPH_SPI_NEEDS_TRANSFER_BYTE
140#define PERIPH_SPI_NEEDS_TRANSFER_REG
141#define PERIPH_SPI_NEEDS_TRANSFER_REGS
149#define HAVE_GPIO_MODE_T
151 GPIO_IN = ((uint8_t)OVERRIDE_DISABLE),
152 GPIO_IN_ANALOG = ((uint8_t)OVERRIDE_ANALOG),
153 GPIO_IN_PD = ((uint8_t)OVERRIDE_PULLDOWN),
154 GPIO_IN_PU = ((uint8_t)OVERRIDE_PULLUP),
155 GPIO_OUT = ((uint8_t)OVERRIDE_ENABLE),
170#ifdef MODULE_PERIPH_UART_HW_FC
182#define HAVE_UART_PARITY_T
196#define HAVE_UART_DATA_BITS_T
209#define HAVE_UART_STOP_BITS_T
219#ifndef UART_TXBUF_SIZE
220#define UART_TXBUF_SIZE (64)
226#define SPI_CS_UNDEF (GPIO_UNDEF)
242#define HAVE_SPI_MODE_T
255#define HAVE_SPI_CLK_T
274#ifndef BOARD_HAS_SPI_CLK_CONF
283 { .
cpsr = 64, .scr = 4 },
284 { .cpsr = 16, .scr = 4 },
285 { .cpsr = 32, .scr = 0 },
286 { .cpsr = 2, .scr = 2 },
287 { .cpsr = 2, .scr = 1 }
320#define HAVE_ADC_RES_T
323 ADC_RES_7BIT = (0 << 4),
325 ADC_RES_9BIT = (1 << 4),
343#define SOC_ADC_ADCCON3_EREF_INT (0 << SOC_ADC_ADCCON3_EREF_S)
344#define SOC_ADC_ADCCON3_EREF_EXT (1 << SOC_ADC_ADCCON3_EREF_S)
345#define SOC_ADC_ADCCON3_EREF_AVDD5 (2 << SOC_ADC_ADCCON3_EREF_S)
346#define SOC_ADC_ADCCON3_EREF_DIFF (3 << SOC_ADC_ADCCON3_EREF_S)
353#define SOCADC_7_BIT_RSHIFT (9U)
354#define SOCADC_9_BIT_RSHIFT (7U)
355#define SOCADC_10_BIT_RSHIFT (6U)
356#define SOCADC_12_BIT_RSHIFT (4U)
363#define RTT_DEV SMWDTHROSC
364#define RTT_IRQ SM_TIMER_ALT_IRQn
365#define RTT_IRQ_PRIO 1
366#define RTT_ISR isr_sleepmode
367#define RTT_MAX_VALUE (0xffffffff)
368#define RTT_FREQUENCY (CLOCK_OSC32K)
372#define RTT_MIN_OFFSET (5U)
381#define NWDT_TIME_LOWER_LIMIT (2U)
382#define NWDT_TIME_UPPER_LIMIT (1000U)
@ GPIO_OUT
select GPIO MASK as output
@ GPIO_IN
select GPIO MASK as input
@ I2C_SPEED_NORMAL
normal mode: ~100 kbit/s
@ I2C_SPEED_FAST_PLUS
fast plus mode: ~1000 kbit/s
@ I2C_SPEED_LOW
low speed mode: ~10 kbit/s
@ I2C_SPEED_HIGH
high speed mode: ~3400 kbit/s
@ I2C_SPEED_FAST
fast mode: ~400 kbit/s
@ SPI_CLK_10MHZ
drive the SPI bus with 10MHz
@ SPI_CLK_5MHZ
drive the SPI bus with 5MHz
@ SPI_CLK_400KHZ
drive the SPI bus with 400KHz
@ SPI_CLK_1MHZ
drive the SPI bus with 1MHz
@ SPI_CLK_100KHZ
drive the SPI bus with 100KHz
void gpio_init_af(gpio_t pin, uint8_t sel, uint8_t over)
Configure an alternate function for the given pin.
void gpio_init_mux(gpio_t pin, uint8_t over, uint8_t sel, uint8_t func)
Configure an alternate function for the given pin.
gpio_t adc_conf_t
ADC configuration wrapper.
static const spi_clk_conf_t spi_clk_config[]
Pre-calculated clock divider values based on a CLOCK_CORECLOCK (32MHz)
adc_res_t
Possible ADC resolution settings.
@ ADC_RES_16BIT
ADC resolution: 16 bit.
@ ADC_RES_8BIT
ADC resolution: 8 bit.
@ ADC_RES_14BIT
ADC resolution: 14 bit.
@ ADC_RES_6BIT
ADC resolution: 6 bit.
@ ADC_RES_10BIT
ADC resolution: 10 bit.
@ ADC_RES_12BIT
ADC resolution: 12 bit.
gpio_t spi_cs_t
Chip select pin type overlaps with gpio_t so it can be casted to this.
spi_mode_t
Support SPI modes.
@ SPI_MODE_0
CPOL=0, CPHA=0.
@ SPI_MODE_2
CPOL=1, CPHA=0.
@ SPI_MODE_1
CPOL=0, CPHA=1.
@ SPI_MODE_3
CPOL=1, CPHA=1.
gpio_mode_t
Available pin modes.
uart_parity_t
Definition of possible parity modes.
@ UART_PARITY_SPACE
space parity
@ UART_PARITY_NONE
no parity
@ UART_PARITY_EVEN
even parity
@ UART_PARITY_ODD
odd parity
@ UART_PARITY_MARK
mark parity
uart_stop_bits_t
Definition of possible stop bits lengths.
@ UART_STOP_BITS_2
2 stop bits
@ UART_STOP_BITS_1
1 stop bit
uart_data_bits_t
Definition of possible data bits lengths in a UART frame.
@ UART_DATA_BITS_6
6 data bits
@ UART_DATA_BITS_5
5 data bits
@ UART_DATA_BITS_7
7 data bits
@ UART_DATA_BITS_8
8 data bits
stdio wrapper to extend the C libs stdio
UART component registers.
I2C configuration structure.
Datafields for static SPI clock configuration values.
uint8_t cpsr
CPSR clock divider.
uint8_t scr
SCR clock divider.
SPI device configuration.
uint8_t num
number of SSI device, i.e.
spi_cs_t cs_pin
pin used for CS
Timer device configuration.
uint_fast8_t cfg
timer config word
uint_fast8_t chn
number of channels
UART device configuration.
cc2538_uart_t * dev
pointer to the used UART device