2022-12-30 20:44:51 +00:00
|
|
|
#if defined(ARCH_RASPBERRY_PI)
|
|
|
|
|
|
|
|
#define GPIOD_CHIP_LABEL "pinctrl-bcm2711"
|
|
|
|
|
|
|
|
#define USE_RF95
|
|
|
|
#define USE_SX1262
|
|
|
|
|
|
|
|
#define NO_SCREEN
|
|
|
|
|
|
|
|
#define RF95_SCK 11
|
|
|
|
#define RF95_MISO 9
|
|
|
|
#define RF95_MOSI 10
|
|
|
|
#define RF95_NSS RADIOLIB_NC
|
|
|
|
|
|
|
|
#define LORA_DIO0 4 // a No connect on the SX1262 module
|
|
|
|
#define LORA_DIO0_LABEL "GPIO_GCLK"
|
|
|
|
#define LORA_RESET 17
|
|
|
|
#define LORA_RESET_LABEL "GPIO17"
|
2023-02-02 09:49:45 +00:00
|
|
|
#define LORA_DIO1 \
|
|
|
|
RADIOLIB_NC // SX1262 IRQ, called DIO0 on pinelora schematic, pin 7 on ch341f "ack" - FIXME, enable hwints in linux
|
|
|
|
#define LORA_DIO2 RADIOLIB_NC // SX1262 BUSY, actually connected to "DIO5" on pinelora schematic, pin 8 on ch341f "slct"
|
2022-12-30 20:44:51 +00:00
|
|
|
#define LORA_DIO3 RADIOLIB_NC // Not connected on PCB, but internally on the TTGO SX1262, if DIO3 is high the TXCO is enabled
|
|
|
|
|
|
|
|
#ifdef USE_SX1262
|
|
|
|
#define SX126X_CS RF95_NSS
|
|
|
|
#define SX126X_DIO1 LORA_DIO0
|
|
|
|
#define SX126X_BUSY LORA_DIO2
|
|
|
|
#define SX126X_RESET LORA_RESET
|
2023-02-02 09:49:45 +00:00
|
|
|
// HOPE RFM90 does not have a TCXO therefore not SX126X_E22
|
2022-12-30 20:44:51 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#else // Pine64 mode.
|
|
|
|
|
2022-01-19 00:35:42 +00:00
|
|
|
// Pine64 uses a common pinout for their SX1262 vs RF95 modules - both can be enabled and we will probe at runtime for RF95 and if
|
|
|
|
// not found then probe for SX1262. Currently the RF95 code is disabled because I think the RF95 module won't need to ship.
|
|
|
|
// #define USE_RF95
|
|
|
|
#define USE_SX1262
|
|
|
|
|
|
|
|
// Fake SPI device selections
|
|
|
|
#define RF95_SCK 5
|
|
|
|
#define RF95_MISO 19
|
|
|
|
#define RF95_MOSI 27
|
|
|
|
#define RF95_NSS RADIOLIB_NC // the ch341f spi controller does CS for us
|
|
|
|
|
|
|
|
#define LORA_DIO0 26 // a No connect on the SX1262 module
|
|
|
|
#define LORA_RESET 14
|
|
|
|
#define LORA_DIO1 33 // SX1262 IRQ, called DIO0 on pinelora schematic, pin 7 on ch341f "ack" - FIXME, enable hwints in linux
|
2023-01-21 13:34:29 +00:00
|
|
|
#define LORA_DIO2 32 // SX1262 BUSY, actually connected to "DIO5" on pinelora schematic, pin 8 on ch341f "slct"
|
2022-12-30 20:44:51 +00:00
|
|
|
#define LORA_DIO3 RADIOLIB_NC // Not connected on PCB, but internally on the TTGO SX1262, if DIO3 is high the TXCO is enabled
|
2022-01-19 00:35:42 +00:00
|
|
|
|
|
|
|
#ifdef USE_SX1262
|
|
|
|
#define SX126X_CS 20 // CS0 on pinelora schematic, hooked to gpio D0 on ch341f
|
|
|
|
#define SX126X_DIO1 LORA_DIO1
|
|
|
|
#define SX126X_BUSY LORA_DIO2
|
|
|
|
#define SX126X_RESET LORA_RESET
|
2022-05-30 00:30:20 +00:00
|
|
|
#endif
|
|
|
|
|
2022-12-30 20:44:51 +00:00
|
|
|
#endif
|