Loading...
Searching...
No Matches
board.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2021 Inria
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
20#ifndef BOARD_H
21#define BOARD_H
22
23#include "kernel_defines.h"
24#if IS_USED(MODULE_SX126X_STM32WL)
25#include "sx126x.h"
26#endif
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
36#define SX126X_PARAM_SPI (SPI_DEV(0))
37#define SX126X_PARAM_TX_PA_MODE SX126X_RF_MODE_TX_HPA
38#if IS_USED(MODULE_SX126X_STM32WL)
39extern void lora_e5_dev_sx126x_set_rf_mode(sx126x_t *dev, sx126x_rf_mode_t rf_mode);
40#define SX126X_PARAM_SET_RF_MODE_CB lora_e5_dev_sx126x_set_rf_mode
41#define SX126X_PARAM_TYPE SX126X_TYPE_STM32WL
42#endif
49#define LED0_PORT_NUM PORT_B
50#define LED0_PIN_NUM 5
57#define BTN0_PIN GPIO_PIN(PORT_B, 13)
58#define BTN0_MODE GPIO_IN_PU
59#define BTN1_PIN GPIO_PIN(PORT_A, 0)
60#define BTN1_MODE GPIO_IN_PU
69#define FE_CTRL1 GPIO_PIN(PORT_A, 4)
70#define FE_CTRL2 GPIO_PIN(PORT_A, 5)
76#ifndef CONFIG_LORA_E5_DEV_ENABLE_3P3V
77#define CONFIG_LORA_E5_DEV_ENABLE_3P3V 1
78#endif
82#ifndef CONFIG_LORA_E5_DEV_ENABLE_5V
83#define CONFIG_LORA_E5_DEV_ENABLE_5V 1
84#endif
88#define LORA_E5_DEV_3P3V_ENABLE_PIN GPIO_PIN(PORT_A, 9)
92#define LORA_E5_DEV_5V_ENABLE_PIN GPIO_PIN(PORT_B, 10)
93
94#ifdef __cplusplus
95}
96#endif
97
98#include "stm32_leds.h"
99
100#endif /* BOARD_H */
sx126x_rf_mode_t
RF switch states.
Definition sx126x.h:45
Common macros and compiler attributes/pragmas configuration.
Common LED macros.
Device descriptor for the driver.
Definition sx126x.h:105