board.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2019 Gunar Schorcht
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 
48 #define BTN0_PIN GPIO0
49 
56 #define BTN0_MODE GPIO_IN
57 
61 #ifndef BTN0_INT_FLANK
62 #define BTN0_INT_FLANK GPIO_FALLING
63 #endif
64 
68 #define BUTTON0_PIN BTN0_PIN
69 
77 #define LED0_PIN GPIO25
78 #define LED0_ACTIVE (1)
87 #define SX127X_PARAM_SPI (SPI_DEV(0))
88 #define SX127X_PARAM_SPI_NSS GPIO18
89 #define SX127X_PARAM_RESET GPIO14
90 #define SX127X_PARAM_DIO0 GPIO26
91 #define SX127X_PARAM_DIO1 GPIO_UNDEF /* GPIO35 has no pulldown, leads to init error */
92 #define SX127X_PARAM_DIO2 GPIO_UNDEF /* GPIO34 has no pulldown, leads to init error */
93 #define SX127X_PARAM_DIO3 GPIO_UNDEF
94 #define SX127X_PARAM_DIO_MULTI GPIO_UNDEF
95 
97 /* include common board definitions as last step */
98 #include "board_common.h"
99 
100 #ifdef __cplusplus
101 extern "C" {
102 #endif
103 
107 static inline void board_init(void) {
108  /* there is nothing special to initialize on this board */
110 }
111 
112 #ifdef __cplusplus
113 } /* end extern "C" */
114 #endif
115 
116 #endif /* BOARD_H */
117 
board_init_common
void board_init_common(void)
Initialize the hardware that is common for all ESP32 boards.
board_init
void board_init(void)
Board level initialization.