board.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2016 Leon George
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 
20 #ifndef BOARD_H
21 #define BOARD_H
22 
23 #include "periph/gpio.h"
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
33 #define XTIMER_WIDTH (16)
34 #define XTIMER_BACKOFF (50)
35 #define XTIMER_ISR_BACKOFF (40)
36 
42 #define BTN0_PIN GPIO_PIN(0, 4)
43 #define BTN0_MODE GPIO_IN_PU
44 #define BTN1_PIN GPIO_PIN(0, 0)
45 #define BTN1_MODE GPIO_IN_PU
46 
52 #define LED0_PIN GPIO_PIN(0, 10)
53 #define LED1_PIN GPIO_PIN(0, 15)
54 
55 #define LED0_ON gpio_set(LED0_PIN)
56 #define LED0_OFF gpio_clear(LED0_PIN)
57 #define LED0_TOGGLE gpio_toggle(LED0_PIN)
58 
59 #define LED1_ON gpio_set(LED1_PIN)
60 #define LED1_OFF gpio_clear(LED1_PIN)
61 #define LED1_TOGGLE gpio_toggle(LED1_PIN)
62 
67 void board_init(void);
68 
69 #ifdef __cplusplus
70 }
71 #endif
72 
73 #endif /* BOARD_H */
74 
gpio.h
Low-level GPIO peripheral driver interface definitions.
board_init
void board_init(void)
Board level initialization.