periph_conf.h File Reference

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

Detailed Description

Peripheral MCU configuration for the ATxmegaA1 Xplained board.

Author
Gerson Fernando Budke nando.nosp@m.jve@.nosp@m.gmail.nosp@m..com

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
 

Variable Documentation

◆ i2c_config

const i2c_conf_t i2c_config[]
static
Initial value:
= {
{
.dev = &TWIF,
.pwr = PWR_RED_REG(PWR_PORT_F, PR_TWI_bm),
.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,
.pwr = PWR_RED_REG(PWR_PORT_C, PR_TWI_bm),
.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
port C
Definition: periph_cpu.h:38
@ PORT_F
port F
Definition: periph_cpu.h:41
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
Definition: periph_cpu.h:35
#define PWR_RED_REG(reg, dev)
Define a CPU specific Power Reduction index macro.
Definition: periph_cpu.h:79
@ CPU_INT_LVL_LOW
Interrupt Low Level
Definition: periph_cpu.h:41
@ I2C_SPEED_NORMAL
normal mode: ~100 kbit/s
Definition: periph_cpu.h:274

Definition at line 133 of file periph_conf.h.

◆ spi_config

const spi_conf_t spi_config[]
static
Initial value:
= {
{
.dev = &SPIF,
.pwr = PWR_RED_REG(PWR_PORT_F, PR_SPI_bm),
.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,
.pwr = PWR_RED_REG(PWR_PORT_C, PR_SPI_bm),
.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[]
static
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,
}
}
@ CPU_INT_LVL_OFF
Interrupt Disabled
Definition: periph_cpu.h:40

Definition at line 36 of file periph_conf.h.