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/gpio.h"
22 #include "periph/spi.h"
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
35 #if IS_ACTIVE(CONFIG_EFM32_XTIMER_USE_LETIMER)
36 #define XTIMER_DEV (TIMER_DEV(2))
37 #define XTIMER_HZ (32768UL)
38 #define XTIMER_WIDTH (16)
39 #else
40 #define XTIMER_DEV (TIMER_DEV(0))
41 #define XTIMER_HZ (1000000UL)
42 #define XTIMER_WIDTH (32)
43 #endif
44 #define XTIMER_CHAN (0)
54 #define BC_PIN GPIO_PIN(PE, 1)
61 #define PB0_PIN GPIO_PIN(PC, 8)
62 #define PB1_PIN GPIO_PIN(PC, 9)
69 #define LED0R_PIN GPIO_PIN(PH, 10)
70 #define LED0G_PIN GPIO_PIN(PH, 11)
71 #define LED0B_PIN GPIO_PIN(PH, 12)
72 #define LED1R_PIN GPIO_PIN(PH, 13)
73 #define LED1G_PIN GPIO_PIN(PH, 14)
74 #define LED1B_PIN GPIO_PIN(PH, 15)
75 #define LED0_PIN LED0R_PIN
76 #define LED1_PIN LED1R_PIN
83 #define LED0_ON gpio_set(LED0_PIN)
84 #define LED0_OFF gpio_clear(LED0_PIN)
85 #define LED0_TOGGLE gpio_toggle(LED0_PIN)
86 #define LED1_ON gpio_set(LED1_PIN)
87 #define LED1_OFF gpio_clear(LED1_PIN)
88 #define LED1_TOGGLE gpio_toggle(LED1_PIN)
97 #define DISP_SPI SPI_DEV(0)
98 #define DISP_COM_PIN GPIO_PIN(PA, 11)
99 #define DISP_CS_PIN GPIO_PIN(PC, 14)
100 #define DISP_EN_PIN GPIO_PIN(PA, 9)
109 #define SI7021_I2C I2C_DEV(2)
110 #define SI7021_EN_PIN GPIO_PIN(PB, 3)
111 
112 #define SI70XX_PARAM_I2C_DEV SI7021_I2C
121 #define CORETEMP_ADC ADC_LINE(0)
127 void board_init(void);
128 
129 #ifdef __cplusplus
130 }
131 #endif
132 
Peripheral MCU configuration for the Zigduino board.
Low-level GPIO peripheral driver interface definitions.
void board_init(void)
Initialize the board, called from the cpu startup code.
Low-level SPI peripheral driver interface definition.