board.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2019 Inria
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 
19 #ifndef BOARD_H
20 #define BOARD_H
21 
22 #include "cpu.h"
23 #include "periph_conf.h"
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
33 #define LED0_PIN GPIO_PIN(PORT_A, 5)
34 #define LED0_PORT GPIOA
35 #define LED0_MASK (1 << 5)
36 #define LED0_ON (LED0_PORT->BSRR = LED0_MASK)
37 #define LED0_OFF (LED0_PORT->BSRR = (LED0_MASK << 16))
38 #define LED0_TOGGLE (LED0_PORT->ODR ^= LED0_MASK)
39 
40 #define LED1_PIN GPIO_PIN(PORT_A, 7)
41 #define LED1_PORT GPIOA
42 #define LED1_MASK (1 << 7)
43 #define LED1_ON (LED1_PORT->BSRR = LED1_MASK)
44 #define LED1_OFF (LED1_PORT->BSRR = (LED1_MASK << 16))
45 #define LED1_TOGGLE (LED1_PORT->ODR ^= LED1_MASK)
46 
47 #define LED2_PIN GPIO_PIN(PORT_B, 1)
48 #define LED2_PORT GPIOB
49 #define LED2_MASK (1 << 1)
50 #define LED2_ON (LED2_PORT->BSRR = LED2_MASK)
51 #define LED2_OFF (LED2_PORT->BSRR = (LED2_MASK << 16))
52 #define LED2_TOGGLE (LED2_PORT->ODR ^= LED2_MASK)
53 
59 #define BTN0_PIN GPIO_PIN(PORT_A, 0)
60 #define BTN0_MODE GPIO_IN
61 
67 void board_init(void);
68 
69 #ifdef __cplusplus
70 }
71 #endif
72 
73 #endif /* BOARD_H */
74 
periph_conf.h
Peripheral MCU configuration for the STM32F723E-DISCO board.
board_init
void board_init(void)
Board level initialization.