ikea-tradfri/include/board.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Bas Stottelaar <basstottelaar@gmail.com>
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 
21 #ifndef BOARD_H
22 #define BOARD_H
23 
24 #include "cpu.h"
25 
26 #include "periph_conf.h"
27 #include "periph/gpio.h"
28 #include "periph/spi.h"
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
40 #define XTIMER_HZ (250000UL)
41 #define XTIMER_WIDTH (16)
42 
48 #define LED0_PIN GPIO_PIN(PA, 1)
49 #define LED1_PIN GPIO_PIN(PB, 13)
50 
56 #define LED0_ON gpio_set(LED0_PIN)
57 #define LED0_OFF gpio_clear(LED0_PIN)
58 #define LED0_TOGGLE gpio_toggle(LED0_PIN)
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 
Low-level GPIO peripheral driver interface definitions.
Low-level SPI peripheral driver interface definition.
Configuration of CPU peripherals for the IKEA TRÅDFRI modules.
void board_init(void)
Initialize the board (GPIO, sensors, clocks).