From 5aa91e5c77ebbbc37b4c7882f4609ba891a63a70 Mon Sep 17 00:00:00 2001 From: vickash Date: Sat, 12 Aug 2023 00:11:18 -0400 Subject: [PATCH] Fix hardware UART support for UNO R4 boards --- HARDWARE.md | 8 ++++---- src/lib/DenkoDefines.h | 4 ++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/HARDWARE.md b/HARDWARE.md index b150eba..de583f3 100644 --- a/HARDWARE.md +++ b/HARDWARE.md @@ -26,7 +26,7 @@ | :-------- | :------: | :--------------- |------ | | ATSAM3X8E | :yellow_heart: | Due | Native USB port. Tone, and IR Out don't work. | ATSAMD21 | :green_heart: | Zero, M0 Series, Some MKR & Nano | Native USB -| RA4M1 | :yellow_heart: | Uno R4 Minima, Uno R4 WiFi | IR Out and WS2812 unsupported. UART untested +| RA4M1 | :yellow_heart: | Uno R4 Minima, Uno R4 WiFi | IR and WS2812 libraries don't support this yet ### Arduino Networking @@ -91,12 +91,12 @@ | I2C Bit Bang | :heart: | S | `I2C::BitBang` | Any pins | SPI | :green_heart: | H | `SPI::Bus` | Predetermined pins from IDE | SPI Bit Bang | :green_heart: | S | `SPI::BitBang` | Any pins -| UART | :green_heart: | H | `UART::Hardware` | Except Atmega328, ATmega168, RA4M1 +| UART | :green_heart: | H | `UART::Hardware` | Except Atmega328, ATmega168 | UART Bit Bang | :green_heart: | S | `UART::BitBang` | Only ATmega328, ATmega168 | Maxim OneWire | :green_heart: | S | `OneWire::Bus` | No overdrive -| Infrared Emitter | :green_heart: | S | `PulseIO::IRTransmitter` | Except RA4M1 +| Infrared Emitter | :green_heart: | S | `PulseIO::IRTransmitter` | Except SAM3X, RA4M1 | Infrared Receiver | :heart: | S | `PulseIO::IRReceiver` | Doable with existing library -| WS2812 | :green_heart: | S | See LED table | Except RP2040 +| WS2812 | :green_heart: | S | See LED table | Except RP2040, RA4M1 | ESP32-PCNT | :heart: | H | - | Only ESP32. Pulse counter (for encoders) | ESP32-MCPWM | :heart: | H | - | Only ESP32. Motor control PWM diff --git a/src/lib/DenkoDefines.h b/src/lib/DenkoDefines.h index 7e8c29c..b6026c3 100644 --- a/src/lib/DenkoDefines.h +++ b/src/lib/DenkoDefines.h @@ -83,6 +83,10 @@ #elif defined(ESP8266) && defined(SERIAL_PORT_HARDWARE_OPEN) #define DENKO_UARTS 1 + // Define 1 UART for UNO R4 boards. Always use Serial1. + #elif defined(_RENESAS_RA_) + #define DENKO_UARTS 1 + // This works for all the Atmel cores except RA4M1. #else #if defined(SERIAL_PORT_HARDWARE3)