diff --git a/software/firmware/binaries/ESP32C3/SoftRF/SoftRF-firmware-v1.5-ESP32C3.zip b/software/firmware/binaries/ESP32C3/SoftRF/SoftRF-firmware-v1.5-ESP32C3.zip index 484434a15..157d1fd68 100644 Binary files a/software/firmware/binaries/ESP32C3/SoftRF/SoftRF-firmware-v1.5-ESP32C3.zip and b/software/firmware/binaries/ESP32C3/SoftRF/SoftRF-firmware-v1.5-ESP32C3.zip differ diff --git a/software/firmware/binaries/ESP32C6/SoftRF/SoftRF-firmware-v1.5-ESP32C6.zip b/software/firmware/binaries/ESP32C6/SoftRF/SoftRF-firmware-v1.5-ESP32C6.zip new file mode 100644 index 000000000..64813b5f1 Binary files /dev/null and b/software/firmware/binaries/ESP32C6/SoftRF/SoftRF-firmware-v1.5-ESP32C6.zip differ diff --git a/software/firmware/binaries/README.md b/software/firmware/binaries/README.md index b8efb4760..65762f438 100644 --- a/software/firmware/binaries/README.md +++ b/software/firmware/binaries/README.md @@ -19,7 +19,7 @@ Model|Instructions|Firmware folder ---|:---:|:---: -[Standalone Edition](https://github.com/lyusupov/SoftRF/wiki/Standalone-Edition)|[NodeMCU](https://github.com/lyusupov/SoftRF/blob/master/software/firmware/binaries/README.md#nodemcu)
[ESP32-C3](https://github.com/lyusupov/SoftRF/blob/master/software/firmware/binaries/README.md#esp32-c3)
[ESP32-C6](https://github.com/lyusupov/SoftRF/blob/master/software/firmware/binaries/README.md#esp32-c6)|[NodeMCU](https://github.com/lyusupov/SoftRF/tree/master/software/firmware/binaries/NodeMCU/SoftRF)
[ESP32C3](https://github.com/lyusupov/SoftRF/tree/master/software/firmware/binaries/ESP32C3/SoftRF)
ESP32C6 +[Standalone Edition](https://github.com/lyusupov/SoftRF/wiki/Standalone-Edition)|[NodeMCU](https://github.com/lyusupov/SoftRF/blob/master/software/firmware/binaries/README.md#nodemcu)
[ESP32-C3](https://github.com/lyusupov/SoftRF/blob/master/software/firmware/binaries/README.md#esp32-c3)
[ESP32-C6](https://github.com/lyusupov/SoftRF/blob/master/software/firmware/binaries/README.md#esp32-c6)|[NodeMCU](https://github.com/lyusupov/SoftRF/tree/master/software/firmware/binaries/NodeMCU/SoftRF)
[ESP32C3](https://github.com/lyusupov/SoftRF/tree/master/software/firmware/binaries/ESP32C3/SoftRF)
[ESP32C6](https://github.com/lyusupov/SoftRF/tree/master/software/firmware/binaries/ESP32C6/SoftRF) [Prime Edition Mk2](https://github.com/lyusupov/SoftRF/wiki/Prime-Edition-MkII)|[ESP32](https://github.com/lyusupov/SoftRF/blob/master/software/firmware/binaries/README.md#esp32)|[ESP32](https://github.com/lyusupov/SoftRF/tree/master/software/firmware/binaries/ESP32/SoftRF) [Prime Edition Mk3](https://github.com/lyusupov/SoftRF/wiki/Prime-Edition-MkIII)|[ESP32-S3](https://github.com/lyusupov/SoftRF/blob/master/software/firmware/binaries/README.md#esp32-s3)|[ESP32S3](https://github.com/lyusupov/SoftRF/tree/master/software/firmware/binaries/ESP32S3/SoftRF/MassStorage) [Ham Edition](https://github.com/lyusupov/SoftRF/wiki/Ham-Edition)|[ESP32-S3](https://github.com/lyusupov/SoftRF/blob/master/software/firmware/binaries/README.md#esp32-s3)|[ESP32S3](https://github.com/lyusupov/SoftRF/tree/master/software/firmware/binaries/ESP32S3/SoftRF/MassStorage) diff --git a/software/firmware/source/SoftRF/src/platform/ESP32.cpp b/software/firmware/source/SoftRF/src/platform/ESP32.cpp index bcbc455a5..5554b557e 100644 --- a/software/firmware/source/SoftRF/src/platform/ESP32.cpp +++ b/software/firmware/source/SoftRF/src/platform/ESP32.cpp @@ -1296,7 +1296,7 @@ static void ESP32_setup() } else if (esp32_board == ESP32_C2_DEVKIT) { lmic_pins.nss = SOC_GPIO_PIN_C2_SS; - lmic_pins.rst = LMIC_UNUSED_PIN; + lmic_pins.rst = SOC_GPIO_PIN_C2_RST; lmic_pins.busy = SOC_GPIO_PIN_C2_TXE; #endif /* CONFIG_IDF_TARGET_ESP32C2 */ @@ -1311,7 +1311,7 @@ static void ESP32_setup() #endif /* ARDUINO_USB_CDC_ON_BOOT */ lmic_pins.nss = SOC_GPIO_PIN_C3_SS; - lmic_pins.rst = LMIC_UNUSED_PIN; + lmic_pins.rst = SOC_GPIO_PIN_C3_RST; lmic_pins.busy = SOC_GPIO_PIN_C3_TXE; #endif /* CONFIG_IDF_TARGET_ESP32C3 */ @@ -1326,7 +1326,7 @@ static void ESP32_setup() #endif /* ARDUINO_USB_CDC_ON_BOOT */ lmic_pins.nss = SOC_GPIO_PIN_C6_SS; - lmic_pins.rst = LMIC_UNUSED_PIN; + lmic_pins.rst = SOC_GPIO_PIN_C6_RST; lmic_pins.busy = SOC_GPIO_PIN_C6_TXE; } else if (esp32_board == ESP32_LILYGO_T3C6) { @@ -4015,10 +4015,20 @@ static bool ESP32_Baro_setup() } else if (esp32_board == ESP32_C2_DEVKIT) { + if ((hw_info.rf != RF_IC_SX1276 && hw_info.rf != RF_IC_SX1262) || + RF_SX12XX_RST_is_connected) { + return false; + } + Wire.setPins(SOC_GPIO_PIN_C2_SDA, SOC_GPIO_PIN_C2_SCL); } else if (esp32_board == ESP32_C3_DEVKIT) { + if ((hw_info.rf != RF_IC_SX1276 && hw_info.rf != RF_IC_SX1262) || + RF_SX12XX_RST_is_connected) { + return false; + } + Wire.setPins(SOC_GPIO_PIN_C3_SDA, SOC_GPIO_PIN_C3_SCL); } else if (esp32_board == ESP32_LILYGO_T_TWR2) { @@ -4031,6 +4041,11 @@ static bool ESP32_Baro_setup() } else if (esp32_board == ESP32_C6_DEVKIT) { + if ((hw_info.rf != RF_IC_SX1276 && hw_info.rf != RF_IC_SX1262) || + RF_SX12XX_RST_is_connected) { + return false; + } + Wire.setPins(SOC_GPIO_PIN_C6_SDA, SOC_GPIO_PIN_C6_SCL); } else if (esp32_board == ESP32_LILYGO_T3C6) { diff --git a/software/firmware/source/libraries/nRF905/nRF905_config.h b/software/firmware/source/libraries/nRF905/nRF905_config.h index f39b93a30..a55d18ca6 100644 --- a/software/firmware/source/libraries/nRF905/nRF905_config.h +++ b/software/firmware/source/libraries/nRF905/nRF905_config.h @@ -107,19 +107,37 @@ #elif defined(ESP32) -#if !defined(CONFIG_IDF_TARGET_ESP32C3) -// DOIT ESP32 -#define TRX_EN 2 // Enable/standby pin -#define PWR_MODE 14 // Power mode pin -#define TX_EN 26 // TX / RX mode pin -#define CS_N 18 // SPI slave select pin -#else +#if defined(CONFIG_IDF_TARGET_ESP32C2) +// NodeMCU 1.0 + WT018684-S5 GPIO pins +#define TRX_EN 8 // D4 // Enable/standby pin +#define PWR_MODE 10 // D2 // Power mode pin +#define TX_EN 2 // D0 // TX / RX mode pin +#define CS_N 7 // D8 // SPI slave select pin +#elif defined(CONFIG_IDF_TARGET_ESP32C3) // NodeMCU 1.0 + ESP-C3-12F GPIO pins #define TRX_EN 10 // D4 // Enable/standby pin #define PWR_MODE 18 // D2 // Power mode pin #define TX_EN 2 // D0 // TX / RX mode pin #define CS_N 8 // D8 // SPI slave select pin -#endif /* CONFIG_IDF_TARGET_ESP32C3 */ +#elif defined(CONFIG_IDF_TARGET_ESP32C6) +// NodeMCU 1.0 + WT0132C6-S5 GPIO pins +#define TRX_EN 8 // D4 // Enable/standby pin +#define PWR_MODE 10 // D2 // Power mode pin +#define TX_EN 2 // D0 // TX / RX mode pin +#define CS_N 7 // D8 // SPI slave select pin +#elif defined(CONFIG_IDF_TARGET_ESP32H2) +// TBD +#define TRX_EN 8 // D4 // Enable/standby pin +#define PWR_MODE 10 // D2 // Power mode pin +#define TX_EN 2 // D0 // TX / RX mode pin +#define CS_N 7 // D8 // SPI slave select pin +#else +// DOIT ESP32 +#define TRX_EN 2 // Enable/standby pin +#define PWR_MODE 14 // Power mode pin +#define TX_EN 26 // TX / RX mode pin +#define CS_N 18 // SPI slave select pin +#endif /* CONFIG_IDF_TARGET_ESP32CX */ #define CD 0 // Carrier detect pin (for collision avoidance, if enabled) #define DREADY 5