From 7205332a95fad57d5f68885a3834319ecd48e457 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 16 Jan 2022 10:41:59 +0100 Subject: add DMX driver for MSP430FR5969 and MSP430FR5994 launchpads --- src/arch/arduino-nano/driver/dmx.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/arch/arduino-nano') diff --git a/src/arch/arduino-nano/driver/dmx.cc b/src/arch/arduino-nano/driver/dmx.cc index 20a7332..c18d5a8 100644 --- a/src/arch/arduino-nano/driver/dmx.cc +++ b/src/arch/arduino-nano/driver/dmx.cc @@ -23,7 +23,7 @@ void DMX::setup() #endif UCSR0B |= _BV(TXEN0); - UCSR0C = _BV(USBS0) | _BV(UCSZ01) | _BV(UCSZ00); // 8 bits + UCSR0C = _BV(USBS0) | _BV(UCSZ01) | _BV(UCSZ00); // MSB first, 8 data bits, 2 stop bits, no parity } void DMX::write() @@ -31,9 +31,9 @@ void DMX::write() // Disable UART for reset and mark signals UCSR0B &= ~_BV(TXEN0); gpio.output(GPIO::pd1, 0); - arch.delay_us(88); // break + arch.delay_us(88); // break / reset gpio.output(GPIO::pd1, 1); - arch.delay_us(8); + arch.delay_us(8); // mark UCSR0B |= _BV(TXEN0); // causes line to go high for (uint8_t i = 0; i < 16; i++) { while (!(UCSR0A & _BV(UDRE0))); -- cgit v1.2.3