board.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015-2020 Freie Universität Berlin
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 #include "periph_conf.h"
26 #include "periph/adc.h"
27 #include "periph/gpio.h"
28 #include "periph/spi.h"
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
41 #if IS_ACTIVE(CONFIG_EFM32_XTIMER_USE_LETIMER)
42 #define XTIMER_DEV (TIMER_DEV(1))
43 #define XTIMER_HZ (32768UL)
44 #define XTIMER_WIDTH (16)
45 #else
46 #define XTIMER_DEV (TIMER_DEV(0))
47 #define XTIMER_HZ (250000UL)
48 #define XTIMER_WIDTH (16)
49 #endif
50 #define XTIMER_CHAN (0)
51 
60 #define BC_PIN MODULE_PIN_F5
61 
67 #define PB0_PIN MODULE_PIN_F12
68 #define PB1_PIN MODULE_PIN_F13
69 
75 #define LED0_PIN MODULE_PIN_F10
76 #define LED1_PIN MODULE_PIN_F11
77 
83 #define LED0_ON gpio_set(LED0_PIN)
84 #define LED0_OFF gpio_clear(LED0_PIN)
85 #define LED0_TOGGLE gpio_toggle(LED0_PIN)
86 #define LED1_ON gpio_set(LED1_PIN)
87 #define LED1_OFF gpio_clear(LED1_PIN)
88 #define LED1_TOGGLE gpio_toggle(LED1_PIN)
89 
97 #define CORETEMP_ADC ADC_LINE(0)
98 
106 #define DISP_SPI SPI_DEV(0)
107 #define DISP_COM_PIN MODULE_PIN_F18
108 #define DISP_CS_PIN MODULE_PIN_F17
109 #define DISP_EN_PIN MODULE_PIN_F14
110 
118 #define SI7021_I2C I2C_DEV(0)
119 #define SI7021_EN_PIN MODULE_PIN_P37
120 
121 #define SI70XX_PARAM_I2C_DEV SI7021_I2C
122 
127 void board_init(void);
128 
129 #ifdef __cplusplus
130 }
131 #endif
132 
133 #endif /* BOARD_H */
134 
spi.h
Low-level SPI peripheral driver interface definition.
adc.h
Low-level ADC peripheral driver interface definitions.
gpio.h
Low-level GPIO peripheral driver interface definitions.
periph_conf.h
Configuration of CPU peripherals for the SLWSTK6000B starter kit.
board_init
void board_init(void)
Board level initialization.