Atmel Software Framework

xplained_headers.h File Reference

Xplained I/O Expansion Header Pin Mapping.

The Atmel Xplained evaluation boards have four 10-pin, 100mil headers that are used to access spare analog and digital pins on the board microcontroller. This file provides a common set of definitions mapping the Xplained expansion header J1, J2, J3, and J4 pins to spare pins on the board microcontroller. Software can then use these common definitions to configure I/O for peripherals and expansion boards connected to the Xplained header blocks.

For each board type, the pin definitions are specified for the pins in each of the four headers. For UC3 based boards, if a pin can be used as an external interrupt source, the interrupt and GPIO pin mapping settings that are needed for initializing the external interrupt controller (EIC) are also provided.

Copyright (c) 2011 Atmel Corporation. All rights reserved.

#include <board.h>
#include <gpio.h>

Macros

#define INVALID_PIN_NUMBER   ((unsigned int) -1)
 
Xplained I/O Expansion Header Pin Mapping
#define XPLD_HEADER_J1_PIN1   (AVR32_PIN_PA25)
 
#define XPLD_HEADER_J1_PIN2   (AVR32_PIN_PA26)
 
#define XPLD_HEADER_J1_PIN3   (AVR32_PIN_PX57)
 
#define XPLD_HEADER_J1_PIN4   (AVR32_PIN_PX58)
 
#define XPLD_HEADER_J1_PIN5   (AVR32_PIN_PB09)
 
#define XPLD_HEADER_J1_PIN6   (AVR32_PIN_PB10)
 
#define XPLD_HEADER_J1_PIN7   (AVR32_PIN_PB08)
 
#define XPLD_HEADER_J1_PIN8   (AVR32_PIN_PB07)
 
#define XPLD_HEADER_J2_PIN1   (AVR32_PIN_PA21)
 
#define XPLD_HEADER_J2_PIN2   (AVR32_PIN_PA22)
 
#define XPLD_HEADER_J2_PIN3   (AVR32_PIN_PA23)
 
#define XPLD_HEADER_J2_PIN4   (AVR32_PIN_PA24)
 
#define XPLD_HEADER_J2_PIN5   (AVR32_PIN_PA20)
 
#define XPLD_HEADER_J2_PIN6   (AVR32_PIN_PA19)
 
#define XPLD_HEADER_J2_PIN7   (AVR32_PIN_PA18)
 
#define XPLD_HEADER_J2_PIN8   (AVR32_PIN_PA17)
 
#define XPLD_HEADER_J3_PIN1   (AVR32_PIN_PA31)
 
#define XPLD_HEADER_J3_PIN2   (AVR32_PIN_PA30)
 
#define XPLD_HEADER_J3_PIN3   (AVR32_PIN_PA29)
 
#define XPLD_HEADER_J3_PIN4   (AVR32_PIN_PA28)
 
#define XPLD_HEADER_J3_PIN5   (AVR32_PIN_PA27)
 
#define XPLD_HEADER_J3_PIN6   (AVR32_PIN_PB00)
 
#define XPLD_HEADER_J3_PIN7   (AVR32_PIN_PB04)
 
#define XPLD_HEADER_J3_PIN8   (AVR32_PIN_PX19)
 
#define XPLD_HEADER_J4_PIN1   (AVR32_PIN_PA15)
 
#define XPLD_HEADER_J4_PIN2   (AVR32_PIN_PA14)
 
#define XPLD_HEADER_J4_PIN3   (AVR32_PIN_PA05)
 
#define XPLD_HEADER_J4_PIN4   (AVR32_PIN_PA06)
 
#define XPLD_HEADER_J4_PIN5   (AVR32_PIN_PA07)
 
#define XPLD_HEADER_J4_PIN6   (AVR32_PIN_PA10)
 
#define XPLD_HEADER_J4_PIN7   (AVR32_PIN_PA11)
 
#define XPLD_HEADER_J4_PIN8   (AVR32_PIN_PA08)
 
Xplained Expansion Header External Interrupt Controller Pin Mapping
#define XPLD_HEADER_J2_PIN1_EIC_LINE   (AVR32_EIC_INT0)
 
#define XPLD_HEADER_J2_PIN1_EIC_IRQ   (AVR32_EIC_IRQ_0)
 
#define XPLD_HEADER_J2_PIN1_EIC_PIN   (AVR32_EIC_EXTINT_0_PIN)
 
#define XPLD_HEADER_J2_PIN1_EIC_FUNC   (AVR32_EIC_EXTINT_0_FUNCTION)
 
#define XPLD_HEADER_J2_PIN2_EIC_LINE   (AVR32_EIC_INT1)
 
#define XPLD_HEADER_J2_PIN2_EIC_IRQ   (AVR32_EIC_IRQ_1)
 
#define XPLD_HEADER_J2_PIN2_EIC_PIN   (AVR32_EIC_EXTINT_1_PIN)
 
#define XPLD_HEADER_J2_PIN2_EIC_FUNC   (AVR32_EIC_EXTINT_1_FUNCTION)
 
#define XPLD_HEADER_J2_PIN3_EIC_LINE   (AVR32_EIC_INT2)
 
#define XPLD_HEADER_J2_PIN3_EIC_IRQ   (AVR32_EIC_IRQ_2)
 
#define XPLD_HEADER_J2_PIN3_EIC_PIN   (AVR32_EIC_EXTINT_2_PIN)
 
#define XPLD_HEADER_J2_PIN3_EIC_FUNC   (AVR32_EIC_EXTINT_2_FUNCTION)
 
#define XPLD_HEADER_J2_PIN4_EIC_LINE   (AVR32_EIC_INT3)
 
#define XPLD_HEADER_J2_PIN4_EIC_IRQ   (AVR32_EIC_IRQ_3)
 
#define XPLD_HEADER_J2_PIN4_EIC_PIN   (AVR32_EIC_EXTINT_3_PIN)
 
#define XPLD_HEADER_J2_PIN4_EIC_FUNC   (AVR32_EIC_EXTINT_3_FUNCTION)
 
#define XPLD_HEADER_J2_PIN5_EIC_LINE   (8)
 
#define XPLD_HEADER_J2_PIN5_EIC_IRQ   (0)
 
#define XPLD_HEADER_J2_PIN5_EIC_PIN   (AVR32_EIC_EXTINT_8_PIN)
 
#define XPLD_HEADER_J2_PIN5_EIC_FUNC   (AVR32_EIC_EXTINT_8_FUNCTION)
 

#define INVALID_PIN_NUMBER   ((unsigned int) -1)
#define XPLD_HEADER_J1_PIN1   (AVR32_PIN_PA25)
#define XPLD_HEADER_J1_PIN2   (AVR32_PIN_PA26)
#define XPLD_HEADER_J1_PIN3   (AVR32_PIN_PX57)
#define XPLD_HEADER_J1_PIN4   (AVR32_PIN_PX58)
#define XPLD_HEADER_J1_PIN5   (AVR32_PIN_PB09)
#define XPLD_HEADER_J1_PIN6   (AVR32_PIN_PB10)
#define XPLD_HEADER_J1_PIN7   (AVR32_PIN_PB08)
#define XPLD_HEADER_J1_PIN8   (AVR32_PIN_PB07)
#define XPLD_HEADER_J2_PIN1   (AVR32_PIN_PA21)
#define XPLD_HEADER_J2_PIN1_EIC_FUNC   (AVR32_EIC_EXTINT_0_FUNCTION)
#define XPLD_HEADER_J2_PIN1_EIC_IRQ   (AVR32_EIC_IRQ_0)
#define XPLD_HEADER_J2_PIN1_EIC_LINE   (AVR32_EIC_INT0)
#define XPLD_HEADER_J2_PIN1_EIC_PIN   (AVR32_EIC_EXTINT_0_PIN)
#define XPLD_HEADER_J2_PIN2   (AVR32_PIN_PA22)
#define XPLD_HEADER_J2_PIN2_EIC_FUNC   (AVR32_EIC_EXTINT_1_FUNCTION)
#define XPLD_HEADER_J2_PIN2_EIC_IRQ   (AVR32_EIC_IRQ_1)
#define XPLD_HEADER_J2_PIN2_EIC_LINE   (AVR32_EIC_INT1)
#define XPLD_HEADER_J2_PIN2_EIC_PIN   (AVR32_EIC_EXTINT_1_PIN)
#define XPLD_HEADER_J2_PIN3   (AVR32_PIN_PA23)
#define XPLD_HEADER_J2_PIN3_EIC_FUNC   (AVR32_EIC_EXTINT_2_FUNCTION)
#define XPLD_HEADER_J2_PIN3_EIC_IRQ   (AVR32_EIC_IRQ_2)
#define XPLD_HEADER_J2_PIN3_EIC_LINE   (AVR32_EIC_INT2)
#define XPLD_HEADER_J2_PIN3_EIC_PIN   (AVR32_EIC_EXTINT_2_PIN)
#define XPLD_HEADER_J2_PIN4   (AVR32_PIN_PA24)
#define XPLD_HEADER_J2_PIN4_EIC_FUNC   (AVR32_EIC_EXTINT_3_FUNCTION)
#define XPLD_HEADER_J2_PIN4_EIC_IRQ   (AVR32_EIC_IRQ_3)
#define XPLD_HEADER_J2_PIN4_EIC_LINE   (AVR32_EIC_INT3)
#define XPLD_HEADER_J2_PIN4_EIC_PIN   (AVR32_EIC_EXTINT_3_PIN)
#define XPLD_HEADER_J2_PIN5   (AVR32_PIN_PA20)
#define XPLD_HEADER_J2_PIN5_EIC_FUNC   (AVR32_EIC_EXTINT_8_FUNCTION)
#define XPLD_HEADER_J2_PIN5_EIC_IRQ   (0)
#define XPLD_HEADER_J2_PIN5_EIC_LINE   (8)
#define XPLD_HEADER_J2_PIN5_EIC_PIN   (AVR32_EIC_EXTINT_8_PIN)
#define XPLD_HEADER_J2_PIN6   (AVR32_PIN_PA19)
#define XPLD_HEADER_J2_PIN7   (AVR32_PIN_PA18)
#define XPLD_HEADER_J2_PIN8   (AVR32_PIN_PA17)
#define XPLD_HEADER_J3_PIN1   (AVR32_PIN_PA31)
#define XPLD_HEADER_J3_PIN2   (AVR32_PIN_PA30)
#define XPLD_HEADER_J3_PIN3   (AVR32_PIN_PA29)
#define XPLD_HEADER_J3_PIN4   (AVR32_PIN_PA28)
#define XPLD_HEADER_J3_PIN5   (AVR32_PIN_PA27)
#define XPLD_HEADER_J3_PIN6   (AVR32_PIN_PB00)
#define XPLD_HEADER_J3_PIN7   (AVR32_PIN_PB04)
#define XPLD_HEADER_J3_PIN8   (AVR32_PIN_PX19)
#define XPLD_HEADER_J4_PIN1   (AVR32_PIN_PA15)
#define XPLD_HEADER_J4_PIN2   (AVR32_PIN_PA14)
#define XPLD_HEADER_J4_PIN3   (AVR32_PIN_PA05)
#define XPLD_HEADER_J4_PIN4   (AVR32_PIN_PA06)
#define XPLD_HEADER_J4_PIN5   (AVR32_PIN_PA07)
#define XPLD_HEADER_J4_PIN6   (AVR32_PIN_PA10)
#define XPLD_HEADER_J4_PIN7   (AVR32_PIN_PA11)
#define XPLD_HEADER_J4_PIN8   (AVR32_PIN_PA08)