board.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2019 Yegor Yefremov
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 
30 #ifndef BOARD_H
31 #define BOARD_H
32 
33 #include <stdint.h>
34 
43 #if MODULE_ESP32_TTGO_T_BEAM_V1_0
44 #define BTN0_PIN GPIO38
45 #else
46 #define BTN0_PIN GPIO39
47 #endif
48 
55 #define BTN0_MODE GPIO_IN
56 
60 #define BUTTON0_PIN BTN0_PIN
61 
66 #ifndef BTN0_INT_FLANK
67 #define BTN0_INT_FLANK GPIO_FALLING
68 #endif
69 
75 #ifndef MODULE_ESP32_TTGO_T_BEAM_V1_0
76 #define LED0_PIN GPIO14
77 #define LED0_ACTIVE (1)
78 #endif
79 
87 #define SX127X_PARAM_SPI_NSS GPIO18
88 #define SX127X_PARAM_RESET GPIO23
89 #define SX127X_PARAM_DIO0 GPIO26
90 #define SX127X_PARAM_DIO1 GPIO_UNDEF /* Pin is not connected to the LoRa chip directly */
91 #define SX127X_PARAM_DIO2 GPIO_UNDEF /* Pin is not connected to the LoRa chip directly */
92 #define SX127X_PARAM_DIO3 GPIO_UNDEF
93 
95 /* include common board definitions as last step */
96 #include "board_common.h"
97 
98 #ifdef __cplusplus
99 extern "C" {
100 #endif
101 
105 void board_init(void);
106 
107 #ifdef __cplusplus
108 } /* end extern "C" */
109 #endif
110 
111 #endif /* BOARD_H */
112 
board_init
void board_init(void)
Board level initialization.