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 GPIO_PORT_B
50#define LED0_PORT_NUM PORT_B
51#define LED0_PIN_NUM 5
58#define BTN0_PIN GPIO_PIN(PORT_B, 13)
59#define BTN0_MODE GPIO_IN_PU
60#define BTN1_PIN GPIO_PIN(PORT_A, 0)
61#define BTN1_MODE GPIO_IN_PU
70#define FE_CTRL1 GPIO_PIN(PORT_A, 4)
71#define FE_CTRL2 GPIO_PIN(PORT_A, 5)
77#ifndef CONFIG_LORA_E5_DEV_ENABLE_3P3V
78#define CONFIG_LORA_E5_DEV_ENABLE_3P3V 1
79#endif
83#ifndef CONFIG_LORA_E5_DEV_ENABLE_5V
84#define CONFIG_LORA_E5_DEV_ENABLE_5V 1
85#endif
89#define LORA_E5_DEV_3P3V_ENABLE_PIN GPIO_PIN(PORT_A, 9)
93#define LORA_E5_DEV_5V_ENABLE_PIN GPIO_PIN(PORT_B, 10)
94
95#ifdef __cplusplus
96}
97#endif
98
99#include "stm32_leds.h"
100
101#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