board.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2022 SSV Software Systems GmbH
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 
19 #ifndef BOARD_H
20 #define BOARD_H
21 
22 #include "cpu.h"
23 #include "periph_conf.h"
24 #include "periph_cpu.h"
25 #include "periph/gpio.h"
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
36 #define PM_BLOCKER_INITIAL { 0, 0, 0 }
37 
42 #define CONFIG_ZTIMER_LPTIMER_DEV TIMER_DEV(1)
43 #define CONFIG_ZTIMER_LPTIMER_FREQ LFXO_FREQ
44 #define CONFIG_ZTIMER_LPTIMER_WIDTH 24
45 #define CONFIG_ZTIMER_LPTIMER_BLOCK_PM_MODE EFM32_PM_MODE_EM3
56 /* #define GPIO_INT_PM_BLOCKER PM_MODE_EM2 */
57 
63 #define VCOM_UART UART_DEV(0)
64 #define VCOM_EN_PIN GPIO_PIN(PB, 0)
65 
70 #define PB0_PIN GPIO_PIN(PB, 1)
71 #define PB1_PIN GPIO_PIN(PB, 3)
78 #define LED0_PIN GPIO_PIN(PB, 2)
79 #define LED1_PIN GPIO_PIN(PD, 3)
86 #define LED0_ON gpio_set(LED0_PIN)
87 #define LED0_OFF gpio_clear(LED0_PIN)
88 #define LED0_TOGGLE gpio_toggle(LED0_PIN)
89 #define LED1_ON gpio_set(LED1_PIN)
90 #define LED1_OFF gpio_clear(LED1_PIN)
91 #define LED1_TOGGLE gpio_toggle(LED1_PIN)
100 #define DISP_SPI SPI_DEV(0)
101 #define DISP_SCS_PIN GPIO_PIN(PC, 8)
102 #define DISP_EXTCOMIN_PIN GPIO_PIN(PC, 6)
103 #define DISP_ENABLE_PIN GPIO_PIN(PC, 9)
112 #define FLASH_SPI SPI_DEV(0)
113 #define FLASH_CS_PIN GPIO_PIN(PC, 4)
122 #define SI70XX_PARAM_I2C_DEV I2C_DEV(0)
123 #define SI7021_EN_PIN GPIO_PIN(PC, 9)
129 void board_init(void);
130 
131 #ifdef __cplusplus
132 }
133 #endif
134 
135 #endif /* BOARD_H */
Peripheral MCU configuration for the Zigduino board.
Low-level GPIO peripheral driver interface definitions.
void board_init(void)
Initialize the board (GPIO, sensors, clocks).