From 0fb4504d3a82df58916d5edc445d4664da410620 Mon Sep 17 00:00:00 2001 From: Aidan Crowther Date: Fri, 4 Oct 2024 10:41:48 -0400 Subject: [PATCH] Added URSEL flag to fix ATMEGA8 functionality --- src/DMXSerial.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/DMXSerial.cpp b/src/DMXSerial.cpp index 0a36c24..2a009ca 100644 --- a/src/DMXSerial.cpp +++ b/src/DMXSerial.cpp @@ -55,10 +55,22 @@ typedef enum { // receiver must accept 88 us break and 8 us MAB #define BREAKSPEED 100000L +#if !defined(DMX_USE_PORT1) && defined(USART_RXC_vect) + +// ATMEGA8 requires that URSEL be set to 1 when writing to register UCSRC +// This definition appends the required bit to the serial definition + +#define BREAKFORMAT (SERIAL_8E2 | (1<