The friendly Operating System for the Internet of Things
nucleo-f302/include/board.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Inria
3  * Copyright (C) 2015 Freie Universit├Ąt Berlin
4  * Copyright (C) 2015 Hamburg University of Applied Sciences
5  *
6  * This file is subject to the terms and conditions of the GNU Lesser
7  * General Public License v2.1. See the file LICENSE in the top level
8  * directory for more details.
9  */
10 
25 #ifndef BOARD_H
26 #define BOARD_H
27 
28 #include "cpu.h"
29 #include "periph_conf.h"
30 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34 
39 #define LED0_PIN GPIO_PIN(PORT_B, 13)
40 #define LED0_MASK (1 << 13)
41 
42 #define LED0_ON (GPIOB->BSRR = LED0_MASK)
43 #define LED0_OFF (GPIOB->BSRR = (LED0_MASK << 16))
44 #define LED0_TOGGLE (GPIOB->ODR ^= LED0_MASK)
45 
50 #define BTN_B1_PIN GPIO_PIN(PORT_C, 13)
51 
55 void board_init(void);
56 
57 #ifdef __cplusplus
58 }
59 #endif
60 
61 #endif /* BOARD_H */
62 
Peripheral MCU configuration for the nucleo-f302 board.
void board_init(void)
Initialize board specific hardware, including clock, LEDs and std-IO.