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 
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
26 extern "C" {
27 #endif
28 
36 #if IS_ACTIVE(CONFIG_EFM32_XTIMER_USE_LETIMER)
37 #define XTIMER_DEV (TIMER_DEV(2))
38 #define XTIMER_HZ (32768UL)
39 #define XTIMER_WIDTH (16)
40 #else
41 #define XTIMER_DEV (TIMER_DEV(0))
42 #define XTIMER_HZ (1000000UL)
43 #define XTIMER_WIDTH (32)
44 #endif
45 #define XTIMER_CHAN (0)
55 #define BC_PIN GPIO_PIN(PA, 5)
62 #define PB0_PIN GPIO_PIN(PF, 6)
63 #define PB1_PIN GPIO_PIN(PF, 7)
70 #define LED0_PIN GPIO_PIN(PF, 4)
71 #define LED1_PIN GPIO_PIN(PF, 5)
78 #define LED0_ON gpio_set(LED0_PIN)
79 #define LED0_OFF gpio_clear(LED0_PIN)
80 #define LED0_TOGGLE gpio_toggle(LED0_PIN)
81 #define LED1_ON gpio_set(LED1_PIN)
82 #define LED1_OFF gpio_clear(LED1_PIN)
83 #define LED1_TOGGLE gpio_toggle(LED1_PIN)
92 #define CORETEMP_ADC ADC_LINE(0)
101 #define DISP_SPI SPI_DEV(0)
102 #define DISP_COM_PIN GPIO_PIN(PD, 13)
103 #define DISP_CS_PIN GPIO_PIN(PD, 14)
104 #define DISP_EN_PIN GPIO_PIN(PD, 15)
113 #define SI7021_I2C I2C_DEV(0)
114 #define SI7021_EN_PIN GPIO_PIN(PB, 10)
115 
116 #define SI70XX_PARAM_I2C_DEV SI7021_I2C
119 #ifdef __cplusplus
120 }
121 #endif
122 
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.