microbit/include/board.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2016 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 
22 #ifndef BOARD_H
23 #define BOARD_H
24 
25 #include "cpu.h"
26 #include "periph_conf.h"
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
36 #define XTIMER_DEV (0)
37 #define XTIMER_CHAN (0)
38 #define XTIMER_WIDTH (24)
39 #define XTIMER_BACKOFF (40)
40 
46 #define MICROBIT_LED_COL1 GPIO_PIN(0, 4)
47 #define MICROBIT_LED_COL2 GPIO_PIN(0, 5)
48 #define MICROBIT_LED_COL3 GPIO_PIN(0, 6)
49 #define MICROBIT_LED_COL4 GPIO_PIN(0, 7)
50 #define MICROBIT_LED_COL5 GPIO_PIN(0, 8)
51 #define MICROBIT_LED_COL6 GPIO_PIN(0, 9)
52 #define MICROBIT_LED_COL7 GPIO_PIN(0, 10)
53 #define MICROBIT_LED_COL8 GPIO_PIN(0, 11)
54 #define MICROBIT_LED_COL9 GPIO_PIN(0, 12)
55 #define MICROBIT_LED_ROW1 GPIO_PIN(0, 13)
56 #define MICROBIT_LED_ROW2 GPIO_PIN(0, 14)
57 #define MICROBIT_LED_ROW3 GPIO_PIN(0, 15)
58 
64 #define BTN0_PIN GPIO_PIN(0, 17)
65 #define BTN0_MODE GPIO_IN
66 #define BTN1_PIN GPIO_PIN(0, 26)
67 #define BTN1_MODE GPIO_IN
68 
74 #define MMA8653_PARAM_I2C I2C_DEV(0)
75 #define MMA8653_PARAM_ADDR 0x1d
76 
82 #define MAG3110_PARAM_I2C I2C_DEV(0)
83 #define MAG3110_PARAM_ADDR 0x0e
84 
89 void board_init(void);
90 
91 #ifdef __cplusplus
92 }
93 #endif
94 
95 #endif /* BOARD_H */
96 
void board_init(void)
Initialize the board, also triggers the CPU initialization.
Peripheral configuration for the BBC micro:bit.