board.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2018 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 
19 #ifndef BOARD_H
20 #define BOARD_H
21 
22 #include "cpu.h"
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
32 #define XTIMER_WIDTH (16)
33 
39 #define LED0_PIN GPIO_PIN(PORT_B, 4)
40 #define LED0_PORT GPIOB
41 #define LED0_MASK (1 << 4)
42 
43 #define LED0_ON (LED0_PORT->BSRR = LED0_MASK)
44 #define LED0_OFF (LED0_PORT->BRR = LED0_MASK)
45 #define LED0_TOGGLE (LED0_PORT->ODR ^= LED0_MASK)
46 
47 #define LED1_PIN GPIO_PIN(PORT_A, 5)
48 #define LED1_PORT GPIOA
49 #define LED1_MASK (1 << 5)
50 
51 #define LED1_ON (LED1_PORT->BSRR = LED1_MASK)
52 #define LED1_OFF (LED1_PORT->BRR = LED1_MASK)
53 #define LED1_TOGGLE (LED1_PORT->ODR ^= LED1_MASK)
54 
60 #define BTN0_PIN GPIO_PIN(PORT_A, 0)
61 #define BTN0_PORT GPIOA
62 #define BTN0_MODE GPIO_IN
63 
68 void board_init(void);
69 
70 #ifdef __cplusplus
71 }
72 #endif
73 
74 #endif /* BOARD_H */
75 
board_init
void board_init(void)
Board level initialization.