23 #include "vendor/hw_soc_adc.h" 
   26 #include "vendor/hw_ssi.h" 
   27 #include "vendor/hw_uart.h" 
   36 #define CPUID_ADDR          (&IEEE_ADDR_MSWORD) 
   41 #define CPUID_LEN           (8U) 
   55 #define PM_NUM_MODES        (5) 
   61 #define GPIO_UNDEF          (0xffffffff) 
   66 #define GPIO_MUX_NONE       (0xff) 
   73 #define GPIO_PIN(port, pin) (gpio_t)(((uint32_t)GPIO_BASE + \ 
   74                                       (port << GPIO_PORTNUM_SHIFT)) | pin) 
   93 void gpio_init_mux(gpio_t pin, uint8_t over, uint8_t sel, uint8_t func);
 
   99 #define PERIPH_I2C_NEED_READ_REG 
  100 #define PERIPH_I2C_NEED_READ_REGS 
  101 #define PERIPH_I2C_NEED_WRITE_REG 
  102 #define PERIPH_I2C_NEED_WRITE_REGS 
  110 #define HAVE_I2C_SPEED_T 
  134 #define PERIPH_SPI_NEEDS_INIT_CS 
  135 #define PERIPH_SPI_NEEDS_TRANSFER_BYTE 
  136 #define PERIPH_SPI_NEEDS_TRANSFER_REG 
  137 #define PERIPH_SPI_NEEDS_TRANSFER_REGS 
  145 #define HAVE_GPIO_MODE_T 
  147     GPIO_IN         = ((uint8_t)OVERRIDE_DISABLE),      
 
  148     GPIO_IN_ANALOG  = ((uint8_t)OVERRIDE_ANALOG),       
 
  151     GPIO_OUT        = ((uint8_t)OVERRIDE_ENABLE),       
 
  166 #ifdef MODULE_PERIPH_UART_HW_FC 
  178 #define HAVE_UART_PARITY_T 
  192 #define HAVE_UART_DATA_BITS_T 
  205 #define HAVE_UART_STOP_BITS_T 
  215 #ifndef UART_TXBUF_SIZE 
  216 #define UART_TXBUF_SIZE    (64) 
  222 #define SPI_CS_UNDEF        (GPIO_UNDEF) 
  229 #define HAVE_SPI_CS_T 
  238 #define HAVE_SPI_MODE_T 
  251 #define HAVE_SPI_CLK_T 
  270 #ifndef BOARD_HAS_SPI_CLK_CONF 
  279     { .
cpsr = 64, .scr =  4 },  
 
  280     { .cpsr = 16, .scr =  4 },  
 
  281     { .cpsr = 32, .scr =  0 },  
 
  282     { .cpsr =  2, .scr =  2 },  
 
  283     { .cpsr =  2, .scr =  1 }   
 
  316 #define HAVE_ADC_RES_T 
  319     ADC_RES_7BIT  =             (0 << 4),   
 
  321     ADC_RES_9BIT  =             (1 << 4),   
 
  339 #define SOC_ADC_ADCCON3_EREF_INT      (0 << SOC_ADC_ADCCON3_EREF_S)     
  340 #define SOC_ADC_ADCCON3_EREF_EXT      (1 << SOC_ADC_ADCCON3_EREF_S)     
  341 #define SOC_ADC_ADCCON3_EREF_AVDD5    (2 << SOC_ADC_ADCCON3_EREF_S)     
  342 #define SOC_ADC_ADCCON3_EREF_DIFF     (3 << SOC_ADC_ADCCON3_EREF_S)     
  349 #define SOCADC_7_BIT_RSHIFT     (9U)  
  350 #define SOCADC_9_BIT_RSHIFT     (7U)  
  351 #define SOCADC_10_BIT_RSHIFT    (6U)  
  352 #define SOCADC_12_BIT_RSHIFT    (4U)  
  359 #define RTT_DEV             SMWDTHROSC 
  360 #define RTT_IRQ             SM_TIMER_ALT_IRQn 
  361 #define RTT_IRQ_PRIO        1 
  362 #define RTT_ISR             isr_sleepmode 
  363 #define RTT_MAX_VALUE       (0xffffffff) 
  364 #define RTT_FREQUENCY       (CLOCK_OSC32K) 
  368 #define RTT_MIN_OFFSET      (5U) 
  377 #define NWDT_TIME_LOWER_LIMIT          (2U) 
  378 #define NWDT_TIME_UPPER_LIMIT          (1000U) 
@ GPIO_OUT
select GPIO MASK as output
 
@ GPIO_IN
select GPIO MASK as input
 
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)
 
gpio_mode_t
Available pin modes.
 
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.
 
unsigned int gpio_t
GPIO type identifier.
 
@ GPIO_OD
configure as output in open-drain mode without pull resistor
 
@ GPIO_IN_PU
configure as input with pull-up resistor
 
@ GPIO_OD_PU
configure as output in open-drain mode with pull resistor enabled
 
@ GPIO_IN_PD
configure as input with pull-down resistor
 
@ 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
 
gpio_t spi_cs_t
Chip select pin type overlaps with gpio_t so it can be casted to this.
 
@ 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.
 
@ 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
 
@ 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_2
2 stop bits
 
@ UART_STOP_BITS_1
1 stop bit
 
@ 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
 
spi_mode_t
Support SPI modes.
 
uart_parity_t
Definition of possible parity modes.
 
uart_stop_bits_t
Definition of possible stop bits lengths.
 
uart_data_bits_t
Definition of possible data bits lengths in a UART frame.
 
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