summaryrefslogtreecommitdiff
path: root/src/arch/arduino-nano
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2022-01-16 10:41:59 +0100
committerDaniel Friesel <derf@finalrewind.org>2022-01-16 10:41:59 +0100
commit7205332a95fad57d5f68885a3834319ecd48e457 (patch)
treeefa5285efee9b2e823a1ef25abf5a3f4a351d94c /src/arch/arduino-nano
parent8b5d14c7dcf045b21083e55444c3cf08e03cdbd8 (diff)
add DMX driver for MSP430FR5969 and MSP430FR5994 launchpads
Diffstat (limited to 'src/arch/arduino-nano')
-rw-r--r--src/arch/arduino-nano/driver/dmx.cc6
1 files changed, 3 insertions, 3 deletions
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)));