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#include "periph/timer.h"
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
37#if IS_ACTIVE(CONFIG_EFM32_ZTIMER_USE_LETIMER)
38# define CONFIG_ZTIMER_USEC_DEV (TIMER_DEV(1))
39# define CONFIG_ZTIMER_USEC_BASE_FREQ (32768UL)
40# define CONFIG_ZTIMER_USEC_WIDTH (16)
41# define CONFIG_ZTIMER_USEC_ADJUST_SET (37)
42# define CONFIG_ZTIMER_USEC_ADJUST_SLEEP (37)
43#else
44# define CONFIG_ZTIMER_USEC_DEV (TIMER_DEV(0))
45# define CONFIG_ZTIMER_USEC_BASE_FREQ (250000UL)
46# define CONFIG_ZTIMER_USEC_WIDTH (16)
47# define CONFIG_ZTIMER_USEC_ADJUST_SET (24)
48# define CONFIG_ZTIMER_USEC_ADJUST_SLEEP (24)
49#endif
51
56#define PB0_PIN GPIO_PIN(PD, 14)
57#define PB1_PIN GPIO_PIN(PD, 15)
59
64#define LED0_PIN GPIO_PIN(PD, 12)
65#define LED1_PIN GPIO_PIN(PD, 11)
67
72#define LED0_ON gpio_set(LED0_PIN)
73#define LED0_OFF gpio_clear(LED0_PIN)
74#define LED0_TOGGLE gpio_toggle(LED0_PIN)
75#define LED1_ON gpio_set(LED1_PIN)
76#define LED1_OFF gpio_clear(LED1_PIN)
77#define LED1_TOGGLE gpio_toggle(LED1_PIN)
79
86#define CORETEMP_ADC ADC_LINE(0)
88
95#define ENV_SENSE_PIC_ADDR (0x01)
96#define ENV_SENSE_PIC_BIT (0)
98
105#define BMP280_I2C I2C_DEV(0)
106
107#define BMX280_PARAM_I2C_DEV BMP280_I2C
109
116#define CCS811_I2C I2C_DEV(0)
117
118#define CCS811_PIC_ADDR (0x03)
119#define CCS811_PIC_EN_BIT (0x00)
120#define CCS811_PIC_WAKE_BIT (0x01)
121
122#define CCS811_PARAM_I2C_DEV CCS811_I2C
124
131#ifndef ICM20648_ENABLED
132#define ICM20648_ENABLED 0
133#endif
134#define ICM20648_SPI SPI_DEV(0)
135#define ICM20648_PIC_ADDR (0x00)
136#define ICM20648_PIC_EN_BIT (0x00)
138
145#define PIC_INT_WAKE_PIN GPIO_PIN(PD, 10)
146#define PIC_I2C I2C_DEV(0)
147#define PIC_I2C_ADDR (0x48)
149
156#ifndef RGB_LED1_ENABLED
157#define RGB_LED1_ENABLED 1
158#endif
159#ifndef RGB_LED2_ENABLED
160#define RGB_LED2_ENABLED 1
161#endif
162#ifndef RGB_LED3_ENABLED
163#define RGB_LED3_ENABLED 1
164#endif
165#ifndef RGB_LED4_ENABLED
166#define RGB_LED4_ENABLED 1
167#endif
168#define RGB_LED_ADDR (0x04)
169#define RGB_LED_EN_BIT (0x00)
170#define RGB_LED1_EN_BIT (0x07)
171#define RGB_LED2_EN_BIT (0x06)
172#define RGB_LED3_EN_BIT (0x05)
173#define RGB_LED4_EN_BIT (0x04)
175
182#ifndef SI1133_ENABLED
183#define SI1133_ENABLED 0
184#endif
185#define SI1133_I2C I2C_DEV(0)
187
194#define SI7021_I2C I2C_DEV(0)
195
196#define SI70XX_PARAM_I2C_DEV SI7021_I2C
198
206#ifndef SI7210_ENABLED
207#define SI7210_ENABLED 0
208#endif
209#define SI7210_I2C I2C_DEV(0)
211
212#ifdef __cplusplus
213}
214#endif
215
Low-level ADC peripheral driver interface definitions.
Configuration of CPU peripherals for the SLTB001A starter kit.
Low-level timer peripheral driver interface definitions.
Low-level GPIO peripheral driver interface definitions.
Low-level SPI peripheral driver interface definition.