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 
9 #pragma once
10 
22 #include "cpu.h"
23 #include "periph_conf.h"
24 #include "periph/adc.h"
25 #include "periph/gpio.h"
26 #include "periph/spi.h"
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
39 #if IS_ACTIVE(CONFIG_EFM32_XTIMER_USE_LETIMER)
40 #define XTIMER_DEV (TIMER_DEV(1))
41 #define XTIMER_HZ (32768UL)
42 #define XTIMER_WIDTH (16)
43 #else
44 #define XTIMER_DEV (TIMER_DEV(0))
45 #define XTIMER_HZ (250000UL)
46 #define XTIMER_WIDTH (16)
47 #endif
48 #define XTIMER_CHAN (0)
55 #define PB0_PIN GPIO_PIN(PD, 14)
56 #define PB1_PIN GPIO_PIN(PD, 15)
63 #define LED0_PIN GPIO_PIN(PD, 12)
64 #define LED1_PIN GPIO_PIN(PD, 11)
71 #define LED0_ON gpio_set(LED0_PIN)
72 #define LED0_OFF gpio_clear(LED0_PIN)
73 #define LED0_TOGGLE gpio_toggle(LED0_PIN)
74 #define LED1_ON gpio_set(LED1_PIN)
75 #define LED1_OFF gpio_clear(LED1_PIN)
76 #define LED1_TOGGLE gpio_toggle(LED1_PIN)
85 #define CORETEMP_ADC ADC_LINE(0)
94 #define ENV_SENSE_PIC_ADDR (0x01)
95 #define ENV_SENSE_PIC_BIT (0)
104 #define BMP280_I2C I2C_DEV(0)
105 
106 #define BMX280_PARAM_I2C_DEV BMP280_I2C
115 #define CCS811_I2C I2C_DEV(0)
116 
117 #define CCS811_PIC_ADDR (0x03)
118 #define CCS811_PIC_EN_BIT (0x00)
119 #define CCS811_PIC_WAKE_BIT (0x01)
120 
121 #define CCS811_PARAM_I2C_DEV CCS811_I2C
130 #ifndef ICM20648_ENABLED
131 #define ICM20648_ENABLED 0
132 #endif
133 #define ICM20648_SPI SPI_DEV(0)
134 #define ICM20648_PIC_ADDR (0x00)
135 #define ICM20648_PIC_EN_BIT (0x00)
144 #define PIC_INT_WAKE_PIN GPIO_PIN(PD, 10)
145 #define PIC_I2C I2C_DEV(0)
146 #define PIC_I2C_ADDR (0x48)
155 #ifndef RGB_LED1_ENABLED
156 #define RGB_LED1_ENABLED 1
157 #endif
158 #ifndef RGB_LED2_ENABLED
159 #define RGB_LED2_ENABLED 1
160 #endif
161 #ifndef RGB_LED3_ENABLED
162 #define RGB_LED3_ENABLED 1
163 #endif
164 #ifndef RGB_LED4_ENABLED
165 #define RGB_LED4_ENABLED 1
166 #endif
167 #define RGB_LED_ADDR (0x04)
168 #define RGB_LED_EN_BIT (0x00)
169 #define RGB_LED1_EN_BIT (0x07)
170 #define RGB_LED2_EN_BIT (0x06)
171 #define RGB_LED3_EN_BIT (0x05)
172 #define RGB_LED4_EN_BIT (0x04)
181 #ifndef SI1133_ENABLED
182 #define SI1133_ENABLED 0
183 #endif
184 #define SI1133_I2C I2C_DEV(0)
193 #define SI7021_I2C I2C_DEV(0)
194 
195 #define SI70XX_PARAM_I2C_DEV SI7021_I2C
205 #ifndef SI7210_ENABLED
206 #define SI7210_ENABLED 0
207 #endif
208 #define SI7210_I2C I2C_DEV(0)
211 #ifdef __cplusplus
212 }
213 #endif
214 
Low-level ADC peripheral driver interface definitions.
Peripheral MCU configuration for the Zigduino board.
Low-level GPIO peripheral driver interface definitions.
Low-level SPI peripheral driver interface definition.