periph_conf.h File Reference

Peripheral MCU configuration for the ATxmegaA1 Xplained board. More...

Detailed Description

Peripheral MCU configuration for the ATxmegaA1 Xplained board.

Gerson Fernando Budke

Definition in file periph_conf.h.

#include "mutex.h"
#include <stdint.h>
#include <avr/io.h>
#include "periph_cpu.h"
#include "periph_conf_common.h"
+ Include dependency graph for periph_conf.h:

Go to the source code of this file.

Timer peripheral configuration

#define TIMER_0_ISRA   TCC1_CCA_vect
#define TIMER_1_ISRA   TCC0_CCA_vect
#define TIMER_1_ISRB   TCC0_CCB_vect
#define TIMER_1_ISRC   TCC0_CCC_vect
#define TIMER_1_ISRD   TCC0_CCD_vect
#define TIMER_NUMOF   ARRAY_SIZE(timer_config)
static const timer_conf_t timer_config []

UART configuration

#define UART_0_RXC_ISR   USARTF0_RXC_vect /* Reception Complete Interrupt */
#define UART_0_DRE_ISR   USARTF0_DRE_vect /* Data Register Empty Interrupt */
#define UART_0_TXC_ISR   USARTF0_TXC_vect /* Transmission Complete Interrupt */
#define UART_1_RXC_ISR   USARTD0_RXC_vect
#define UART_1_DRE_ISR   USARTD0_DRE_vect
#define UART_1_TXC_ISR   USARTD0_TXC_vect
#define UART_2_RXC_ISR   USARTC0_RXC_vect
#define UART_2_DRE_ISR   USARTC0_DRE_vect
#define UART_2_TXC_ISR   USARTC0_TXC_vect
#define UART_NUMOF   ARRAY_SIZE(uart_config)
static const uart_conf_t uart_config []

I2C configuration

#define I2C_0_ISR   TWIF_TWIM_vect
#define I2C_1_ISR   TWIC_TWIM_vect
#define I2C_NUMOF   ARRAY_SIZE(i2c_config)
static const i2c_conf_t i2c_config []

SPI configuration

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

EBI configuration

For more information, see ebi_conf_t structure.

static const ebi_conf_t ebi_config

Macro Definition Documentation

◆ I2C_0_ISR

#define I2C_0_ISR   TWIF_TWIM_vect

Definition at line 152 of file periph_conf.h.

◆ I2C_1_ISR

#define I2C_1_ISR   TWIC_TWIM_vect

Definition at line 153 of file periph_conf.h.


#define I2C_NUMOF   ARRAY_SIZE(i2c_config)

Definition at line 155 of file periph_conf.h.


#define SPI_NUMOF   ARRAY_SIZE(spi_config)

Definition at line 181 of file periph_conf.h.


#define TIMER_0_ISRA   TCC1_CCA_vect

Definition at line 57 of file periph_conf.h.


#define TIMER_1_ISRA   TCC0_CCA_vect

Definition at line 59 of file periph_conf.h.


#define TIMER_1_ISRB   TCC0_CCB_vect

Definition at line 60 of file periph_conf.h.


#define TIMER_1_ISRC   TCC0_CCC_vect

Definition at line 61 of file periph_conf.h.


#define TIMER_1_ISRD   TCC0_CCD_vect

Definition at line 62 of file periph_conf.h.


#define TIMER_NUMOF   ARRAY_SIZE(timer_config)

Definition at line 64 of file periph_conf.h.


#define UART_0_DRE_ISR   USARTF0_DRE_vect /* Data Register Empty Interrupt */

Definition at line 115 of file periph_conf.h.


#define UART_0_RXC_ISR   USARTF0_RXC_vect /* Reception Complete Interrupt */

Definition at line 114 of file periph_conf.h.


#define UART_0_TXC_ISR   USARTF0_TXC_vect /* Transmission Complete Interrupt */

Definition at line 116 of file periph_conf.h.


#define UART_1_DRE_ISR   USARTD0_DRE_vect

Definition at line 119 of file periph_conf.h.


#define UART_1_RXC_ISR   USARTD0_RXC_vect

Definition at line 118 of file periph_conf.h.


#define UART_1_TXC_ISR   USARTD0_TXC_vect

Definition at line 120 of file periph_conf.h.


#define UART_2_DRE_ISR   USARTC0_DRE_vect

Definition at line 123 of file periph_conf.h.


#define UART_2_RXC_ISR   USARTC0_RXC_vect

Definition at line 122 of file periph_conf.h.


#define UART_2_TXC_ISR   USARTC0_TXC_vect

Definition at line 124 of file periph_conf.h.


#define UART_NUMOF   ARRAY_SIZE(uart_config)

Definition at line 126 of file periph_conf.h.

Variable Documentation

◆ ebi_config

const ebi_conf_t ebi_config

Definition at line 191 of file periph_conf.h.

◆ i2c_config

const i2c_conf_t i2c_config[]
Initial value:
= {
.dev = &TWIF,
.sda_pin = GPIO_PIN(PORT_F, 0),
.scl_pin = GPIO_PIN(PORT_F, 1),
.speed = I2C_SPEED_NORMAL,
.int_lvl = CPU_INT_LVL_LOW,
.dev = &TWIC,
.sda_pin = GPIO_PIN(PORT_C, 0),
.scl_pin = GPIO_PIN(PORT_C, 1),
.speed = I2C_SPEED_NORMAL,
.int_lvl = CPU_INT_LVL_LOW,
port C
Definition: periph_cpu.h:49
port F
Definition: periph_cpu.h:52
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
Definition: periph_cpu.h:46
#define PWR_RED_REG(reg, dev)
Define a CPU specific Power Reduction index macro.
Definition: periph_cpu.h:79
Interrupt Low Level
Definition: periph_cpu.h:41
normal mode: ~100 kbit/s
Definition: periph_cpu.h:278

Definition at line 133 of file periph_conf.h.

◆ spi_config

const spi_conf_t spi_config[]
Initial value:
= {
.dev = &SPIF,
.sck_pin = GPIO_PIN(PORT_F, 7),
.miso_pin = GPIO_PIN(PORT_F, 6),
.mosi_pin = GPIO_PIN(PORT_F, 5),
.ss_pin = GPIO_PIN(PORT_F, 4),
.dev = &SPIC,
.sck_pin = GPIO_PIN(PORT_C, 7),
.miso_pin = GPIO_PIN(PORT_C, 6),
.mosi_pin = GPIO_PIN(PORT_C, 5),
.ss_pin = GPIO_PIN(PORT_C, 4),

Definition at line 162 of file periph_conf.h.

◆ timer_config

const timer_conf_t timer_config[]
Initial value:
= {
.dev = (void *)&TCC1,
.pwr = PWR_RED_REG(PWR_PORT_C, PR_TC1_bm),
.type = TC_TYPE_1,
.int_lvl = { CPU_INT_LVL_LOW,
.dev = (void *)&TCC0,
.pwr = PWR_RED_REG(PWR_PORT_C, PR_TC0_bm),
.type = TC_TYPE_0,
.int_lvl = { CPU_INT_LVL_LOW,
Interrupt Disabled
Definition: periph_cpu.h:40

Definition at line 36 of file periph_conf.h.

◆ uart_config

const uart_conf_t uart_config[]

Definition at line 71 of file periph_conf.h.