diff --git a/README.md b/README.md index 44f85f21c..f3d43a0e3 100644 --- a/README.md +++ b/README.md @@ -82,7 +82,7 @@ Data|FLARM NMEA|
![](https://github.com/lyusupov/SoftRF/raw/mas
Model(s)|Platform|First appearance| Status |Notes
---|:---:|:---:|:---:|---
1 [Prime](https://github.com/lyusupov/SoftRF/wiki/Prime-Edition)
2 [Standalone](https://github.com/lyusupov/SoftRF/wiki/Standalone-Edition)
3 [UAV](https://github.com/lyusupov/SoftRF/wiki/UAV-Edition)
4 [**WebTop Serial**](https://github.com/lyusupov/SoftRF/wiki/WebTop-Serial-adapter)|[Espressif
ESP8266](https://en.wikipedia.org/wiki/ESP8266)|Q4 2015|![](https://github.com/lyusupov/SoftRF/raw/master/documents/images/icon_good.png)|[Prime](https://github.com/lyusupov/SoftRF/wiki/Prime-Edition) model is no longer supported - use [Prime MkII](https://github.com/lyusupov/SoftRF/wiki/Prime-Edition-MkII) instead.
-1 [**Prime Mark II**](https://github.com/lyusupov/SoftRF/wiki/Prime-Edition-MkII)
2 [**Standalone**](https://github.com/lyusupov/SoftRF/wiki/Standalone-Edition) + [adapter](https://github.com/lyusupov/ESP32-NODEMCU-ADAPTER)
3 [UAV](https://github.com/lyusupov/SoftRF/wiki/UAV-Edition)
4 [**SkyView EZ**](https://github.com/lyusupov/SoftRF/wiki/SkyView-EZ)
5 [Flight Recorder](https://github.com/lyusupov/SoftRF/wiki/Flight-Recorder)
6 [**WebTop USB**](https://github.com/lyusupov/SoftRF/wiki/WebTop-USB)![](https://github.com/lyusupov/SoftRF/raw/master/documents/images/new-icon.jpg)|[Espressif
ESP32](https://en.wikipedia.org/wiki/ESP32)
[ESP32-S2](https://en.wikipedia.org/wiki/ESP32#ESP32-S2)
[ESP32-S3](https://en.wikipedia.org/wiki/ESP32#ESP32-S3)|Q1 2018|![](https://github.com/lyusupov/SoftRF/raw/master/documents/images/icon_good.png)|1 today's best platform ;
2 holds [**FCC** mark](https://github.com/lyusupov/SoftRF/wiki/Prime-Edition-MkII#certificates) ![](https://github.com/lyusupov/SoftRF/raw/master/documents/images/new-icon.jpg)
+1 [**Prime Mark II**](https://github.com/lyusupov/SoftRF/wiki/Prime-Edition-MkII)
2 [**Standalone**](https://github.com/lyusupov/SoftRF/wiki/Standalone-Edition) + [adapter](https://github.com/lyusupov/ESP32-NODEMCU-ADAPTER)
3 [UAV](https://github.com/lyusupov/SoftRF/wiki/UAV-Edition)
4 [**SkyView EZ**](https://github.com/lyusupov/SoftRF/wiki/SkyView-EZ)
5 [Flight Recorder](https://github.com/lyusupov/SoftRF/wiki/Flight-Recorder)
6 [**WebTop USB**](https://github.com/lyusupov/SoftRF/wiki/WebTop-USB)![](https://github.com/lyusupov/SoftRF/raw/master/documents/images/new-icon.jpg)|[Espressif
ESP32](https://en.wikipedia.org/wiki/ESP32)
[ESP32-S2](https://en.wikipedia.org/wiki/ESP32#ESP32-S2)
[ESP32-S3](https://en.wikipedia.org/wiki/ESP32#ESP32-S3)
[ESP32-C3](https://en.wikipedia.org/wiki/ESP32#ESP32-C3)|Q1 2018|![](https://github.com/lyusupov/SoftRF/raw/master/documents/images/icon_good.png)|1 today's best platform ;
2 holds [**FCC** mark](https://github.com/lyusupov/SoftRF/wiki/Prime-Edition-MkII#certificates) ![](https://github.com/lyusupov/SoftRF/raw/master/documents/images/new-icon.jpg)
1 [**Raspberry Edition**](https://github.com/lyusupov/SoftRF/wiki/Raspberry-Edition)
2 [**SkyView Pi**](https://github.com/lyusupov/SoftRF/wiki/SkyView-Pi)|[Broadcom
BCM283X
(Raspberry Pi)](https://en.wikipedia.org/wiki/Raspberry_Pi)|Q4 2018|![](https://github.com/lyusupov/SoftRF/raw/master/documents/images/icon_good.png)|Good for use together with RTL-SDR dongles to achieve additional 1090ES (and 978UAT) ADS-B air traffic reception.
1 [UAT module](https://github.com/lyusupov/UAT-test-signal#variant-2-advanced)
2 [**Uni**](https://github.com/lyusupov/SoftRF/wiki/Uni-Edition)|[Texas Instruments
CC1310](http://www.ti.com/product/CC1310) and [CC13x2R](http://www.ti.com/product/CC1352R)|Q1 2019|![](https://github.com/lyusupov/SoftRF/raw/master/documents/images/icon_good.png)|1 Unique RF radio specs are useful for [UAT978 **ADS-B** reception](https://github.com/lyusupov/SoftRF/tree/master/software/firmware/source/UATbridge) [ [1](https://raw.githubusercontent.com/lyusupov/SoftRF/master/documents/images/uat-normal-7.jpg) , [2](https://raw.githubusercontent.com/lyusupov/SoftRF/master/documents/images/uat-normal-8.jpg) , [3](https://raw.githubusercontent.com/lyusupov/SoftRF/master/documents/images/uat-normal-6.jpg) ] ;
2 holds [**FCC/CE** mark](https://github.com/lyusupov/SoftRF/wiki/Uni-Edition#certificates)
1 [Retro](https://github.com/lyusupov/SoftRF/wiki/Retro-Edition)
2 [**Dongle**](https://github.com/lyusupov/SoftRF/wiki/Dongle-Edition)
3 [**Balkan**](https://github.com/lyusupov/SoftRF/wiki/Balkan-Edition) ![](https://github.com/lyusupov/SoftRF/raw/master/documents/images/new-icon.jpg)|[STMicroelectronics](https://en.wikipedia.org/wiki/STMicroelectronics)
[STM32**L073**](https://www.st.com/en/microcontrollers-microprocessors/stm32l073rz.html) and
[STM32**WLE5**](https://www.st.com/en/microcontrollers-microprocessors/stm32wle5cc.html)|Q3 2019|![](https://github.com/lyusupov/SoftRF/raw/master/documents/images/icon_good.png)|
diff --git a/software/firmware/binaries/README.md b/software/firmware/binaries/README.md
index a8dc4dc8a..9fc55aedc 100644
--- a/software/firmware/binaries/README.md
+++ b/software/firmware/binaries/README.md
@@ -17,7 +17,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)|[NodeMCU](https://github.com/lyusupov/SoftRF/tree/master/software/firmware/binaries/NodeMCU/SoftRF)
+[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|[NodeMCU](https://github.com/lyusupov/SoftRF/tree/master/software/firmware/binaries/NodeMCU/SoftRF)
ESP32C3
[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|[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)
[Badge Edition](https://github.com/lyusupov/SoftRF/wiki/Badge-Edition)|[nRF52840](https://github.com/lyusupov/SoftRF/blob/master/software/firmware/binaries/README.md#nrf52840)|[nRF52840](https://github.com/lyusupov/SoftRF/tree/master/software/firmware/binaries/nRF52840)
diff --git a/software/firmware/source/SoftRF/src/platform/ESP32.cpp b/software/firmware/source/SoftRF/src/platform/ESP32.cpp
index 78bdef9fd..2281556a5 100644
--- a/software/firmware/source/SoftRF/src/platform/ESP32.cpp
+++ b/software/firmware/source/SoftRF/src/platform/ESP32.cpp
@@ -2674,6 +2674,10 @@ static bool ESP32_Baro_setup()
Wire.setPins(SOC_GPIO_PIN_S3_SDA, SOC_GPIO_PIN_S3_SCL);
+ } else if (esp32_board == ESP32_C3_DEVKIT) {
+
+ Wire.setPins(SOC_GPIO_PIN_C3_SDA, SOC_GPIO_PIN_C3_SCL);
+
} else if (hw_info.model != SOFTRF_MODEL_PRIME_MK2) {
if ((hw_info.rf != RF_IC_SX1276 && hw_info.rf != RF_IC_SX1262) ||
diff --git a/software/firmware/source/SoftRF/src/platform/ESP32.h b/software/firmware/source/SoftRF/src/platform/ESP32.h
index fe1cc7464..6f72215bc 100644
--- a/software/firmware/source/SoftRF/src/platform/ESP32.h
+++ b/software/firmware/source/SoftRF/src/platform/ESP32.h
@@ -72,7 +72,7 @@
#define LED_STATE_ON HIGH // State when LED is litted
-#if defined(CONFIG_IDF_TARGET_ESP32S3)
+#if defined(CONFIG_IDF_TARGET_ESP32S3) || defined(CONFIG_IDF_TARGET_ESP32C3)
/* Adafruit_NeoPixel still has "flickering" issue of ESP32 caused by 1 ms scheduler */
#define USE_ADAFRUIT_NEO_LIBRARY
@@ -124,7 +124,7 @@ extern Adafruit_NeoPixel strip;
#elif defined(CONFIG_IDF_TARGET_ESP32S3)
#define SOC_GPIO_PIN_LED SOC_UNUSED_PIN /* TBD 14? */
#elif defined(CONFIG_IDF_TARGET_ESP32C3)
-#define SOC_GPIO_PIN_LED SOC_UNUSED_PIN
+#define SOC_GPIO_PIN_LED 19 /* D1 */
#else
#error "This ESP32 family build variant is not supported!"
#endif
@@ -147,10 +147,11 @@ extern Adafruit_NeoPixel strip;
SOC_UNUSED_PIN) : \
SOC_UNUSED_PIN))
-#define SOC_GPIO_PIN_BUZZER (hw_info.model == SOFTRF_MODEL_PRIME_MK2 ?\
- SOC_UNUSED_PIN : \
- (esp32_board == ESP32_DEVKIT ? \
- 13 : SOC_UNUSED_PIN))
+#define SOC_GPIO_PIN_BUZZER (hw_info.model == SOFTRF_MODEL_PRIME_MK2 ? \
+ SOC_UNUSED_PIN : \
+ (esp32_board == ESP32_DEVKIT ? 13 : \
+ (esp32_board == ESP32_C3_DEVKIT ? \
+ SOC_GPIO_PIN_C3_BUZZER : SOC_UNUSED_PIN)))
/* SPI (does match Heltec & TTGO LoRa32 pins mapping) */
#define SOC_GPIO_PIN_MOSI 27
@@ -371,8 +372,8 @@ extern Adafruit_NeoPixel strip;
// GNSS module
#define SOC_GPIO_PIN_C3_GNSS_RX 9 /* D3 */
-#define SOC_GPIO_PIN_C3_GNSS_TX 19 /* D1 */
-#define SOC_GPIO_PIN_C3_GNSS_PPS SOC_UNUSED_PIN // 7
+#define SOC_GPIO_PIN_C3_GNSS_TX 7
+#define SOC_GPIO_PIN_C3_GNSS_PPS SOC_UNUSED_PIN // 0
// SPI
#define SOC_GPIO_PIN_C3_MOSI 5 /* D7 */
@@ -387,7 +388,7 @@ extern Adafruit_NeoPixel strip;
// SX1276
#define SOC_GPIO_PIN_C3_RST 18 /* D2 */
-#define SOC_GPIO_PIN_C3_DIO0 19 /* D0 */
+#define SOC_GPIO_PIN_C3_DIO0 2 /* D0 */
#define SOC_GPIO_PIN_C3_SDA 18 /* D2 */
#define SOC_GPIO_PIN_C3_SCL 10 /* D4 */
@@ -395,7 +396,6 @@ extern Adafruit_NeoPixel strip;
#define SOC_GPIO_PIN_C3_BATTERY 1 /* A0 */
// auxillary
-#define SOC_GPIO_PIN_C3_LED 19 /* D1 */
#define SOC_GPIO_PIN_C3_BUZZER 6 /* 10 */
#define SOC_GPIO_PIN_C3_STATUS SOC_UNUSED_PIN
@@ -478,10 +478,10 @@ struct rst_info {
//#define USE_GDL90_MSL
#define USE_OGN_ENCRYPTION
-//#define EXCLUDE_GNSS_UBLOX /* Neo-6/7/8 */
+//#define EXCLUDE_GNSS_UBLOX /* Neo-6/7/8, M10 */
#define ENABLE_UBLOX_RFS /* revert factory settings (when necessary) */
#define EXCLUDE_GNSS_GOKE /* 'Air530' GK9501 GPS/GLO/BDS (GAL inop.) */
-//#define EXCLUDE_GNSS_AT65 /* 'fake Neo-6/8' on some 2018 T-Beam boards */
+//#define EXCLUDE_GNSS_AT65 /* L76K, Air530Z */
#define EXCLUDE_GNSS_SONY
#define EXCLUDE_GNSS_MTK
@@ -493,9 +493,10 @@ struct rst_info {
#if !defined(CONFIG_IDF_TARGET_ESP32)
#define EXCLUDE_NRF905
#define EXCLUDE_UATM
-#define EXCLUDE_LED_RING
#if defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32S3)
+#define EXCLUDE_LED_RING
+
/* Experimental */
//#define USE_ADAFRUIT_MSC
//#define USE_USB_HOST
diff --git a/software/firmware/source/libraries/Adafruit_NeoPixel/esp.c b/software/firmware/source/libraries/Adafruit_NeoPixel/esp.c
new file mode 100644
index 000000000..c480a2050
--- /dev/null
+++ b/software/firmware/source/libraries/Adafruit_NeoPixel/esp.c
@@ -0,0 +1,178 @@
+// Implements the RMT peripheral on Espressif SoCs
+// Copyright (c) 2020 Lucian Copeland for Adafruit Industries
+
+/* Uses code from Espressif RGB LED Strip demo and drivers
+ * Copyright 2015-2020 Espressif Systems (Shanghai) PTE LTD
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#if defined(ESP32)
+
+#include