bluepill/include/board.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015 TriaGnoSys GmbH
3  * 2017 Alexander Kurth, Sören Tempel, Tristan Bruns
4  *
5  * This file is subject to the terms and conditions of the GNU Lesser
6  * General Public License v2.1. See the file LICENSE in the top level
7  * directory for more details.
8  */
9 
31 #ifndef BOARD_H
32 #define BOARD_H
33 
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37 
42 #define LED0_PORT GPIOC
43 #define LED0_PIN GPIO_PIN(PORT_C, 13)
44 #define LED0_MASK (1 << 13)
45 
46 #define LED0_ON (LED0_PORT->BSRR = (LED0_MASK << 16))
47 #define LED0_OFF (LED0_PORT->BSRR = LED0_MASK)
48 #define LED0_TOGGLE (LED0_PORT->ODR ^= LED0_MASK)
49 
54 void board_init(void);
55 
59 #define UART_STDIO_DEV UART_DEV(1)
60 
65 #define XTIMER_WIDTH (16)
66 #define XTIMER_BACKOFF 5
67 
69 #ifdef __cplusplus
70 }
71 #endif
72 
73 #endif /* BOARD_H */
74 
void board_init(void)
Initialize board specific hardware, including clock, LEDs and std-IO.