periph_conf.h File Reference

Configuration of CPU peripherals for the IKEA TRÅDFRI modules. More...

Detailed Description

Configuration of CPU peripherals for the IKEA TRÅDFRI modules.

Author
Bas Stottelaar basst.nosp@m.otte.nosp@m.laar@.nosp@m.gmai.nosp@m.l.com

Definition in file periph_conf.h.

#include "cpu.h"
#include "periph_cpu.h"
#include "em_cmu.h"
+ Include dependency graph for periph_conf.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Clock configuration

#define CLOCK_HF   cmuSelect_HFRCO
 
#define CLOCK_CORE_DIV   cmuClkDiv_1
 
#define CLOCK_LFA   cmuSelect_LFRCO
 
#define CLOCK_LFB   cmuSelect_LFRCO
 
#define CLOCK_LFE   cmuSelect_LFRCO
 

ADC configuration

#define ADC_DEV_NUMOF   ARRAY_SIZE(adc_config)
 
#define ADC_NUMOF   ARRAY_SIZE(adc_channel_config)
 
static const adc_conf_t adc_config []
 
static const adc_chan_conf_t adc_channel_config []
 

RTT configuration

#define RTT_MAX_VALUE   (0xFFFFFFFF)
 
#define RTT_FREQUENCY   (1U)
 

SPI configuration

#define SPI_NUMOF   ARRAY_SIZE(spi_config)
 
static const spi_dev_t spi_config []
 

Timer configuration

The implementation can use one low-energy timer or two regular timers in cascade mode.

#define TIMER_0_ISR   isr_timer1
 
#define TIMER_1_ISR   isr_letimer0
 
#define TIMER_NUMOF   ARRAY_SIZE(timer_config)
 
static const timer_conf_t timer_config []
 

UART configuration

#define EFM32_USE_LEUART   0
 
#define UART_0_ISR_RX   isr_usart0_rx
 
#define UART_NUMOF   ARRAY_SIZE(uart_config)
 
static const uart_conf_t uart_config []
 

Variable Documentation

◆ adc_channel_config

const adc_chan_conf_t adc_channel_config[]
static
Initial value:
= {
{
.dev = 0,
.input = adcPosSelTEMP,
.reference = adcRef1V25,
.acq_time = adcAcqTime8
},
{
.dev = 0,
.input = adcPosSelAVDD,
.reference = adcRef5V,
.acq_time = adcAcqTime8
}
}

Definition at line 62 of file periph_conf.h.

◆ adc_config

const adc_conf_t adc_config[]
static
Initial value:
= {
{
.dev = ADC0,
.cmu = cmuClock_ADC0,
}
}

Definition at line 55 of file periph_conf.h.

◆ spi_config

const spi_dev_t spi_config[]
static
Initial value:
= {
{
.dev = USART1,
.mosi_pin = GPIO_PIN(PD, 15),
.miso_pin = GPIO_PIN(PD, 14),
.clk_pin = GPIO_PIN(PD, 13),
.loc = USART_ROUTELOC0_RXLOC_LOC21 |
USART_ROUTELOC0_TXLOC_LOC23 |
USART_ROUTELOC0_CLKLOC_LOC19,
.cmu = cmuClock_USART1,
.irq = USART1_RX_IRQn
}
}

Definition at line 93 of file periph_conf.h.

◆ timer_config

const timer_conf_t timer_config[]
static
Initial value:
= {
{
.prescaler = {
.dev = TIMER0,
.cmu = cmuClock_TIMER0
},
.timer = {
.dev = TIMER1,
.cmu = cmuClock_TIMER1
},
.irq = TIMER1_IRQn,
.channel_numof = 3
},
{
.prescaler = {
.dev = NULL,
.cmu = cmuClock_LETIMER0
},
.timer = {
.dev = LETIMER0,
.cmu = cmuClock_LETIMER0
},
.irq = LETIMER0_IRQn,
.channel_numof = 2
}
}

Definition at line 117 of file periph_conf.h.

◆ uart_config

const uart_conf_t uart_config[]
static
Initial value:
= {
{
.dev = USART0,
.rx_pin = GPIO_PIN(PB, 15),
.tx_pin = GPIO_PIN(PB, 14),
.loc = USART_ROUTELOC0_RXLOC_LOC9 |
USART_ROUTELOC0_TXLOC_LOC9,
.cmu = cmuClock_USART0,
.irq = USART0_RX_IRQn
}
}

Definition at line 179 of file periph_conf.h.

PD
@ PD
port D
Definition: periph_cpu_common.h:91
PB
@ PB
port B
Definition: periph_cpu_common.h:89
GPIO_PIN
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
Definition: periph_cpu.h:35