summaryrefslogtreecommitdiff
path: root/src/arch/arduino-nano/driver
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/arduino-nano/driver')
-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)));