@@ -64,12 +64,6 @@ extern "C" {
64
64
#define D9 (9ul)
65
65
#define D10 (10ul)
66
66
67
- // Wio-SX1262 for XIAO
68
- // Store page: https://www.seeedstudio.com/Wio-SX1262-for-XIAO-p-6379.html
69
- // Schematic: https://files.seeedstudio.com/products/SenseCAP/Wio_SX1262/Wio-SX1262%20for%20XIAO%20V1.0_SCH.pdf
70
- #define PIN_BUTTON1 D0
71
- #define BUTTON_NEED_PULLUP
72
-
73
67
/*
74
68
* Analog pins
75
69
*/
@@ -119,16 +113,36 @@ static const uint8_t SCK = PIN_SPI_SCK;
119
113
// supported modules list
120
114
#define USE_SX1262
121
115
122
- // common pinouts for SX126X modules
116
+ #ifdef SEEED_XIAO_WIO1_1
117
+ // Wio-SX1262 PCB v1.1 pinout
118
+ // XIAO ESP32S3 & Wio-SX1262 Kit ships with this PCB
119
+ #define SX126X_CS D3
120
+ #define SX126X_DIO1 D0
121
+ #define SX126X_BUSY D1
122
+ #define SX126X_RESET D2
123
+ #define SX126X_RXEN 38
123
124
125
+ // Button on Wio-SX1262
126
+ #define PIN_BUTTON1 D5
127
+ #define BUTTON_NEED_PULLUP
128
+ #else
129
+ // Wio-SX1262 PCB v1.0 pinout
130
+ // XIAO nRF52840 & Wio-SX1262 Kit ships with this PCB
124
131
#define SX126X_CS D4
125
132
#define SX126X_DIO1 D1
126
133
#define SX126X_BUSY D3
127
134
#define SX126X_RESET D2
135
+ #define SX126X_RXEN D5 // This is used to control the RX side of the RF switch
128
136
129
- #define SX126X_TXEN RADIOLIB_NC
137
+ // Button on Wio-SX1262, it conflicts with the L76K GPS enable pin
138
+ #ifdef SEEED_XIAO_D6D7_L76K
139
+ #define PIN_BUTTON1 D0
140
+ #define BUTTON_NEED_PULLUP
141
+ #endif
142
+ #endif
130
143
131
- #define SX126X_RXEN D5 // This is used to control the RX side of the RF switch
144
+ // RF switch strategy for Wio-SX1262
145
+ #define SX126X_TXEN RADIOLIB_NC
132
146
#define SX126X_DIO2_AS_RF_SWITCH // DIO2 is used to control the TX side of the RF switch
133
147
#define SX126X_DIO3_TCXO_VOLTAGE 1.8
134
148
@@ -162,8 +176,6 @@ static const uint8_t SCL = PIN_WIRE_SCL;
162
176
#define GPS_BAUDRATE 9600
163
177
#define GPS_THREAD_INTERVAL 50
164
178
#define PIN_GPS_STANDBY D0
165
- #undef PIN_BUTTON1 // Overlapping assignment with Wio-SX1262 for XIAO user button
166
- #define PIN_BUTTON1 (-1)
167
179
#else
168
180
#define HAS_GPS 0
169
181
#endif
0 commit comments