sltb001a/include/board.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015-2017 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 
22 #ifndef BOARD_H
23 #define BOARD_H
24 
25 #include "cpu.h"
26 
27 #include "periph_conf.h"
28 #include "periph/gpio.h"
29 #include "periph/spi.h"
30 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34 
41 #define XTIMER_HZ (250000UL)
42 #define XTIMER_WIDTH (16)
43 
49 #define PB0_PIN GPIO_PIN(PD, 14)
50 #define PB1_PIN GPIO_PIN(PD, 15)
51 
57 #define LED0_PIN GPIO_PIN(PD, 12)
58 #define LED1_PIN GPIO_PIN(PD, 11)
59 
65 #define LED0_ON gpio_set(LED0_PIN)
66 #define LED0_OFF gpio_clear(LED0_PIN)
67 #define LED0_TOGGLE gpio_toggle(LED0_PIN)
68 #define LED1_ON gpio_set(LED1_PIN)
69 #define LED1_OFF gpio_clear(LED1_PIN)
70 #define LED1_TOGGLE gpio_toggle(LED1_PIN)
71 
79 #define ENV_SENSE_PIC_ADDR (0x01)
80 #define ENV_SENSE_PIC_BIT (0)
81 
89 #ifndef BMP280_ENABLED
90 #define BMP280_ENABLED (1)
91 #endif
92 #define BMP280_I2C I2C_DEV(0)
93 
94 #define BMX280_PARAM_I2C_DEV BMP280_I2C
95 
103 #ifndef CCS811_ENABLED
104 #define CCS811_ENABLED (0)
105 #endif
106 #define CCS811_I2C I2C_DEV(0)
107 #define CCS811_PIC_ADDR (0x03)
108 #define CCS811_PIC_EN_BIT (0x00)
109 #define CCS811_PIC_WAKE_BIT (0x01)
110 
118 #ifndef ICM20648_ENABLED
119 #define ICM20648_ENABLED (0)
120 #endif
121 #define ICM20648_SPI SPI_DEV(0)
122 #define ICM20648_PIC_ADDR (0x00)
123 #define ICM20648_PIC_EN_BIT (0x00)
124 
132 #define PIC_INT_WAKE_PIN GPIO_PIN(PD, 10)
133 #define PIC_I2C I2C_DEV(0)
134 #define PIC_I2C_ADDR (0x48)
135 
143 #ifndef RGB_LED1_ENABLED
144 #define RGB_LED1_ENABLED (1)
145 #endif
146 #ifndef RGB_LED2_ENABLED
147 #define RGB_LED2_ENABLED (1)
148 #endif
149 #ifndef RGB_LED3_ENABLED
150 #define RGB_LED3_ENABLED (1)
151 #endif
152 #ifndef RGB_LED4_ENABLED
153 #define RGB_LED4_ENABLED (1)
154 #endif
155 #define RGB_LED_ADDR (0x04)
156 #define RGB_LED_EN_BIT (0x00)
157 #define RGB_LED1_EN_BIT (0x07)
158 #define RGB_LED2_EN_BIT (0x06)
159 #define RGB_LED3_EN_BIT (0x05)
160 #define RGB_LED4_EN_BIT (0x04)
161 
169 #ifndef SI1133_ENABLED
170 #define SI1133_ENABLED (0)
171 #endif
172 #define SI1133_I2C I2C_DEV(0)
173 
181 #ifndef SI7021_ENABLED
182 #define SI7021_ENABLED (1)
183 #endif
184 #define SI7021_I2C I2C_DEV(0)
185 
186 #define SI70XX_PARAM_I2C_DEV SI7021_I2C
187 
196 #ifndef SI7210A_ENABLED
197 #define SI7210A_ENABLED (0)
198 #endif
199 #define SI7210A_I2C I2C_DEV(0)
200 
205 void board_init(void);
206 
207 #ifdef __cplusplus
208 }
209 #endif
210 
211 #endif /* BOARD_H */
212 
Low-level GPIO peripheral driver interface definitions.
Configuration of CPU peripherals for the SLTB001A starter kit.
Low-level SPI peripheral driver interface definition.
void board_init(void)
Initialize the board (GPIO, sensors, clocks).