From 3b32e120693f0f7d256643f832f21968816557e7 Mon Sep 17 00:00:00 2001 From: matthias-bs <83612361+matthias-bs@users.noreply.github.com> Date: Sun, 8 Oct 2023 11:07:01 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20matthias?= =?UTF-8?q?-bs/BresserWeatherSensorReceiver@4cfca40d34d8243df63516320d8f2d?= =?UTF-8?q?bbf5434b05=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _weather_sensor_cfg_8h_source.html | 859 +++++++++++++++-------------- 1 file changed, 430 insertions(+), 429 deletions(-) diff --git a/_weather_sensor_cfg_8h_source.html b/_weather_sensor_cfg_8h_source.html index 80a6e470..9f78bc61 100644 --- a/_weather_sensor_cfg_8h_source.html +++ b/_weather_sensor_cfg_8h_source.html @@ -146,440 +146,441 @@
60 #include <Arduino.h>
61 
62 // ------------------------------------------------------------------------------------------------
-
63 // --- Board ---
+
63 // --- Weather Sensors ---
64 // ------------------------------------------------------------------------------------------------
-
65 // Use pinning for LoRaWAN Node
+
65 #define NUM_SENSORS 1 // Number of sensors to be received
66 
-
67 
-
68 // LILIGO TTGO LoRaP32 board with integrated RF tranceiver (SX1276)
-
69 // See pin definitions in
-
70 // https://github.com/espressif/arduino-esp32/tree/master/variants/ttgo-lora32-*
-
71 // and
-
72 // https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-2/11973
-
73 
-
74 // This define is set by selecting "Board: TTGO LoRa32-OLED" / "Board Revision: TTGO LoRa32 V1 (No TFCard)"
-
75 // in the Arduino IDE:
-
76 //#define ARDUINO_TTGO_LoRa32_V1
-
77 
-
78 // This define is set by selecting "Board: TTGO LoRa32-OLED" / "Board Revision: TTGO LoRa32 V2"
-
79 // in the Arduino IDE:
-
80 //#define ARDUINO_TTGO_LoRa32_V2
-
81 
-
82 // This define is set by selecting "Board: TTGO LoRa32-OLED" / "Board Revision: TTGO LoRa32 V2.1 (1.6.1)"
-
83 // in the Arduino IDE:
-
84 //#define ARDUINO_TTGO_LoRa32_V21new
-
85 
-
86 // This define is set by selecting "Board: Heltec Wireless Stick"
-
87 // in the Arduino IDE:
-
88 //#define ARDUINO_heltec_wireless_stick
-
89 
-
90 // This define is set by selecting "Board: Heltec WiFi LoRa 32(V2)"
-
91 // in the Adruino IDE:
-
92 //#define ARDUINO_heltec_wifi_lora_32_V2
-
93 
-
94 // Adafruit Feather ESP32S2 with RFM95W "FeatherWing" ADA3232
-
95 // https://github.com/espressif/arduino-esp32/blob/master/variants/adafruit_feather_esp32s2/pins_arduino.h
-
96 //
-
97 // This define is set by selecting "Adafruit Feather ESP32-S2" in the Arduino IDE:
-
98 //#define ARDUINO_ADAFRUIT_FEATHER_ESP32S2
-
99 
-
100 // Adafruit Feather ESP32 with RFM95W "FeatherWing" ADA3232
-
101 // https://github.com/espressif/arduino-esp32/blob/master/variants/feather_esp32/pins_arduino.h
-
102 //
-
103 // This define is set by selecting "Adafruit ESP32 Feather" in the Arduino IDE:
-
104 //#define ARDUINO_FEATHER_ESP32
-
105 
-
106 // Adafruit Feather RP2040 with RFM95W "FeatherWing" ADA3232
-
107 // https://github.com/espressif/arduino-esp32/blob/master/variants/feather_esp32/pins_arduino.h
-
108 //
-
109 // This define is set by selecting "Adafruit Feather RP2040" in the Arduino IDE:
-
110 //#define ARDUINO_ADAFRUIT_FEATHER_RP2040
-
111 
-
112 // DFRobot Firebeetle32
-
113 // https://github.com/espressif/arduino-esp32/tree/master/variants/firebeetle32/pins_arduino.h
-
114 //
-
115 // This define (not very specific...) is set by selecting "FireBeetle-ESP32" in the Arduino IDE:
-
116 //#define ARDUINO_ESP32_DEV
-
117 
-
118 #if defined(ARDUINO_TTGO_LoRa32_V1)
-
119  #pragma message("ARDUINO_TTGO_LoRa32_V1 defined; using on-board transceiver")
-
120  #define USE_SX1276
-
121 
-
122 #elif defined(ARDUINO_TTGO_LoRa32_V2)
-
123  #pragma message("ARDUINO_TTGO_LoRa32_V2 defined; using on-board transceiver")
-
124  #pragma message("LoRa DIO1 must be wired to GPIO33 manually!")
-
125  #define USE_SX1276
-
126 
-
127 #elif defined(ARDUINO_TTGO_LoRa32_v21new)
-
128  #pragma message("ARDUINO_TTGO_LoRa32_V21new defined; using on-board transceiver")
-
129  #define USE_SX1276
+
67 // List of sensor IDs to be excluded - can be empty
+
68 #define SENSOR_IDS_EXC { 0x792882A2 }
+
69 //#define SENSOR_IDS_EXC { 0x792882A2 }
+
70 
+
71 // List of sensor IDs to be included - if empty, handle all available sensors
+
72 #define SENSOR_IDS_INC {}
+
73 //#define SENSOR_IDS_INC { 0x83750871 }
+
74 
+
75 // List of sensor IDs of the model "BRESSER 3-in-1 Professional Wind Gauge / Anemometer"
+
76 // P/N 7002531 - requiring special heandling in decodeBresser5In1Payload()
+
77 //#define SENSOR_IDS_DECODE3IN1 {}
+
78 #define SENSOR_IDS_DECODE3IN1 { 0x2C100512 }
+
79 
+
80 // Disable data type which will not be used to save RAM
+
81 #define WIND_DATA_FLOATINGPOINT
+
82 #define WIND_DATA_FIXEDPOINT
+
83 
+
84 // Select appropriate sensor message format(s)
+
85 // Comment out unused decoders to save operation time/power
+
86 #define BRESSER_5_IN_1
+
87 #define BRESSER_6_IN_1
+
88 #define BRESSER_7_IN_1
+
89 #define BRESSER_LIGHTNING
+
90 #define BRESSER_LEAKAGE
+
91 
+
92 
+
93 // ------------------------------------------------------------------------------------------------
+
94 // --- Board ---
+
95 // ------------------------------------------------------------------------------------------------
+
96 // Use pinning for LoRaWAN Node
+
97 
+
98 
+
99 // LILIGO TTGO LoRaP32 board with integrated RF tranceiver (SX1276)
+
100 // See pin definitions in
+
101 // https://github.com/espressif/arduino-esp32/tree/master/variants/ttgo-lora32-*
+
102 // and
+
103 // https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-2/11973
+
104 
+
105 // This define is set by selecting "Board: TTGO LoRa32-OLED" / "Board Revision: TTGO LoRa32 V1 (No TFCard)"
+
106 // in the Arduino IDE:
+
107 //#define ARDUINO_TTGO_LoRa32_V1
+
108 
+
109 // This define is set by selecting "Board: TTGO LoRa32-OLED" / "Board Revision: TTGO LoRa32 V2"
+
110 // in the Arduino IDE:
+
111 //#define ARDUINO_TTGO_LoRa32_V2
+
112 
+
113 // This define is set by selecting "Board: TTGO LoRa32-OLED" / "Board Revision: TTGO LoRa32 V2.1 (1.6.1)"
+
114 // in the Arduino IDE:
+
115 //#define ARDUINO_TTGO_LoRa32_V21new
+
116 
+
117 // This define is set by selecting "Board: Heltec Wireless Stick"
+
118 // in the Arduino IDE:
+
119 //#define ARDUINO_heltec_wireless_stick
+
120 
+
121 // This define is set by selecting "Board: Heltec WiFi LoRa 32(V2)"
+
122 // in the Adruino IDE:
+
123 //#define ARDUINO_heltec_wifi_lora_32_V2
+
124 
+
125 // Adafruit Feather ESP32S2 with RFM95W "FeatherWing" ADA3232
+
126 // https://github.com/espressif/arduino-esp32/blob/master/variants/adafruit_feather_esp32s2/pins_arduino.h
+
127 //
+
128 // This define is set by selecting "Adafruit Feather ESP32-S2" in the Arduino IDE:
+
129 //#define ARDUINO_ADAFRUIT_FEATHER_ESP32S2
130 
-
131 #elif defined(ARDUINO_heltec_wireless_stick)
-
132  #pragma message("ARDUINO_heltec_wireless_stick defined; using on-board transceiver")
-
133  #define USE_SX1276
-
134 
-
135 #elif defined(ARDUINO_heltec_wifi_lora_32_V2)
-
136  #pragma message("ARDUINO_heltec_wifi_lora_32_V2 defined; using on-board transceiver")
-
137  #define USE_SX1276
-
138 
-
139 #elif defined(ARDUINO_ADAFRUIT_FEATHER_ESP32S2)
-
140  #pragma message("ARDUINO_ADAFRUIT_FEATHER_ESP32S2 defined; assuming RFM95W FeatherWing will be used")
-
141  #define USE_SX1276
+
131 // Adafruit Feather ESP32 with RFM95W "FeatherWing" ADA3232
+
132 // https://github.com/espressif/arduino-esp32/blob/master/variants/feather_esp32/pins_arduino.h
+
133 //
+
134 // This define is set by selecting "Adafruit ESP32 Feather" in the Arduino IDE:
+
135 //#define ARDUINO_FEATHER_ESP32
+
136 
+
137 // Adafruit Feather RP2040 with RFM95W "FeatherWing" ADA3232
+
138 // https://github.com/espressif/arduino-esp32/blob/master/variants/feather_esp32/pins_arduino.h
+
139 //
+
140 // This define is set by selecting "Adafruit Feather RP2040" in the Arduino IDE:
+
141 //#define ARDUINO_ADAFRUIT_FEATHER_RP2040
142 
-
143 #elif defined(ARDUINO_FEATHER_ESP32)
-
144  #pragma message("ARDUINO_FEATHER_ESP32 defined; assuming RFM95W FeatherWing will be used")
-
145  #define USE_SX1276
-
146  #pragma message("Required wiring: A to RST, B to DIO1, D to DIO0, E to CS")
-
147 
-
148 #elif defined(ARDUINO_AVR_FEATHER32U4)
-
149  #pragma message("ARDUINO_AVR_FEATHER32U4 defined; assuming this is the Adafruit Feather 32u4 RFM95 LoRa Radio")
-
150  #define USE_SX1276
-
151 
-
152 #elif defined(ARDUINO_ADAFRUIT_FEATHER_RP2040)
-
153  #pragma message("ARDUINO_ADAFRUIT_FEATHER_RP2040 defined; assuming assuming RFM95W FeatherWing will be used")
-
154  #define USE_SX1276
-
155  #pragma message("Required wiring: A to RST, B to DIO1, D to DIO0, E to CS")
-
156 
-
157 #elif defined(ARDUINO_ESP32_DEV)
-
158  //#define LORAWAN_NODE
-
159  #define FIREBEETLE_ESP32_COVER_LORA
-
160 
-
161  #if !defined(LORAWAN_NODE) && !defined(FIREBEETLE_ESP32_COVER_LORA)
-
162  #pragma message("ARDUINO_ESP32_DEV defined; select either LORAWAN_NODE or FIREBEETLE_ESP32_COVER_LORA manually!")
-
163 
-
164  #elif defined(LORAWAN_NODE)
-
165  #pragma message("LORAWAN_NODE defined; assuming this is the LoRaWAN_Node board (DFRobot Firebeetle32 + Adafruit RFM95W LoRa Radio)")
-
166  #define USE_SX1276
-
167 
-
168  #elif defined(FIREBEETLE_ESP32_COVER_LORA)
-
169  #define USE_SX1276
-
170  #pragma message("FIREBEETLE_ESP32_COVER_LORA defined; assuming this is a FireBeetle ESP32 with FireBeetle Cover LoRa")
-
171  #pragma message("Required wiring: D2 to RESET, D3 to DIO0, D4 to CS, D5 to DIO1")
-
172 
-
173  #endif
-
174 #endif
-
175 
-
176 
-
177 // ------------------------------------------------------------------------------------------------
-
178 // --- Radio Transceiver ---
-
179 // ------------------------------------------------------------------------------------------------
-
180 // Select type of receiver module (if not yet defined based on the assumptions above)
-
181 #if ( !defined(USE_CC1101) && !defined(USE_SX1276) )
-
182  //#define USE_CC1101
-
183  #define USE_SX1276
-
184 #endif
-
185 
-
186 
-
187 // ------------------------------------------------------------------------------------------------
-
188 // --- Weather Sensors ---
-
189 // ------------------------------------------------------------------------------------------------
-
190 #define NUM_SENSORS 1 // Number of sensors to be received
-
191 
-
192 // List of sensor IDs to be excluded - can be empty
-
193 #define SENSOR_IDS_EXC { 0x792882A2 }
-
194 //#define SENSOR_IDS_EXC { 0x792882A2 }
-
195 
-
196 // List of sensor IDs to be included - if empty, handle all available sensors
-
197 #define SENSOR_IDS_INC {}
-
198 //#define SENSOR_IDS_INC { 0x83750871 }
-
199 
-
200 // List of sensor IDs of the model "BRESSER 3-in-1 Professional Wind Gauge / Anemometer"
-
201 // P/N 7002531 - requiring special heandling in decodeBresser5In1Payload()
-
202 //#define SENSOR_IDS_DECODE3IN1 {}
-
203 #define SENSOR_IDS_DECODE3IN1 { 0x2C100512 }
-
204 
-
205 // ------------------------------------------------------------------------------------------------
-
206 // --- Debug Logging Output ---
-
207 // ------------------------------------------------------------------------------------------------
-
208 // - ESP32:
-
209 // CORE_DEBUG_LEVEL is set in Adruino IDE:
-
210 // Tools->Core Debug Level: "<None>|<Error>|<Warning>|<Info>|<Debug>|<Verbose>"
-
211 // https://github.com/espressif/arduino-esp32/blob/master/cores/esp32/esp32-hal-log.h
-
212 //
-
213 // - ESP8266:
-
214 // DEBUG_ESP_PORT is set in Arduino IDE:
-
215 // Tools->Debug port: "<None>|<Serial>|<Serial1>"
-
216 //
-
217 // - RP2040:
-
218 // DEBUG_RP2040_PORT is set in Arduino IDE:
-
219 // Tools->Debug port: "<Disabled>|<Serial>|<Serial1>|<Serial2>"
-
220 //
-
221 // Replacement for
-
222 // https://github.com/espressif/arduino-esp32/blob/master/cores/esp32/esp32-hal-log.h
-
223 // on ESP8266 and RP2040:
-
224 #if defined(ESP8266) || defined(ARDUINO_ARCH_RP2040)
-
225  #define ARDUHAL_LOG_LEVEL_NONE 0
-
226  #define ARDUHAL_LOG_LEVEL_ERROR 1
-
227  #define ARDUHAL_LOG_LEVEL_WARN 2
-
228  #define ARDUHAL_LOG_LEVEL_INFO 3
-
229  #define ARDUHAL_LOG_LEVEL_DEBUG 4
-
230  #define ARDUHAL_LOG_LEVEL_VERBOSE 5
-
231 
-
232  #if defined(ARDUINO_ARCH_RP2040) && defined(DEBUG_RP2040_PORT)
-
233  #define DEBUG_PORT DEBUG_RP2040_PORT
-
234  #elif defined(DEBUG_ESP_PORT)
-
235  #define DEBUG_PORT DEBUG_ESP_PORT
-
236  #endif
-
237 
-
238  // Set desired level here!
-
239  #define CORE_DEBUG_LEVEL ARDUHAL_LOG_LEVEL_INFO
-
240 
-
241  #if defined(DEBUG_PORT) && CORE_DEBUG_LEVEL > ARDUHAL_LOG_LEVEL_NONE
-
242  #define log_e(...) { DEBUG_PORT.printf("%s(), l.%d: ",__func__, __LINE__); DEBUG_PORT.printf(__VA_ARGS__); DEBUG_PORT.println(); }
-
243  #else
-
244  #define log_e(...) {}
-
245  #endif
-
246  #if defined(DEBUG_PORT) && CORE_DEBUG_LEVEL > ARDUHAL_LOG_LEVEL_ERROR
-
247  #define log_w(...) { DEBUG_PORT.printf("%s(), l.%d: ", __func__, __LINE__); DEBUG_PORT.printf(__VA_ARGS__); DEBUG_PORT.println(); }
-
248  #else
-
249  #define log_w(...) {}
-
250  #endif
-
251  #if defined(DEBUG_PORT) && CORE_DEBUG_LEVEL > ARDUHAL_LOG_LEVEL_WARN
-
252  #define log_i(...) { DEBUG_PORT.printf("%s(), l.%d: ", __func__, __LINE__); DEBUG_PORT.printf(__VA_ARGS__); DEBUG_PORT.println(); }
-
253  #else
-
254  #define log_i(...) {}
-
255  #endif
-
256  #if defined(DEBUG_PORT) && CORE_DEBUG_LEVEL > ARDUHAL_LOG_LEVEL_INFO
-
257  #define log_d(...) { DEBUG_PORT.printf("%s(), l.%d: ", __func__, __LINE__); DEBUG_PORT.printf(__VA_ARGS__); DEBUG_PORT.println(); }
-
258  #else
-
259  #define log_d(...) {}
-
260  #endif
-
261  #if defined(DEBUG_PORT) && CORE_DEBUG_LEVEL > ARDUHAL_LOG_LEVEL_DEBUG
-
262  #define log_v(...) { DEBUG_PORT.printf("%s(), l.%d: ", __func__, __LINE__); DEBUG_PORT.printf(__VA_ARGS__); DEBUG_PORT.println(); }
-
263  #else
-
264  #define log_v(...) {}
-
265  #endif
-
266 
-
267 #endif
-
268 
-
269 
-
270 // Replacement for
-
271 // https://github.com/espressif/arduino-esp32/blob/master/cores/esp32/esp32-hal-log.h
-
272 // on Arduino AVR:
-
273 #if defined(ARDUINO_ARCH_AVR)
-
274  #define ARDUHAL_LOG_LEVEL_NONE 0
-
275  #define ARDUHAL_LOG_LEVEL_ERROR 1
-
276  #define ARDUHAL_LOG_LEVEL_WARN 2
-
277  #define ARDUHAL_LOG_LEVEL_INFO 3
-
278  #define ARDUHAL_LOG_LEVEL_DEBUG 4
-
279  #define ARDUHAL_LOG_LEVEL_VERBOSE 5
-
280 
-
281  // Set desired level here!
-
282  #define CORE_DEBUG_LEVEL ARDUHAL_LOG_LEVEL_INFO
-
283 
-
284  #if defined(DEBUG_ESP_PORT) && CORE_DEBUG_LEVEL > ARDUHAL_LOG_LEVEL_NONE
-
285  #define log_e(...) { printf(__VA_ARGS__); println(); }
-
286  #else
-
287  #define log_e(...) {}
-
288  #endif
-
289  #if defined(DEBUG_ESP_PORT) && CORE_DEBUG_LEVEL > ARDUHAL_LOG_LEVEL_ERROR
-
290  #define log_w(...) { printf(__VA_ARGS__); println(); }
-
291  #else
-
292  #define log_w(...) {}
-
293  #endif
-
294  #if defined(DEBUG_ESP_PORT) && CORE_DEBUG_LEVEL > ARDUHAL_LOG_LEVEL_WARN
-
295  #define log_i(...) { printf(__VA_ARGS__); println(); }
-
296  #else
-
297  #define log_i(...) {}
-
298  #endif
-
299  #if defined(DEBUG_ESP_PORT) && CORE_DEBUG_LEVEL > ARDUHAL_LOG_LEVEL_INFO
-
300  #define log_d(...) { printf(__VA_ARGS__); println(); }
-
301  #else
-
302  #define log_d(...) {}
-
303  #endif
-
304  #if defined(DEBUG_ESP_PORT) && CORE_DEBUG_LEVEL > ARDUHAL_LOG_LEVEL_DEBUG
-
305  #define log_v(...) { printf(__VA_ARGS__); println(); }
-
306  #else
-
307  #define log_v(...) {}
-
308  #endif
-
309 #endif
-
310 
-
311 // Disable data type which will not be used to save RAM
-
312 #define WIND_DATA_FLOATINGPOINT
-
313 #define WIND_DATA_FIXEDPOINT
-
314 
-
315 // Select appropriate sensor message format(s)
-
316 // Comment out unused decoders to save operation time/power
-
317 #define BRESSER_5_IN_1
-
318 #define BRESSER_6_IN_1
-
319 #define BRESSER_7_IN_1
-
320 #define BRESSER_LIGHTNING
-
321 #define BRESSER_LEAKAGE
-
322 
-
323 #if ( !defined(BRESSER_5_IN_1) && !defined(BRESSER_6_IN_1) && !defined(BRESSER_7_IN_1) )
-
324  #error "Either BRESSER_5_IN_1 and/or BRESSER_6_IN_1 and/or BRESSER_7_IN_1 must be defined!"
-
325 #endif
-
326 
-
327 #if ( defined(USE_CC1101) && defined(USE_SX1276) )
-
328  #error "Either USE_CC1101 OR USE_SX1276 must be defined!"
-
329 #endif
-
330 
-
331 #if defined(USE_CC1101)
-
332  #define RECEIVER_CHIP "[CC1101]"
-
333 #elif defined(USE_SX1276)
-
334  #define RECEIVER_CHIP "[SX1276]"
-
335 #else
-
336  #error "Either USE_CC1101 or USE_SX1276 must be defined!"
-
337 #endif
-
338 
+
143 // DFRobot Firebeetle32
+
144 // https://github.com/espressif/arduino-esp32/tree/master/variants/firebeetle32/pins_arduino.h
+
145 //
+
146 // This define (not very specific...) is set by selecting "FireBeetle-ESP32" in the Arduino IDE:
+
147 //#define ARDUINO_ESP32_DEV
+
148 
+
149 #if defined(ARDUINO_TTGO_LoRa32_V1)
+
150  #pragma message("ARDUINO_TTGO_LoRa32_V1 defined; using on-board transceiver")
+
151  #define USE_SX1276
+
152 
+
153 #elif defined(ARDUINO_TTGO_LoRa32_V2)
+
154  #pragma message("ARDUINO_TTGO_LoRa32_V2 defined; using on-board transceiver")
+
155  #pragma message("LoRa DIO1 must be wired to GPIO33 manually!")
+
156  #define USE_SX1276
+
157 
+
158 #elif defined(ARDUINO_TTGO_LoRa32_v21new)
+
159  #pragma message("ARDUINO_TTGO_LoRa32_V21new defined; using on-board transceiver")
+
160  #define USE_SX1276
+
161 
+
162 #elif defined(ARDUINO_heltec_wireless_stick)
+
163  #pragma message("ARDUINO_heltec_wireless_stick defined; using on-board transceiver")
+
164  #define USE_SX1276
+
165 
+
166 #elif defined(ARDUINO_heltec_wifi_lora_32_V2)
+
167  #pragma message("ARDUINO_heltec_wifi_lora_32_V2 defined; using on-board transceiver")
+
168  #define USE_SX1276
+
169 
+
170 #elif defined(ARDUINO_ADAFRUIT_FEATHER_ESP32S2)
+
171  #pragma message("ARDUINO_ADAFRUIT_FEATHER_ESP32S2 defined; assuming RFM95W FeatherWing will be used")
+
172  #define USE_SX1276
+
173 
+
174 #elif defined(ARDUINO_FEATHER_ESP32)
+
175  #pragma message("ARDUINO_FEATHER_ESP32 defined; assuming RFM95W FeatherWing will be used")
+
176  #define USE_SX1276
+
177  #pragma message("Required wiring: A to RST, B to DIO1, D to DIO0, E to CS")
+
178 
+
179 #elif defined(ARDUINO_AVR_FEATHER32U4)
+
180  #pragma message("ARDUINO_AVR_FEATHER32U4 defined; assuming this is the Adafruit Feather 32u4 RFM95 LoRa Radio")
+
181  #define USE_SX1276
+
182 
+
183 #elif defined(ARDUINO_ADAFRUIT_FEATHER_RP2040)
+
184  #pragma message("ARDUINO_ADAFRUIT_FEATHER_RP2040 defined; assuming assuming RFM95W FeatherWing will be used")
+
185  #define USE_SX1276
+
186  #pragma message("Required wiring: A to RST, B to DIO1, D to DIO0, E to CS")
+
187 
+
188 #elif defined(ARDUINO_ESP32_DEV)
+
189  //#define LORAWAN_NODE
+
190  #define FIREBEETLE_ESP32_COVER_LORA
+
191 
+
192  #if !defined(LORAWAN_NODE) && !defined(FIREBEETLE_ESP32_COVER_LORA)
+
193  #pragma message("ARDUINO_ESP32_DEV defined; select either LORAWAN_NODE or FIREBEETLE_ESP32_COVER_LORA manually!")
+
194 
+
195  #elif defined(LORAWAN_NODE)
+
196  #pragma message("LORAWAN_NODE defined; assuming this is the LoRaWAN_Node board (DFRobot Firebeetle32 + Adafruit RFM95W LoRa Radio)")
+
197  #define USE_SX1276
+
198 
+
199  #elif defined(FIREBEETLE_ESP32_COVER_LORA)
+
200  #define USE_SX1276
+
201  #pragma message("FIREBEETLE_ESP32_COVER_LORA defined; assuming this is a FireBeetle ESP32 with FireBeetle Cover LoRa")
+
202  #pragma message("Required wiring: D2 to RESET, D3 to DIO0, D4 to CS, D5 to DIO1")
+
203 
+
204  #endif
+
205 #endif
+
206 
+
207 
+
208 // ------------------------------------------------------------------------------------------------
+
209 // --- Radio Transceiver ---
+
210 // ------------------------------------------------------------------------------------------------
+
211 // Select type of receiver module (if not yet defined based on the assumptions above)
+
212 #if ( !defined(USE_CC1101) && !defined(USE_SX1276) )
+
213  //#define USE_CC1101
+
214  #define USE_SX1276
+
215 #endif
+
216 
+
217 
+
218 // ------------------------------------------------------------------------------------------------
+
219 // --- Debug Logging Output ---
+
220 // ------------------------------------------------------------------------------------------------
+
221 // - ESP32:
+
222 // CORE_DEBUG_LEVEL is set in Adruino IDE:
+
223 // Tools->Core Debug Level: "<None>|<Error>|<Warning>|<Info>|<Debug>|<Verbose>"
+
224 // https://github.com/espressif/arduino-esp32/blob/master/cores/esp32/esp32-hal-log.h
+
225 //
+
226 // - ESP8266:
+
227 // DEBUG_ESP_PORT is set in Arduino IDE:
+
228 // Tools->Debug port: "<None>|<Serial>|<Serial1>"
+
229 //
+
230 // - RP2040:
+
231 // DEBUG_RP2040_PORT is set in Arduino IDE:
+
232 // Tools->Debug port: "<Disabled>|<Serial>|<Serial1>|<Serial2>"
+
233 //
+
234 // Replacement for
+
235 // https://github.com/espressif/arduino-esp32/blob/master/cores/esp32/esp32-hal-log.h
+
236 // on ESP8266 and RP2040:
+
237 #if defined(ESP8266) || defined(ARDUINO_ARCH_RP2040)
+
238  #define ARDUHAL_LOG_LEVEL_NONE 0
+
239  #define ARDUHAL_LOG_LEVEL_ERROR 1
+
240  #define ARDUHAL_LOG_LEVEL_WARN 2
+
241  #define ARDUHAL_LOG_LEVEL_INFO 3
+
242  #define ARDUHAL_LOG_LEVEL_DEBUG 4
+
243  #define ARDUHAL_LOG_LEVEL_VERBOSE 5
+
244 
+
245  #if defined(ARDUINO_ARCH_RP2040) && defined(DEBUG_RP2040_PORT)
+
246  #define DEBUG_PORT DEBUG_RP2040_PORT
+
247  #elif defined(DEBUG_ESP_PORT)
+
248  #define DEBUG_PORT DEBUG_ESP_PORT
+
249  #endif
+
250 
+
251  // Set desired level here!
+
252  #define CORE_DEBUG_LEVEL ARDUHAL_LOG_LEVEL_INFO
+
253 
+
254  #if defined(DEBUG_PORT) && CORE_DEBUG_LEVEL > ARDUHAL_LOG_LEVEL_NONE
+
255  #define log_e(...) { DEBUG_PORT.printf("%s(), l.%d: ",__func__, __LINE__); DEBUG_PORT.printf(__VA_ARGS__); DEBUG_PORT.println(); }
+
256  #else
+
257  #define log_e(...) {}
+
258  #endif
+
259  #if defined(DEBUG_PORT) && CORE_DEBUG_LEVEL > ARDUHAL_LOG_LEVEL_ERROR
+
260  #define log_w(...) { DEBUG_PORT.printf("%s(), l.%d: ", __func__, __LINE__); DEBUG_PORT.printf(__VA_ARGS__); DEBUG_PORT.println(); }
+
261  #else
+
262  #define log_w(...) {}
+
263  #endif
+
264  #if defined(DEBUG_PORT) && CORE_DEBUG_LEVEL > ARDUHAL_LOG_LEVEL_WARN
+
265  #define log_i(...) { DEBUG_PORT.printf("%s(), l.%d: ", __func__, __LINE__); DEBUG_PORT.printf(__VA_ARGS__); DEBUG_PORT.println(); }
+
266  #else
+
267  #define log_i(...) {}
+
268  #endif
+
269  #if defined(DEBUG_PORT) && CORE_DEBUG_LEVEL > ARDUHAL_LOG_LEVEL_INFO
+
270  #define log_d(...) { DEBUG_PORT.printf("%s(), l.%d: ", __func__, __LINE__); DEBUG_PORT.printf(__VA_ARGS__); DEBUG_PORT.println(); }
+
271  #else
+
272  #define log_d(...) {}
+
273  #endif
+
274  #if defined(DEBUG_PORT) && CORE_DEBUG_LEVEL > ARDUHAL_LOG_LEVEL_DEBUG
+
275  #define log_v(...) { DEBUG_PORT.printf("%s(), l.%d: ", __func__, __LINE__); DEBUG_PORT.printf(__VA_ARGS__); DEBUG_PORT.println(); }
+
276  #else
+
277  #define log_v(...) {}
+
278  #endif
+
279 
+
280 #endif
+
281 
+
282 
+
283 // Replacement for
+
284 // https://github.com/espressif/arduino-esp32/blob/master/cores/esp32/esp32-hal-log.h
+
285 // on Arduino AVR:
+
286 #if defined(ARDUINO_ARCH_AVR)
+
287  #define ARDUHAL_LOG_LEVEL_NONE 0
+
288  #define ARDUHAL_LOG_LEVEL_ERROR 1
+
289  #define ARDUHAL_LOG_LEVEL_WARN 2
+
290  #define ARDUHAL_LOG_LEVEL_INFO 3
+
291  #define ARDUHAL_LOG_LEVEL_DEBUG 4
+
292  #define ARDUHAL_LOG_LEVEL_VERBOSE 5
+
293 
+
294  // Set desired level here!
+
295  #define CORE_DEBUG_LEVEL ARDUHAL_LOG_LEVEL_INFO
+
296 
+
297  #if defined(DEBUG_ESP_PORT) && CORE_DEBUG_LEVEL > ARDUHAL_LOG_LEVEL_NONE
+
298  #define log_e(...) { printf(__VA_ARGS__); println(); }
+
299  #else
+
300  #define log_e(...) {}
+
301  #endif
+
302  #if defined(DEBUG_ESP_PORT) && CORE_DEBUG_LEVEL > ARDUHAL_LOG_LEVEL_ERROR
+
303  #define log_w(...) { printf(__VA_ARGS__); println(); }
+
304  #else
+
305  #define log_w(...) {}
+
306  #endif
+
307  #if defined(DEBUG_ESP_PORT) && CORE_DEBUG_LEVEL > ARDUHAL_LOG_LEVEL_WARN
+
308  #define log_i(...) { printf(__VA_ARGS__); println(); }
+
309  #else
+
310  #define log_i(...) {}
+
311  #endif
+
312  #if defined(DEBUG_ESP_PORT) && CORE_DEBUG_LEVEL > ARDUHAL_LOG_LEVEL_INFO
+
313  #define log_d(...) { printf(__VA_ARGS__); println(); }
+
314  #else
+
315  #define log_d(...) {}
+
316  #endif
+
317  #if defined(DEBUG_ESP_PORT) && CORE_DEBUG_LEVEL > ARDUHAL_LOG_LEVEL_DEBUG
+
318  #define log_v(...) { printf(__VA_ARGS__); println(); }
+
319  #else
+
320  #define log_v(...) {}
+
321  #endif
+
322 #endif
+
323 
+
324 #if ( !defined(BRESSER_5_IN_1) && !defined(BRESSER_6_IN_1) && !defined(BRESSER_7_IN_1) )
+
325  #error "Either BRESSER_5_IN_1 and/or BRESSER_6_IN_1 and/or BRESSER_7_IN_1 must be defined!"
+
326 #endif
+
327 
+
328 #if ( defined(USE_CC1101) && defined(USE_SX1276) )
+
329  #error "Either USE_CC1101 OR USE_SX1276 must be defined!"
+
330 #endif
+
331 
+
332 #if defined(USE_CC1101)
+
333  #define RECEIVER_CHIP "[CC1101]"
+
334 #elif defined(USE_SX1276)
+
335  #define RECEIVER_CHIP "[SX1276]"
+
336 #else
+
337  #error "Either USE_CC1101 or USE_SX1276 must be defined!"
+
338 #endif
339 
-
340 // Arduino default SPI pins
-
341 //
-
342 // Board SCK MOSI MISO
-
343 // ESP8266 D5 D7 D6
-
344 // ESP32 D18 D23 D19
-
345 #if defined(LORAWAN_NODE)
-
346  // Use pinning for LoRaWAN_Node (https://github.com/matthias-bs/LoRaWAN_Node)
-
347  #define PIN_RECEIVER_CS 14
-
348 
-
349  // CC1101: GDO0 / RFM95W/SX127x: G0
-
350  #define PIN_RECEIVER_IRQ 4
-
351 
-
352  // CC1101: GDO2 / RFM95W/SX127x: G1
-
353  #define PIN_RECEIVER_GPIO 16
-
354 
-
355  // RFM95W/SX127x - GPIOxx / CC1101 - RADIOLIB_NC
-
356  #define PIN_RECEIVER_RST 12
-
357 
-
358 #elif defined(FIREBEETLE_ESP32_COVER_LORA)
-
359  #define PIN_RECEIVER_CS 27 // D4
-
360 
-
361  // CC1101: GDO0 / RFM95W/SX127x: G0
-
362  #define PIN_RECEIVER_IRQ 26 // D3
-
363 
-
364  // CC1101: GDO2 / RFM95W/SX127x: G1
-
365  #define PIN_RECEIVER_GPIO 9 // D5
-
366 
-
367  // RFM95W/SX127x - GPIOxx / CC1101 - RADIOLIB_NC
-
368  #define PIN_RECEIVER_RST 25 // D2
-
369 
-
370 #elif defined(ARDUINO_TTGO_LoRa32_V1) || defined(ARDUINO_TTGO_LoRa32_V2)
-
371  // Use pinning for LILIGO TTGO LoRa32-OLED
-
372  #define PIN_RECEIVER_CS LORA_CS
-
373 
-
374  // CC1101: GDO0 / RFM95W/SX127x: G0
-
375  #define PIN_RECEIVER_IRQ LORA_IRQ
-
376 
-
377  // CC1101: GDO2 / RFM95W/SX127x: G1
-
378  // n.c. on v1/v2?, LORA_D1 on v21
-
379  #define PIN_RECEIVER_GPIO 33
-
380 
-
381  // RFM95W/SX127x - GPIOxx / CC1101 - RADIOLIB_NC
-
382  #define PIN_RECEIVER_RST LORA_RST
-
383 
-
384 #elif defined(ARDUINO_TTGO_LoRa32_v21new)
-
385  // Use pinning for LILIGO TTGO LoRa32-OLED V2.1 (1.6.1)
-
386  // Same pinout for Heltec Wireless Stick
-
387  #define PIN_RECEIVER_CS LORA_CS
-
388 
-
389  // CC1101: GDO0 / RFM95W/SX127x: G0
-
390  #define PIN_RECEIVER_IRQ LORA_IRQ
-
391 
-
392  // CC1101: GDO2 / RFM95W/SX127x: G1
-
393  #define PIN_RECEIVER_GPIO LORA_D1
-
394 
-
395  // RFM95W/SX127x - GPIOxx / CC1101 - RADIOLIB_NC
-
396  #define PIN_RECEIVER_RST LORA_RST
-
397 
-
398 #elif defined(ARDUINO_heltec_wireless_stick) || defined(ARDUINO_heltec_wifi_lora_32_V2)
-
399  // Use pinning for Heltec Wireless Stick or WiFi LoRa32 V2, respectively
-
400  #define PIN_RECEIVER_CS SS
-
401 
-
402  // CC1101: GDO0 / RFM95W/SX127x: G0
-
403  #define PIN_RECEIVER_IRQ DIO0
-
404 
-
405  // CC1101: GDO2 / RFM95W/SX127x: G1
-
406  #define PIN_RECEIVER_GPIO DIO1
-
407 
-
408  // RFM95W/SX127x - GPIOxx / CC1101 - RADIOLIB_NC
-
409  #define PIN_RECEIVER_RST RST_LoRa
-
410 
-
411 #elif defined(ARDUINO_ADAFRUIT_FEATHER_ESP32S2)
-
412  // Use pinning for Adafruit Feather ESP32S2 with RFM95W "FeatherWing" ADA3232
-
413  #define PIN_RECEIVER_CS 6
-
414 
-
415  // CC1101: GDO0 / RFM95W/SX127x: G0
-
416  #define PIN_RECEIVER_IRQ 5
-
417 
-
418  // CC1101: GDO2 / RFM95W/SX127x: G1
-
419  #define PIN_RECEIVER_GPIO 11
-
420 
-
421  // RFM95W/SX127x - GPIOxx / CC1101 - RADIOLIB_NC
-
422  #define PIN_RECEIVER_RST 9
-
423 
-
424 #elif defined(ARDUINO_FEATHER_ESP32)
-
425  // Use pinning for Adafruit Feather ESP32 with RFM95W "FeatherWing" ADA3232
-
426  #define PIN_RECEIVER_CS 14
-
427 
-
428  // CC1101: GDO0 / RFM95W/SX127x: G0
-
429  #define PIN_RECEIVER_IRQ 32
-
430 
-
431  // CC1101: GDO2 / RFM95W/SX127x: G1
-
432  #define PIN_RECEIVER_GPIO 33
-
433 
-
434  // RFM95W/SX127x - GPIOxx / CC1101 - RADIOLIB_NC
-
435  #define PIN_RECEIVER_RST 27
-
436 
-
437 #elif defined(ESP32)
-
438  // Generic pinning for ESP32 development boards
-
439  #define PIN_RECEIVER_CS 27
-
440 
-
441  // CC1101: GDO0 / RFM95W/SX127x: G0
-
442  #define PIN_RECEIVER_IRQ 21
-
443 
-
444  // CC1101: GDO2 / RFM95W/SX127x: G1
-
445  #define PIN_RECEIVER_GPIO 33
-
446 
-
447  // RFM95W/SX127x - GPIOxx / CC1101 - RADIOLIB_NC
-
448  #define PIN_RECEIVER_RST 32
-
449 
-
450 #elif defined(ESP8266)
-
451  // Generic pinning for ESP8266 development boards (e.g. LOLIN/WEMOS D1 mini)
-
452  #define PIN_RECEIVER_CS 15
-
453 
-
454  // CC1101: GDO0 / RFM95W/SX127x: G0
-
455  #define PIN_RECEIVER_IRQ 4
-
456 
-
457  // CC1101: GDO2 / RFM95W/SX127x: G1
-
458  #define PIN_RECEIVER_GPIO 5
-
459 
-
460  // RFM95W/SX127x - GPIOxx / CC1101 - RADIOLIB_NC
-
461  #define PIN_RECEIVER_RST 2
-
462 
-
463 #elif defined(ARDUINO_AVR_FEATHER32U4)
-
464  // Pinning for Adafruit Feather 32u4
-
465  #define PIN_RECEIVER_CS 8
-
466 
-
467  // CC1101: GDO0 / RFM95W/SX127x: G0
-
468  #define PIN_RECEIVER_IRQ 7
-
469 
-
470  // CC1101: GDO2 / RFM95W/SX127x: G1 (not used)
-
471  #define PIN_RECEIVER_GPIO 99
-
472 
-
473  // RFM95W/SX127x - GPIOxx / CC1101 - RADIOLIB_NC
-
474  #define PIN_RECEIVER_RST 4
-
475 
-
476 #elif defined(ARDUINO_ADAFRUIT_FEATHER_RP2040)
-
477  // Use pinning for Adafruit Feather RP2040 with RFM95W "FeatherWing" ADA3232
-
478  #define PIN_RECEIVER_CS 7
-
479 
-
480  // CC1101: GDO0 / RFM95W/SX127x: G0
-
481  #define PIN_RECEIVER_IRQ 8
-
482 
-
483  // CC1101: GDO2 / RFM95W/SX127x: G1 (not used)
-
484  #define PIN_RECEIVER_GPIO 10
-
485 
-
486  // RFM95W/SX127x - GPIOxx / CC1101 - RADIOLIB_NC
-
487  #define PIN_RECEIVER_RST 11
-
488 
-
489 #endif
-
490 
-
491 #define STR_HELPER(x) #x
-
492 #define STR(x) STR_HELPER(x)
-
493 #pragma message("Receiver chip: " RECEIVER_CHIP)
-
494 #pragma message("Pin config: RST->" STR(PIN_RECEIVER_RST) ", CS->" STR(PIN_RECEIVER_CS) ", GD0/G0/IRQ->" STR(PIN_RECEIVER_IRQ) ", GDO2/G1/GPIO->" STR(PIN_RECEIVER_GPIO) )
-
495 
-
496 #endif
+
340 
+
341 // Arduino default SPI pins
+
342 //
+
343 // Board SCK MOSI MISO
+
344 // ESP8266 D5 D7 D6
+
345 // ESP32 D18 D23 D19
+
346 #if defined(LORAWAN_NODE)
+
347  // Use pinning for LoRaWAN_Node (https://github.com/matthias-bs/LoRaWAN_Node)
+
348  #define PIN_RECEIVER_CS 14
+
349 
+
350  // CC1101: GDO0 / RFM95W/SX127x: G0
+
351  #define PIN_RECEIVER_IRQ 4
+
352 
+
353  // CC1101: GDO2 / RFM95W/SX127x: G1
+
354  #define PIN_RECEIVER_GPIO 16
+
355 
+
356  // RFM95W/SX127x - GPIOxx / CC1101 - RADIOLIB_NC
+
357  #define PIN_RECEIVER_RST 12
+
358 
+
359 #elif defined(FIREBEETLE_ESP32_COVER_LORA)
+
360  #define PIN_RECEIVER_CS 27 // D4
+
361 
+
362  // CC1101: GDO0 / RFM95W/SX127x: G0
+
363  #define PIN_RECEIVER_IRQ 26 // D3
+
364 
+
365  // CC1101: GDO2 / RFM95W/SX127x: G1
+
366  #define PIN_RECEIVER_GPIO 9 // D5
+
367 
+
368  // RFM95W/SX127x - GPIOxx / CC1101 - RADIOLIB_NC
+
369  #define PIN_RECEIVER_RST 25 // D2
+
370 
+
371 #elif defined(ARDUINO_TTGO_LoRa32_V1) || defined(ARDUINO_TTGO_LoRa32_V2)
+
372  // Use pinning for LILIGO TTGO LoRa32-OLED
+
373  #define PIN_RECEIVER_CS LORA_CS
+
374 
+
375  // CC1101: GDO0 / RFM95W/SX127x: G0
+
376  #define PIN_RECEIVER_IRQ LORA_IRQ
+
377 
+
378  // CC1101: GDO2 / RFM95W/SX127x: G1
+
379  // n.c. on v1/v2?, LORA_D1 on v21
+
380  #define PIN_RECEIVER_GPIO 33
+
381 
+
382  // RFM95W/SX127x - GPIOxx / CC1101 - RADIOLIB_NC
+
383  #define PIN_RECEIVER_RST LORA_RST
+
384 
+
385 #elif defined(ARDUINO_TTGO_LoRa32_v21new)
+
386  // Use pinning for LILIGO TTGO LoRa32-OLED V2.1 (1.6.1)
+
387  // Same pinout for Heltec Wireless Stick
+
388  #define PIN_RECEIVER_CS LORA_CS
+
389 
+
390  // CC1101: GDO0 / RFM95W/SX127x: G0
+
391  #define PIN_RECEIVER_IRQ LORA_IRQ
+
392 
+
393  // CC1101: GDO2 / RFM95W/SX127x: G1
+
394  #define PIN_RECEIVER_GPIO LORA_D1
+
395 
+
396  // RFM95W/SX127x - GPIOxx / CC1101 - RADIOLIB_NC
+
397  #define PIN_RECEIVER_RST LORA_RST
+
398 
+
399 #elif defined(ARDUINO_heltec_wireless_stick) || defined(ARDUINO_heltec_wifi_lora_32_V2)
+
400  // Use pinning for Heltec Wireless Stick or WiFi LoRa32 V2, respectively
+
401  #define PIN_RECEIVER_CS SS
+
402 
+
403  // CC1101: GDO0 / RFM95W/SX127x: G0
+
404  #define PIN_RECEIVER_IRQ DIO0
+
405 
+
406  // CC1101: GDO2 / RFM95W/SX127x: G1
+
407  #define PIN_RECEIVER_GPIO DIO1
+
408 
+
409  // RFM95W/SX127x - GPIOxx / CC1101 - RADIOLIB_NC
+
410  #define PIN_RECEIVER_RST RST_LoRa
+
411 
+
412 #elif defined(ARDUINO_ADAFRUIT_FEATHER_ESP32S2)
+
413  // Use pinning for Adafruit Feather ESP32S2 with RFM95W "FeatherWing" ADA3232
+
414  #define PIN_RECEIVER_CS 6
+
415 
+
416  // CC1101: GDO0 / RFM95W/SX127x: G0
+
417  #define PIN_RECEIVER_IRQ 5
+
418 
+
419  // CC1101: GDO2 / RFM95W/SX127x: G1
+
420  #define PIN_RECEIVER_GPIO 11
+
421 
+
422  // RFM95W/SX127x - GPIOxx / CC1101 - RADIOLIB_NC
+
423  #define PIN_RECEIVER_RST 9
+
424 
+
425 #elif defined(ARDUINO_FEATHER_ESP32)
+
426  // Use pinning for Adafruit Feather ESP32 with RFM95W "FeatherWing" ADA3232
+
427  #define PIN_RECEIVER_CS 14
+
428 
+
429  // CC1101: GDO0 / RFM95W/SX127x: G0
+
430  #define PIN_RECEIVER_IRQ 32
+
431 
+
432  // CC1101: GDO2 / RFM95W/SX127x: G1
+
433  #define PIN_RECEIVER_GPIO 33
+
434 
+
435  // RFM95W/SX127x - GPIOxx / CC1101 - RADIOLIB_NC
+
436  #define PIN_RECEIVER_RST 27
+
437 
+
438 #elif defined(ESP32)
+
439  // Generic pinning for ESP32 development boards
+
440  #define PIN_RECEIVER_CS 27
+
441 
+
442  // CC1101: GDO0 / RFM95W/SX127x: G0
+
443  #define PIN_RECEIVER_IRQ 21
+
444 
+
445  // CC1101: GDO2 / RFM95W/SX127x: G1
+
446  #define PIN_RECEIVER_GPIO 33
+
447 
+
448  // RFM95W/SX127x - GPIOxx / CC1101 - RADIOLIB_NC
+
449  #define PIN_RECEIVER_RST 32
+
450 
+
451 #elif defined(ESP8266)
+
452  // Generic pinning for ESP8266 development boards (e.g. LOLIN/WEMOS D1 mini)
+
453  #define PIN_RECEIVER_CS 15
+
454 
+
455  // CC1101: GDO0 / RFM95W/SX127x: G0
+
456  #define PIN_RECEIVER_IRQ 4
+
457 
+
458  // CC1101: GDO2 / RFM95W/SX127x: G1
+
459  #define PIN_RECEIVER_GPIO 5
+
460 
+
461  // RFM95W/SX127x - GPIOxx / CC1101 - RADIOLIB_NC
+
462  #define PIN_RECEIVER_RST 2
+
463 
+
464 #elif defined(ARDUINO_AVR_FEATHER32U4)
+
465  // Pinning for Adafruit Feather 32u4
+
466  #define PIN_RECEIVER_CS 8
+
467 
+
468  // CC1101: GDO0 / RFM95W/SX127x: G0
+
469  #define PIN_RECEIVER_IRQ 7
+
470 
+
471  // CC1101: GDO2 / RFM95W/SX127x: G1 (not used)
+
472  #define PIN_RECEIVER_GPIO 99
+
473 
+
474  // RFM95W/SX127x - GPIOxx / CC1101 - RADIOLIB_NC
+
475  #define PIN_RECEIVER_RST 4
+
476 
+
477 #elif defined(ARDUINO_ADAFRUIT_FEATHER_RP2040)
+
478  // Use pinning for Adafruit Feather RP2040 with RFM95W "FeatherWing" ADA3232
+
479  #define PIN_RECEIVER_CS 7
+
480 
+
481  // CC1101: GDO0 / RFM95W/SX127x: G0
+
482  #define PIN_RECEIVER_IRQ 8
+
483 
+
484  // CC1101: GDO2 / RFM95W/SX127x: G1 (not used)
+
485  #define PIN_RECEIVER_GPIO 10
+
486 
+
487  // RFM95W/SX127x - GPIOxx / CC1101 - RADIOLIB_NC
+
488  #define PIN_RECEIVER_RST 11
+
489 
+
490 #endif
+
491 
+
492 #define STR_HELPER(x) #x
+
493 #define STR(x) STR_HELPER(x)
+
494 #pragma message("Receiver chip: " RECEIVER_CHIP)
+
495 #pragma message("Pin config: RST->" STR(PIN_RECEIVER_RST) ", CS->" STR(PIN_RECEIVER_CS) ", GD0/G0/IRQ->" STR(PIN_RECEIVER_IRQ) ", GDO2/G1/GPIO->" STR(PIN_RECEIVER_GPIO) )
+
496 
+
497 #endif