The friendly Operating System for the Internet of Things
maple-mini/include/board.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2016 Frits Kuipers
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser General
5  * Public License v2.1. See the file LICENSE in the top level directory for more
6  * details.
7  */
8 
21 #ifndef BOARD_H
22 #define BOARD_H
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
32 #define XTIMER_WIDTH (16)
33 #define XTIMER_BACKOFF 5
34 
40 #define LED0_PIN GPIO_PIN(PORT_B, 1)
41 
42 #define LED_PORT GPIOB
43 #define LED0_MASK (1 << 1)
44 
45 #define LED0_ON (LED_PORT->BSRR = LED0_MASK)
46 #define LED0_OFF (LED_PORT->BRR = LED0_MASK)
47 #define LED0_TOGGLE (LED_PORT->ODR ^= LED0_MASK)
48 
53 #define BTN_B1_PIN GPIO_PIN(PORT_B, 8)
54 
58 #define UART_STDIO_DEV UART_DEV(1)
59 
63 void board_init(void);
64 
65 #ifdef __cplusplus
66 }
67 #endif
68 
69 #endif /* BOARD_H */
70 
void board_init(void)
Initialize board specific hardware, including clock, LEDs and std-IO.