opencm904/include/board.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 INRIA
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 
22 #ifndef BOARD_H
23 #define BOARD_H
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
33 #define XTIMER_WIDTH (16)
34 #define XTIMER_BACKOFF 5
35 
41 #define LED0_PIN GPIO_PIN(PORT_B, 9)
42 
43 #define LED_PORT GPIOB
44 #define LED0_MASK (1 << 9)
45 
46 #define LED0_ON (LED_PORT->BRR = LED0_MASK)
47 #define LED0_OFF (LED_PORT->BSRR = LED0_MASK)
48 #define LED0_TOGGLE (LED_PORT->ODR ^= LED0_MASK)
49 
55 #define BTN0_PIN GPIO_PIN(PORT_C, 15)
56 #define BTN0_MODE GPIO_IN
57 
66 #define DXL_DIR_PIN GPIO_PIN(PORT_B, 5)
67 
71 #define UART_STDIO_DEV UART_DEV(0)
72 
77 #ifndef UART_STDIO_BAUDRATE
78 #define UART_STDIO_BAUDRATE (921600UL)
79 #endif
80 
85 void board_init(void);
86 
87 #ifdef __cplusplus
88 }
89 #endif
90 
91 #endif /* BOARD_H */
92 
void board_init(void)
Initialize board specific hardware, including clock, LEDs and std-IO.