Skip to content

Commit

Permalink
RA4M1: Bluetooth LE and 2nd IIC I/O are doing good
Browse files Browse the repository at this point in the history
  • Loading branch information
lyusupov committed Mar 16, 2024
1 parent e638893 commit 8c9ceda
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 9 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ Model(s)|Platform|First appearance|       Sta
[**Standalone**](https://github.com/lyusupov/SoftRF/wiki/Standalone-Edition)&nbsp;**upgrade**![](https://github.com/lyusupov/SoftRF/raw/master/documents/images/hot_icon.jpg)|[Espressif<br>ESP32-C3](https://en.wikipedia.org/wiki/ESP32#ESP32-C3)|Q1 2023|![](https://github.com/lyusupov/SoftRF/raw/master/documents/images/icon_good.png)|[RISC-V](https://en.wikipedia.org/wiki/RISC-V)
1&nbsp;[**Prime Mark III**](https://github.com/lyusupov/SoftRF/wiki/Prime-Edition-MkIII)![](https://github.com/lyusupov/SoftRF/raw/master/documents/images/new-icon.jpg)<br>2&nbsp;[**SkyView Pico**](https://github.com/lyusupov/SoftRF/wiki/SkyView-Pico#alternative-hardware-option)&nbsp;![](https://github.com/lyusupov/SoftRF/raw/master/documents/images/new-icon.jpg)<br>3&nbsp;[**Ham**](https://github.com/lyusupov/SoftRF/wiki/Ham-Edition)&nbsp;![](https://github.com/lyusupov/SoftRF/raw/master/documents/images/new-icon.jpg)<br>4&nbsp;[**Midi**](https://github.com/lyusupov/SoftRF/wiki/Midi-Edition)&nbsp;![](https://github.com/lyusupov/SoftRF/raw/master/documents/images/new-icon.jpg)|[Espressif<br>ESP32-S3](https://en.wikipedia.org/wiki/ESP32#ESP32-S3)|Q1 2023|![](https://github.com/lyusupov/SoftRF/raw/master/documents/images/icon_may_need_imp.png)|
[**Standalone**](https://github.com/lyusupov/SoftRF/wiki/Standalone-Edition)&nbsp;**upgrade**![](https://github.com/lyusupov/SoftRF/raw/master/documents/images/new-icon.jpg)|[Espressif<br>ESP32-C6](https://en.wikipedia.org/wiki/ESP32#ESP32-C6)|Q1 2024|![](https://github.com/lyusupov/SoftRF/raw/master/documents/images/icon_may_need_imp.png)|2 [RISC-V](https://en.wikipedia.org/wiki/RISC-V) cores<br>big.LITTLE
[**Academy**](https://github.com/lyusupov/SoftRF/wiki/Academy-Edition)&nbsp;**upgrade**|[Renesas<br>RA4M1](https://en.wikipedia.org/wiki/Renesas_Electronics#The_RA_MCU_family)|Q1 2024|![](https://github.com/lyusupov/SoftRF/raw/master/documents/images/icon_in_progress.png)|

## By sub-1 GHz radio
Radio|Model(s)|First appearance|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Status&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|Notes
Expand Down
3 changes: 3 additions & 0 deletions software/firmware/source/SoftRF/src/platform/RA4M1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,9 @@ static void RA4M1_EEPROM_extension(int cmd)
#if defined(ARDUINO_UNOR4_WIFI)
if (cmd == EEPROM_EXT_DEFAULTS) {
settings->nmea_out = NMEA_UART;
#if defined(EXCLUDE_WIFI) && !defined(EXCLUDE_BLUETOOTH)
settings->bluetooth = BLUETOOTH_LE_HM10_SERIAL;
#endif /* EXCLUDE_BLUETOOTH */
}
#endif /* ARDUINO_UNOR4_WIFI */

Expand Down
10 changes: 10 additions & 0 deletions software/firmware/source/SoftRF/src/platform/RA4M1.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,14 @@ struct rst_info {
#define SOC_GPIO_PIN_ANT_RXTX SOC_UNUSED_PIN

/* I2C */
#if defined(ARDUINO_UNOR4_WIFI)
#define SOC_GPIO_PIN_SDA WIRE1_SDA_PIN
#define SOC_GPIO_PIN_SCL WIRE1_SCL_PIN
#define Wire Wire1
#else
#define SOC_GPIO_PIN_SDA WIRE_SDA_PIN
#define SOC_GPIO_PIN_SCL WIRE_SCL_PIN
#endif /* ARDUINO_UNOR4_WIFI */

#define SOC_GPIO_PIN_LED SOC_UNUSED_PIN
#define SOC_GPIO_PIN_GNSS_PPS PIN_A3
Expand Down Expand Up @@ -183,7 +189,11 @@ extern Adafruit_NeoPixel strip;
#endif /* EXCLUDE_LED_RING */

#if defined(USE_OLED)
#if defined(ARDUINO_UNOR4_WIFI)
#define U8X8_OLED_I2C_BUS_TYPE U8X8_SSD1306_128X64_NONAME_2ND_HW_I2C
#else
#define U8X8_OLED_I2C_BUS_TYPE U8X8_SSD1306_128X64_NONAME_HW_I2C
#endif /* ARDUINO_UNOR4_WIFI */
#endif /* USE_OLED */

#endif /* PLATFORM_RA4M1_H */
Expand Down
20 changes: 12 additions & 8 deletions software/firmware/source/SoftRF/src/ui/Web.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -373,8 +373,9 @@ void handleSettings() {
offset += len;
size -= len;

} else if (SoC->id == SOC_ESP32S3 || SoC->id == SOC_ESP32C3 ||
SoC->id == SOC_ESP32C6) {
} else if (SoC->id == SOC_ESP32S3 || SoC->id == SOC_ESP32C2 ||
SoC->id == SOC_ESP32C3 || SoC->id == SOC_ESP32C6 ||
SoC->id == SOC_RA4M1) {

snprintf_P ( offset, size,
PSTR("\
Expand Down Expand Up @@ -452,8 +453,9 @@ void handleSettings() {

/* SoC specific part 2 */
if (SoC->id == SOC_ESP32 || SoC->id == SOC_ESP32S3 ||
SoC->id == SOC_ESP32C3 || SoC->id == SOC_ESP32C6 ||
SoC->id == SOC_RP2040) {
SoC->id == SOC_ESP32C2 || SoC->id == SOC_ESP32C3 ||
SoC->id == SOC_ESP32C6 || SoC->id == SOC_RP2040 ||
SoC->id == SOC_RA4M1) {
snprintf_P ( offset, size,
PSTR("\
<option %s value='%d'>TCP</option>\
Expand Down Expand Up @@ -501,8 +503,9 @@ void handleSettings() {
#if !defined(EXCLUDE_BLUETOOTH)
/* SoC specific part 3 */
if (SoC->id == SOC_ESP32 || SoC->id == SOC_ESP32S3 ||
SoC->id == SOC_ESP32C3 || SoC->id == SOC_ESP32C6 ||
SoC->id == SOC_RP2040) {
SoC->id == SOC_ESP32C2 || SoC->id == SOC_ESP32C3 ||
SoC->id == SOC_ESP32C6 || SoC->id == SOC_RP2040 ||
SoC->id == SOC_RA4M1) {
snprintf_P ( offset, size,
PSTR("<option %s value='%d'>Bluetooth</option>"),
(settings->gdl90 == GDL90_BLUETOOTH ? "selected" : ""), GDL90_BLUETOOTH);
Expand Down Expand Up @@ -547,8 +550,9 @@ void handleSettings() {
#if !defined(EXCLUDE_BLUETOOTH)
/* SoC specific part 4 */
if (SoC->id == SOC_ESP32 || SoC->id == SOC_ESP32S3 ||
SoC->id == SOC_ESP32C3 || SoC->id == SOC_ESP32C6 ||
SoC->id == SOC_RP2040) {
SoC->id == SOC_ESP32C2 || SoC->id == SOC_ESP32C3 ||
SoC->id == SOC_ESP32C6 || SoC->id == SOC_RP2040 ||
SoC->id == SOC_RA4M1) {
snprintf_P ( offset, size,
PSTR("<option %s value='%d'>Bluetooth</option>"),
(settings->d1090 == D1090_BLUETOOTH ? "selected" : ""), D1090_BLUETOOTH);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
#include <Wire.h>
#if defined(ARDUINO_ARCH_RP2040) && defined(ARDUINO_GENERIC_RP2040)
#define Wire Wire1
#elif defined(ARDUINO_ARCH_RENESAS) && defined(ARDUINO_UNOR4_WIFI)
#define Wire Wire1
#elif defined(ARDUINO_ARCH_ASR6601) && defined(CubeCell_BoardPRO)
#define Wire Wire2
#endif
Expand Down
3 changes: 2 additions & 1 deletion software/firmware/source/libraries/U8g2/src/U8x8lib.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@
#endif


#if defined(ARDUINO_ARCH_ESP32) || defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_ARCH_ASR6601)
#if defined(ARDUINO_ARCH_ESP32) || defined(ARDUINO_ARCH_RP2040) || \
defined(ARDUINO_ARCH_ASR6601) || defined(ARDUINO_UNOR4_WIFI)
#define WIRE_INTERFACES_COUNT 2

#if defined(CubeCell_BoardPRO)
Expand Down

1 comment on commit 8c9ceda

@lyusupov
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.