25#include "periph_cpu.h"
35#define HFXO_FREQ (39000000UL)
36#define CMU_HFXOINIT CMU_HFXOINIT_DEFAULT
38#define LFXO_FREQ (32768UL)
39#define CMU_LFXOINIT CMU_LFXOINIT_DEFAULT
41static const clk_mux_t clk_mux_config[] = {
42 { .
clk = cmuClock_SYSCLK, .src = cmuSelect_HFXO },
43 { .clk = cmuClock_EM01GRPACLK, .src = cmuSelect_HFXO },
44 { .clk = cmuClock_EM01GRPCCLK, .src = cmuSelect_HFXO },
45 { .clk = cmuClock_EM23GRPACLK, .src = cmuSelect_LFXO },
46 { .clk = cmuClock_EUSART0CLK, .src = cmuSelect_HFXO },
48#define CLK_MUX_NUMOF ARRAY_SIZE(clk_mux_config)
50static const clk_div_t clk_div_config[] = {
51 { .
clk = cmuClock_HCLK, .div = 1 },
52 { .clk = cmuClock_PCLK, .div = 1 },
53 { .clk = cmuClock_LSPCLK, .div = 2 },
55#define CLK_DIV_NUMOF ARRAY_SIZE(clk_div_config)
65 .cmu = cmuClock_IADC0,
66 .reference = iadcCfgReferenceInt1V2,
68 .gain = iadcCfgAnalogGain0P5x,
86#define ADC_DEV_NUMOF ARRAY_SIZE(adc_config)
87#define ADC_NUMOF ARRAY_SIZE(adc_channel_config)
105#define I2C_NUMOF ARRAY_SIZE(i2c_config)
106#define I2C_0_ISR isr_i2c0
119 .cmu = cmuClock_USART0,
120 .irq = USART0_RX_IRQn
124#define SPI_NUMOF ARRAY_SIZE(spi_config)
137 .cmu = cmuClock_TIMER0,
142 .cmu = cmuClock_LETIMER0,
147#define TIMER_0_ISR isr_timer0
148#define TIMER_1_ISR isr_letimer0
150#define TIMER_0_MAX_VALUE TIMER_MAX_VALUE
151#define TIMER_1_MAX_VALUE LETIMER_MAX_VALUE
153#define TIMER_NUMOF ARRAY_SIZE(timer_config)
165 .cmu = cmuClock_EUSART1,
166 .irq = EUSART1_RX_IRQn
169#define UART_0_ISR_RX isr_eusart1_rx
171#define UART_NUMOF ARRAY_SIZE(uart_config)
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
#define GPIO_UNDEF
Definition of a fitting UNDEF value.
@ I2C_SPEED_NORMAL
normal mode: ~100 kbit/s
@ ADC_RES_16BIT
ADC resolution: 16 bit.
@ ADC_RES_10BIT
ADC resolution: 10 bit.
ADC channel configuration.
ADC device configuration.
ADC_TypeDef * dev
ADC device used.
Clock divider configuration.
CMU_Clock_TypeDef clk
Clock domain.
CMU_Clock_TypeDef clk
Clock domain.
I2C configuration structure.
TWI_t * dev
Pointer to hardware module registers.
SPI device configuration.
USART_TypeDef * dev
USART device used.
Timer device configuration.
TC0_t * dev
Pointer to the used as Timer device.
UART device configuration.
USART_t * dev
pointer to the used UART device