Go to the documentation of this file.
30 #include "em_device.h"
35 #if defined(_SILICON_LABS_32B_SERIES_0)
47 #define ADC_MODE(x, y) ((y << 4) | x)
52 #define ADC_MODE_UNDEF(x) (ADC_MODE(x, 15))
59 #define HAVE_ADC_RES_T
76 CMU_Clock_TypeDef
cmu;
84 #if defined(_SILICON_LABS_32B_SERIES_0)
85 ADC_SingleInput_TypeDef input;
86 #elif defined(_SILICON_LABS_32B_SERIES_1)
87 ADC_PosSel_TypeDef input;
96 #define CPUID_LEN (8U)
101 #define CLOCK_CORECLOCK SystemCoreClock
103 #if defined(DAC_COUNT) && DAC_COUNT > 0
109 CMU_Clock_TypeDef cmu;
133 #define GPIO_UNDEF (0xffffffff)
138 #define GPIO_PIN(x, y) ((gpio_t) ((x << 4) | y))
143 #define GPIO_MODE(x, y) ((x << 1) | y)
149 #if (_GPIO_PORT_A_PIN_COUNT > 0)
152 #if (_GPIO_PORT_B_PIN_COUNT > 0)
155 #if (_GPIO_PORT_C_PIN_COUNT > 0)
158 #if (_GPIO_PORT_D_PIN_COUNT > 0)
161 #if (_GPIO_PORT_E_PIN_COUNT > 0)
164 #if (_GPIO_PORT_F_PIN_COUNT > 0)
167 #if (_GPIO_PORT_G_PIN_COUNT > 0)
170 #if (_GPIO_PORT_H_PIN_COUNT > 0)
173 #if (_GPIO_PORT_I_PIN_COUNT > 0)
176 #if (_GPIO_PORT_J_PIN_COUNT > 0)
179 #if (_GPIO_PORT_K_PIN_COUNT > 0)
189 #define HAVE_GPIO_MODE_T
204 #define HAVE_GPIO_FLANK_T
217 #define HAVE_HWCRYPTO_AES128
218 #ifdef AES_CTRL_AES256
219 #define HAVE_HWCRYPTO_AES256
221 #if defined(_SILICON_LABS_32B_SERIES_1)
222 #define HAVE_HWCRYPTO_SHA1
223 #define HAVE_HWCRYPTO_SHA256
232 #define HAVE_I2C_SPEED_T
260 #define PERIPH_I2C_NEED_READ_REG
261 #define PERIPH_I2C_NEED_WRITE_REG
269 #define HAVE_PWM_MODE_T
303 #define HAVE_SPI_MODE_T
316 #define HAVE_SPI_CLK_T
344 #define PERIPH_SPI_NEEDS_INIT_CS
345 #define PERIPH_SPI_NEEDS_TRANSFER_BYTE
346 #define PERIPH_SPI_NEEDS_TRANSFER_REG
347 #define PERIPH_SPI_NEEDS_TRANSFER_REGS
374 #ifndef CONFIG_EFM32_XTIMER_USE_LETIMER
375 #define CONFIG_EFM32_XTIMER_USE_LETIMER 0
387 #define HAVE_UART_PARITY_T
401 #define HAVE_UART_DATA_BITS_T
414 #define HAVE_UART_STOP_BITS_T
434 #define PROVIDES_PM_LAYERED_OFF
439 #define PM_NUM_MODES (2U)
445 #define WDT_CLOCK_HZ (1000U)
447 #define NWDT_TIME_LOWER_LIMIT ((1U << (3U + wdogPeriod_9)) + 1U)
448 #define NWDT_TIME_UPPER_LIMIT ((1U << (3U + wdogPeriod_256k)) + 1U)
450 #ifdef _SILICON_LABS_32B_SERIES_1
451 #define WDT_TIME_LOWER_LIMIT NWDT_TIME_LOWER_LIMIT
452 #define WDT_TIME_UPPER_LIMIT NWDT_TIME_UPPER_LIMIT
455 #define WDT_HAS_STOP (1U)
@ SPI_CLK_400KHZ
drive the SPI bus with 400KHz
@ SPI_MODE_3
CPOL=1, CPHA=1.
@ UART_PARITY_NONE
no parity
@ UART_DATA_BITS_5
5 data bits
USART_TypeDef * dev
USART device used.
PWM channel configuration.
@ SPI_CLK_100KHZ
drive the SPI bus with 100KHz
@ ADC_RES_6BIT
ADC resolution: 6 bit.
CMU_Clock_TypeDef cmu
the device CMU channel
uart_stop_bits_t
Definition of possible stop bits lengths in a UART frame.
@ I2C_SPEED_LOW
low speed mode: ~10 kbit/s
IRQn_Type irq
number of the higher timer IRQ channel
Common macros and compiler attributes/pragmas configuration.
@ GPIO_IN_PD
configure as input with pull-down resistor
@ UART_STOP_BITS_2
2 stop bits
ADC channel configuration.
@ SPI_MODE_0
CPOL=0, CPHA=0.
@ GPIO_OD
configure as output in open-drain mode without pull resistor
uint32_t loc
location of I2C pins
@ I2C_SPEED_NORMAL
normal mode: ~100 kbit/s
enum IRQn IRQn_Type
Interrupt Number Definition.
ADC_TypeDef * dev
ADC device used.
@ UART_DATA_BITS_8
8 data bits
@ ADC_RES_14BIT
ADC resolution: 14 bit.
adc_res_t
Possible ADC resolution settings.
IRQn_Type irq
the devices base IRQ channel
uint8_t channel_numof
number of channels per timer
uint32_t loc
location of USART pins
void * dev
TIMER_TypeDef or LETIMER_TypeDef device used.
Define timer configuration values.
SPI device configuration.
const pwm_chan_conf_t * channel
pointer to first channel config
gpio_t clk_pin
pin used for CLK
@ GPIO_OUT
configure as output in push-pull mode
@ ADC_RES_16BIT
ADC resolution: 16 bit.
#define ADC_MODE_UNDEF(x)
Internal define to note that resolution is not supported.
@ UART_DATA_BITS_6
6 data bits
uint32_t loc
location of UART pins
timer_dev_t prescaler
the lower neighboring timer (not initialized for LETIMER)
Implementation specific CPU configuration options.
uart_parity_t
Definition of possible parity modes.
i2c_speed_t
Default mapping of I2C bus speed values.
spi_mode_t
Available SPI modes, defining the configuration of clock polarity and clock phase.
@ ADC_RES_8BIT
ADC resolution: 8 bit.
IRQn_Type irq
the devices base IRQ channel
uint32_t loc
location of the pin
@ GPIO_FALLING
emit interrupt on falling flank
@ GPIO_IN_PU
configure as input with pull-up resistor
@ GPIO_RISING
emit interrupt on rising flank
#define GPIO_MODE(x, y)
Internal macro for combining pin mode (x) and pull-up/down (y).
PWM device configuration.
@ PWM_LEFT
left aligned PWM
uint8_t index
TIMER channel to use.
ADC_AcqTime_TypeDef acq_time
channel acquisition time
@ SPI_CLK_10MHZ
drive the SPI bus with 10MHz
uint32_t spi_clk_t
SPI clock type.
@ GPIO_IN
configure as input without pull resistor
UART device configuration.
@ SPI_CLK_5MHZ
drive the SPI bus with 5MHz
DAC line configuration data.
@ GPIO_OD_PU
configure as output in open-drain mode with pull resistor enabled
@ UART_PARITY_SPACE
space parity
@ PWM_RIGHT
right aligned PWM
IRQn_Type irq
the devices base IRQ channel
void * dev
UART, USART or LEUART device used.
@ GPIO_BOTH
emit interrupt on both flanks
@ UART_PARITY_EVEN
even parity
uint32_t speed
the bus speed
IRQn_Type irq
the devices base IRQ channel
gpio_t adc_conf_t
ADC configuration wrapper.
Mutex for thread synchronization.
CMU_Clock_TypeDef cmu
the device CMU channel
CMU_Clock_TypeDef cmu
the device CMU channel
#define ADC_MODE(x, y)
Internal macro for combining ADC resolution (x) with number of shifts (y).
gpio_t miso_pin
pin used for MISO
gpio_mode_t
Available pin modes.
@ ADC_RES_10BIT
ADC resolution: 10 bit.
@ UART_DATA_BITS_7
7 data bits
CMU_Clock_TypeDef cmu
the device CMU channel
@ ADC_RES_12BIT
ADC resolution: 12 bit.
gpio_t pin
pin used for pwm
@ UART_PARITY_MARK
mark parity
@ UART_STOP_BITS_1
1 stop bit
uart_data_bits_t
Definition of possible data bits lengths in a UART frame.
@ UART_PARITY_ODD
odd parity
unsigned int gpio_t
GPIO type identifier.
I2C configuration options.
@ I2C_SPEED_FAST_PLUS
fast plus mode: ~1000 kbit/s
gpio_t mosi_pin
pin used for MOSI
@ SPI_CLK_1MHZ
drive the SPI bus with 1MHz
timer_dev_t timer
the higher numbered timer
@ I2C_SPEED_FAST
fast mode: ~400 kbit/s
TIMER_TypeDef * dev
TIMER device used.
@ I2C_SPEED_HIGH
high speed mode: ~3400 kbit/s
ADC_Ref_TypeDef reference
channel voltage reference
I2C_TypeDef * dev
USART device used.
@ SPI_MODE_1
CPOL=0, CPHA=1.
CMU_Clock_TypeDef cmu
the device CMU channel
CMU_Clock_TypeDef cmu
the device CMU channel
@ PWM_CENTER
not supported
uint8_t channels
the number of available channels
@ SPI_MODE_2
CPOL=1, CPHA=0.