25 #if defined(_SILICON_LABS_32B_SERIES_2) 
   31 #include "em_device.h" 
   37 #if defined(_SILICON_LABS_32B_SERIES_0) 
   39 #elif defined (_SILICON_LABS_32B_SERIES_1) || defined(_SILICON_LABS_32B_SERIES_2) 
   51     CMU_Clock_TypeDef 
clk;   
 
   52     CMU_Select_TypeDef 
src;  
 
   59     CMU_Clock_TypeDef 
clk;   
 
   60     CMU_ClkDiv_TypeDef 
div;  
 
   66 #define CPUID_LEN           (8U) 
   71 #define CLOCK_CORECLOCK     SystemCoreClock 
   73 #if defined(DAC_COUNT) && DAC_COUNT > 0 
   80     CMU_Clock_TypeDef cmu;  
 
   91 #elif defined(VDAC_COUNT) && VDAC_COUNT > 0 
   98     CMU_Clock_TypeDef cmu;  
 
  115 #if defined(_RTC_CNT_MASK) 
  116 #define RTT_MAX_VALUE       _RTC_CNT_MASK         
  117 #elif defined(_RTCC_CNT_MASK) 
  118 #define RTT_MAX_VALUE       _RTCC_CNT_MASK        
  120 #define RTT_MAX_FREQUENCY   (32768U)              
  121 #define RTT_MIN_FREQUENCY   (1U)                  
  122 #define RTT_CLOCK_FREQUENCY (32768U)              
  137 #define GPIO_UNDEF          (0xffffffff) 
  142 #define GPIO_PIN(x, y)      ((gpio_t) ((x << 4) | y)) 
  147 #define GPIO_MODE(x, y)     ((x << 1) | y) 
  153 #if (_GPIO_PORT_A_PIN_COUNT > 0) 
  156 #if (_GPIO_PORT_B_PIN_COUNT > 0) 
  159 #if (_GPIO_PORT_C_PIN_COUNT > 0) 
  162 #if (_GPIO_PORT_D_PIN_COUNT > 0) 
  165 #if (_GPIO_PORT_E_PIN_COUNT > 0) 
  168 #if (_GPIO_PORT_F_PIN_COUNT > 0) 
  171 #if (_GPIO_PORT_G_PIN_COUNT > 0) 
  174 #if (_GPIO_PORT_H_PIN_COUNT > 0) 
  177 #if (_GPIO_PORT_I_PIN_COUNT > 0) 
  180 #if (_GPIO_PORT_J_PIN_COUNT > 0) 
  183 #if (_GPIO_PORT_K_PIN_COUNT > 0) 
  193 #define HAVE_GPIO_MODE_T 
  208 #define HAVE_GPIO_FLANK_T 
  217 #if defined(_SILICON_LABS_32B_SERIES_2) 
  225 #if defined(_IADC_CFG_DIGAVG_MASK) 
  226 #define ADC_MODE(osr, avg, res)  ((osr << 16) | (avg << 8) | res) 
  228 #define ADC_MODE(osr, res)  ((osr << 16) | res) 
  234 #define ADC_MODE_OSR(mode)       ((mode & 0xff0000) >> 16) 
  236 #if defined(_IADC_CFG_DIGAVG_MASK) 
  240 #define ADC_MODE_AVG(mode)       ((mode & 0x00ff00) >> 8) 
  246 #define ADC_MODE_RES(mode)       ((mode & 0x0000ff) >> 0) 
  252 #define HAVE_ADC_RES_T 
  253 #if defined(_IADC_CFG_DIGAVG_MASK) 
  285     CMU_Clock_TypeDef cmu;
 
  290     IADC_CfgReference_t reference;
 
  297     uint32_t reference_mV;
 
  305     IADC_CfgAnalogGain_t gain;
 
  314     adc_res_t available_res[IADC0_CONFIGNUM];
 
  347 #define ADC_MODE(x, y)      ((y << 4) | x) 
  352 #define ADC_MODE_UNDEF(x)   (ADC_MODE(x, 15)) 
  359 #define HAVE_ADC_RES_T 
  384 #if defined(_SILICON_LABS_32B_SERIES_0) 
  385     ADC_SingleInput_TypeDef input;    
 
  386 #elif defined(_SILICON_LABS_32B_SERIES_1) 
  387     ADC_PosSel_TypeDef input;         
 
  398 #define HAVE_HWCRYPTO_AES128 
  399 #ifdef AES_CTRL_AES256 
  400 #define HAVE_HWCRYPTO_AES256 
  402 #if defined(_SILICON_LABS_32B_SERIES_1) 
  403 #define HAVE_HWCRYPTO_SHA1 
  404 #define HAVE_HWCRYPTO_SHA256 
  413 #define HAVE_I2C_SPEED_T 
  431 #if defined(_SILICON_LABS_32B_SERIES_0) || defined(_SILICON_LABS_32B_SERIES_1) 
  443 #define PERIPH_I2C_NEED_READ_REG 
  444 #define PERIPH_I2C_NEED_WRITE_REG 
  452 #define HAVE_PWM_MODE_T 
  486 #define HAVE_SPI_MODE_T 
  499 #define HAVE_SPI_CLK_T 
  518 #if defined(_SILICON_LABS_32B_SERIES_0) || defined(_SILICON_LABS_32B_SERIES_1) 
  529 #define PERIPH_SPI_NEEDS_INIT_CS 
  530 #define PERIPH_SPI_NEEDS_TRANSFER_BYTE 
  531 #define PERIPH_SPI_NEEDS_TRANSFER_REG 
  532 #define PERIPH_SPI_NEEDS_TRANSFER_REGS 
  543 #if defined(_SILICON_LABS_32B_SERIES_0) || defined(_SILICON_LABS_32B_SERIES_1) || defined(DOXYGEN) 
  551 #if defined(_SILICON_LABS_32B_SERIES_0) || defined(_SILICON_LABS_32B_SERIES_1) || defined(DOXYGEN) 
  558     CMU_Clock_TypeDef cmu;  
 
  563 #define LETIMER_MAX_VALUE _LETIMER_TOP_MASK   
  564 #define TIMER_MAX_VALUE _TIMER_TOP_MASK       
  570 #ifndef CONFIG_EFM32_XTIMER_USE_LETIMER 
  571 #define CONFIG_EFM32_XTIMER_USE_LETIMER   0 
  581 #define UART_MODE_UNSUPPORTED 0xf0 
  587 #define HAVE_UART_PARITY_T 
  588 #if defined(_SILICON_LABS_32B_SERIES_0) || defined(_SILICON_LABS_32B_SERIES_1) 
  611 #define HAVE_UART_DATA_BITS_T 
  612 #if defined(_SILICON_LABS_32B_SERIES_0) || defined(_SILICON_LABS_32B_SERIES_1) 
  633 #define HAVE_UART_STOP_BITS_T 
  634 #if defined(_SILICON_LABS_32B_SERIES_0) || defined(_SILICON_LABS_32B_SERIES_1) 
  652 #if defined(_SILICON_LABS_32B_SERIES_0) || defined(_SILICON_LABS_32B_SERIES_1) || defined(DOXYGEN) 
  662 #define PROVIDES_PM_OFF 
  667 #define PROVIDES_PM_LAYERED_OFF 
  672 #define PM_NUM_MODES    (3U) 
  678 #define EFM32_PM_MODE_EM3  (0U)   
  679 #define EFM32_PM_MODE_EM2  (1U)   
  680 #define EFM32_PM_MODE_EM1  (2U)   
  687 #define WDT_CLOCK_HZ            (1000U) 
  689 #define NWDT_TIME_LOWER_LIMIT   ((1U << (3U + wdogPeriod_9)) + 1U) 
  690 #define NWDT_TIME_UPPER_LIMIT   ((1U << (3U + wdogPeriod_256k)) + 1U) 
  692 #if defined(_SILICON_LABS_32B_SERIES_1) || defined(_SILICON_LABS_32B_SERIES_2) 
  693 #define WDT_TIME_LOWER_LIMIT    NWDT_TIME_LOWER_LIMIT 
  694 #define WDT_TIME_UPPER_LIMIT    NWDT_TIME_UPPER_LIMIT 
  697 #define WDT_HAS_STOP            (1U) 
  704 #define USBDEV_NUM_ENDPOINTS    7    
  711 #define HAVE_GPIO_SLEW_T 
  720 #define HAVE_GPIO_PULL_STRENGTH_T 
  729 #define HAVE_GPIO_DRIVE_STRENGTH_T 
@ GPIO_OUT
select GPIO MASK as output
 
@ GPIO_IN
select GPIO MASK as input
 
gpio_t adc_conf_t
ADC configuration wrapper.
 
#define GPIO_MODE(x, y)
Internal macro for combining pin mode (x) and pull-up/down (y).
 
#define ADC_MODE(x, y)
Internal macro for combining ADC resolution (x) with number of shifts (y).
 
#define ADC_MODE_UNDEF(x)
Internal define to note that resolution is not supported.
 
enum IRQn IRQn_Type
Interrupt Number Definition.
 
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.
 
gpio_pull_strength_t
Enumeration of pull resistor values.
 
gpio_slew_t
Enumeration of slew rate settings.
 
gpio_drive_strength_t
Enumeration of drive strength options.
 
@ GPIO_PULL_WEAKEST
Use the weakest (highest Ohm value) resistor.
 
@ GPIO_PULL_WEAK
Use a weak pull resistor.
 
@ GPIO_PULL_STRONG
Use a strong pull resistor.
 
@ GPIO_PULL_STRONGEST
Use the strongest pull resistor.
 
@ GPIO_SLEW_SLOWEST
let the output voltage level rise/fall as slow as possible
 
@ GPIO_SLEW_FAST
let the output voltage level rise/fall fast
 
@ GPIO_SLEW_SLOW
let the output voltage level rise/fall slowly
 
@ GPIO_SLEW_FASTEST
let the output voltage level rise/fall as fast as possible
 
@ GPIO_DRIVE_STRONG
Use a strong drive strength.
 
@ GPIO_DRIVE_WEAK
Use a weak drive strength.
 
@ GPIO_DRIVE_STRONGEST
Use the strongest drive strength.
 
@ GPIO_DRIVE_WEAKEST
Use the weakest drive strength.
 
unsigned int gpio_t
GPIO type identifier.
 
@ GPIO_FALLING
emit interrupt on falling flank
 
@ GPIO_RISING
emit interrupt on rising flank
 
@ GPIO_BOTH
emit interrupt on both flanks
 
@ 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
 
@ PWM_CENTER
center aligned
 
@ 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
 
Common macros and compiler attributes/pragmas configuration.
 
spi_mode_t
Support SPI modes.
 
Mutex for thread synchronization.
 
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.
 
Implementation specific CPU configuration options.
 
ADC channel configuration.
 
ADC_AcqTime_TypeDef acq_time
channel acquisition time
 
ADC_Ref_TypeDef reference
channel voltage reference
 
ADC_TypeDef * dev
ADC device used.
 
CMU_Clock_TypeDef cmu
the device CMU channel
 
Clock divider configuration.
 
CMU_ClkDiv_TypeDef div
Divisor.
 
CMU_Clock_TypeDef clk
Clock domain.
 
CMU_Select_TypeDef src
Source clock.
 
CMU_Clock_TypeDef clk
Clock domain.
 
DAC line configuration data.
 
I2C configuration structure.
 
CMU_Clock_TypeDef cmu
the device CMU channel
 
I2C_TypeDef * dev
USART device used.
 
uint32_t speed
the bus speed
 
IRQn_Type irq
the devices base IRQ channel
 
PWM channel configuration.
 
uint32_t loc
location of the pin
 
uint8_t index
TIMER channel to use.
 
gpio_t pin
pin used for pwm
 
PWM device configuration.
 
IRQn_Type irq
the devices base IRQ channel
 
const pwm_chan_conf_t * channel
pointer to first channel config
 
TIMER_TypeDef * dev
TIMER device used.
 
CMU_Clock_TypeDef cmu
the device CMU channel
 
uint8_t channels
the number of available channels
 
SPI device configuration.
 
gpio_t clk_pin
pin used for CLK
 
gpio_t mosi_pin
pin used for MOSI
 
USART_TypeDef * dev
USART device used.
 
CMU_Clock_TypeDef cmu
the device CMU channel
 
IRQn_Type irq
the devices base IRQ channel
 
gpio_t miso_pin
pin used for MISO
 
Timer device configuration.
 
IRQn_Type irq
number of the higher timer IRQ channel
 
timer_dev_t prescaler
the lower neighboring timer (not initialized for LETIMER)
 
timer_dev_t timer
the higher numbered timer
 
uint8_t channel_numof
number of channels per timer
 
Define timer configuration values.
 
void * dev
TIMER_TypeDef or LETIMER_TypeDef device used.
 
CMU_Clock_TypeDef cmu
the device CMU channel
 
UART device configuration.
 
CMU_Clock_TypeDef cmu
the device CMU channel
 
IRQn_Type irq
the devices base IRQ channel
 
uint32_t loc
location of UART pins
 
void * dev
UART, USART or LEUART device used.