periph_conf.h File Reference

Configuration of CPU peripherals for the SODAQ SARA AFF boards. More...

Detailed Description

Configuration of CPU peripherals for the SODAQ SARA AFF boards.

Author
Kees Bakker kees@.nosp@m.soda.nosp@m.q.com
Leandro Lanzieri leand.nosp@m.ro.l.nosp@m.anzie.nosp@m.ri@h.nosp@m.aw-ha.nosp@m.mbur.nosp@m.g.de

Definition in file periph_conf.h.

#include <stdint.h>
#include "cpu.h"
#include "periph_cpu.h"
#include "cfg_clock_default.h"
#include "cfg_rtc_default.h"
#include "cfg_rtt_default.h"
#include "cfg_spi_default.h"
#include "cfg_timer_default.h"
#include "cfg_usbdev_default.h"
+ Include dependency graph for periph_conf.h:

Go to the source code of this file.

UART configuration

See Table 7-1 of the SAM D21 Datasheet (p.

29)

#define UART_0_ISR   isr_sercom5
 
#define UART_1_ISR   isr_sercom0
 
#define UART_NUMOF   ARRAY_SIZE(uart_config)
 
static const uart_conf_t uart_config []
 

ADC configuration

#define ADC_PRESCALER   ADC_CTRLB_PRESCALER_DIV512
 
#define ADC_NEG_INPUT   ADC_INPUTCTRL_MUXNEG_GND
 
#define ADC_GAIN_FACTOR_DEFAULT   ADC_INPUTCTRL_GAIN_DIV2
 
#define ADC_REF_DEFAULT   ADC_REFCTRL_REFSEL_INTVCC1
 
#define ADC_NUMOF   ARRAY_SIZE(adc_channels)
 
static const adc_conf_chan_t adc_channels []
 

I2C configuration

#define I2C_NUMOF   ARRAY_SIZE(i2c_config)
 
static const i2c_conf_t i2c_config []
 

Variable Documentation

◆ adc_channels

const adc_conf_chan_t adc_channels[]
static
Initial value:
= {
{GPIO_PIN(PB, 0), ADC_INPUTCTRL_MUXPOS_PIN8},
{GPIO_PIN(PB, 1), ADC_INPUTCTRL_MUXPOS_PIN9},
{GPIO_PIN(PB, 2), ADC_INPUTCTRL_MUXPOS_PIN10},
{GPIO_PIN(PB, 3), ADC_INPUTCTRL_MUXPOS_PIN11},
{GPIO_PIN(PA, 8), ADC_INPUTCTRL_MUXPOS_PIN16},
{GPIO_PIN(PA, 9), ADC_INPUTCTRL_MUXPOS_PIN17},
{GPIO_PIN(PA, 10), ADC_INPUTCTRL_MUXPOS_PIN18},
{GPIO_PIN(PA, 11), ADC_INPUTCTRL_MUXPOS_PIN19},
{GPIO_PIN(PB, 5), ADC_INPUTCTRL_MUXPOS_PIN13},
{GPIO_PIN(PA, 2), ADC_INPUTCTRL_MUXPOS_PIN0},
{GPIO_PIN(PA, 3), ADC_INPUTCTRL_MUXPOS_PIN1},
}
port A
Definition: periph_cpu.h:87
port B
Definition: periph_cpu.h:88
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
Definition: periph_cpu.h:35

Definition at line 86 of file periph_conf.h.

◆ i2c_config

const i2c_conf_t i2c_config[]
static
Initial value:
= {
{
.dev = &(SERCOM1->I2CM),
.speed = I2C_SPEED_NORMAL,
.scl_pin = GPIO_PIN(PA, 17),
.sda_pin = GPIO_PIN(PA, 16),
.mux = GPIO_MUX_C,
.gclk_src = GCLK_CLKCTRL_GEN_GCLK0,
.flags = I2C_FLAG_NONE
}
}
No flags set.
port A
Definition: periph_cpu.h:87
select peripheral function C
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
Definition: periph_cpu.h:35
normal mode: ~100 kbit/s
Definition: i2c.h:183

Definition at line 108 of file periph_conf.h.

◆ uart_config

const uart_conf_t uart_config[]
static
Initial value:
= {
{
.dev = &SERCOM5->USART,
.rx_pin = GPIO_PIN(PB, 30),
.tx_pin = GPIO_PIN(PB, 31),
.mux = GPIO_MUX_D,
.rx_pad = UART_PAD_RX_1,
.tx_pad = UART_PAD_TX_0,
.flags = UART_FLAG_NONE,
.gclk_src = GCLK_CLKCTRL_GEN_GCLK0
},
{
.dev = &SERCOM0->USART,
.rx_pin = GPIO_PIN(PA,5),
.tx_pin = GPIO_PIN(PA,6),
.mux = GPIO_MUX_D,
.rx_pad = UART_PAD_RX_1,
.tx_pad = UART_PAD_TX_2,
.flags = UART_FLAG_NONE,
.gclk_src = GCLK_CLKCTRL_GEN_GCLK0
},
}
select peripheral function D
port A
Definition: periph_cpu.h:87
port B
Definition: periph_cpu.h:88
select pad 1
select pad 0
No flags set.
select pad 2
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
Definition: periph_cpu.h:35

Definition at line 44 of file periph_conf.h.