Loading...
Searching...
No Matches
board.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2015-2020 Freie Universität Berlin
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
18
19#include "cpu.h"
20#include "periph_conf.h"
21#include "periph/adc.h"
22#include "periph/gpio.h"
23#include "periph/spi.h"
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
36#if IS_ACTIVE(CONFIG_EFM32_XTIMER_USE_LETIMER)
37#define XTIMER_DEV (TIMER_DEV(1))
38#define XTIMER_HZ (32768UL)
39#define XTIMER_WIDTH (16)
40#else
41#define XTIMER_DEV (TIMER_DEV(0))
42#define XTIMER_HZ (250000UL)
43#define XTIMER_WIDTH (16)
44#endif
45#define XTIMER_CHAN (0)
47
52#define PB0_PIN GPIO_PIN(PD, 14)
53#define PB1_PIN GPIO_PIN(PD, 15)
55
60#define LED0_PIN GPIO_PIN(PD, 12)
61#define LED1_PIN GPIO_PIN(PD, 11)
63
68#define LED0_ON gpio_set(LED0_PIN)
69#define LED0_OFF gpio_clear(LED0_PIN)
70#define LED0_TOGGLE gpio_toggle(LED0_PIN)
71#define LED1_ON gpio_set(LED1_PIN)
72#define LED1_OFF gpio_clear(LED1_PIN)
73#define LED1_TOGGLE gpio_toggle(LED1_PIN)
75
82#define CORETEMP_ADC ADC_LINE(0)
84
91#define ENV_SENSE_PIC_ADDR (0x01)
92#define ENV_SENSE_PIC_BIT (0)
94
101#define BMP280_I2C I2C_DEV(0)
102
103#define BMX280_PARAM_I2C_DEV BMP280_I2C
105
112#define CCS811_I2C I2C_DEV(0)
113
114#define CCS811_PIC_ADDR (0x03)
115#define CCS811_PIC_EN_BIT (0x00)
116#define CCS811_PIC_WAKE_BIT (0x01)
117
118#define CCS811_PARAM_I2C_DEV CCS811_I2C
120
127#ifndef ICM20648_ENABLED
128#define ICM20648_ENABLED 0
129#endif
130#define ICM20648_SPI SPI_DEV(0)
131#define ICM20648_PIC_ADDR (0x00)
132#define ICM20648_PIC_EN_BIT (0x00)
134
141#define PIC_INT_WAKE_PIN GPIO_PIN(PD, 10)
142#define PIC_I2C I2C_DEV(0)
143#define PIC_I2C_ADDR (0x48)
145
152#ifndef RGB_LED1_ENABLED
153#define RGB_LED1_ENABLED 1
154#endif
155#ifndef RGB_LED2_ENABLED
156#define RGB_LED2_ENABLED 1
157#endif
158#ifndef RGB_LED3_ENABLED
159#define RGB_LED3_ENABLED 1
160#endif
161#ifndef RGB_LED4_ENABLED
162#define RGB_LED4_ENABLED 1
163#endif
164#define RGB_LED_ADDR (0x04)
165#define RGB_LED_EN_BIT (0x00)
166#define RGB_LED1_EN_BIT (0x07)
167#define RGB_LED2_EN_BIT (0x06)
168#define RGB_LED3_EN_BIT (0x05)
169#define RGB_LED4_EN_BIT (0x04)
171
178#ifndef SI1133_ENABLED
179#define SI1133_ENABLED 0
180#endif
181#define SI1133_I2C I2C_DEV(0)
183
190#define SI7021_I2C I2C_DEV(0)
191
192#define SI70XX_PARAM_I2C_DEV SI7021_I2C
194
202#ifndef SI7210_ENABLED
203#define SI7210_ENABLED 0
204#endif
205#define SI7210_I2C I2C_DEV(0)
207
208#ifdef __cplusplus
209}
210#endif
211
Low-level ADC peripheral driver interface definitions.
Configuration of CPU peripherals for the SLTB001A starter kit.
Low-level GPIO peripheral driver interface definitions.
Low-level SPI peripheral driver interface definition.