samr21-xpro/include/board.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2014 Freie Universit├Ąt Berlin
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
23 #ifndef BOARD_H
24 #define BOARD_H
25 
26 #include "cpu.h"
27 #include "periph_conf.h"
28 #include "periph_cpu.h"
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
38 #define XTIMER_DEV TIMER_1
39 #define XTIMER_CHAN (0)
40 
47 #define AT86RF2XX_PARAMS_BOARD {.spi = SPI_DEV(0), \
48  .spi_clk = SPI_CLK_5MHZ, \
49  .cs_pin = GPIO_PIN(PB, 31), \
50  .int_pin = GPIO_PIN(PB, 0), \
51  .sleep_pin = GPIO_PIN(PA, 20), \
52  .reset_pin = GPIO_PIN(PB, 15)}
53 
58 #define LED0_PIN GPIO_PIN(0, 19)
59 
60 #define LED_PORT PORT->Group[0]
61 #define LED0_MASK (1 << 19)
62 
63 #define LED0_ON (LED_PORT.OUTCLR.reg = LED0_MASK)
64 #define LED0_OFF (LED_PORT.OUTSET.reg = LED0_MASK)
65 #define LED0_TOGGLE (LED_PORT.OUTTGL.reg = LED0_MASK)
66 
72 #define BTN0_PORT PORT->Group[0]
73 #define BTN0_PIN GPIO_PIN(0, 28)
74 #define BTN0_MODE GPIO_IN_PU
75 
80 void board_init(void);
81 
82 #ifdef __cplusplus
83 }
84 #endif
85 
86 #endif /* BOARD_H */
87 
void board_init(void)
Initialize board specific hardware, including clock, LEDs and std-IO.
Configuration of CPU peripherals for the Atmel SAM R21 Xplained Pro board.