claudeheintz / LXESP8266DMX

DMX Driver for ESP8266 using ArduinoIDE
BSD 3-Clause "New" or "Revised" License
31 stars 9 forks source link

wrong register bit at function (void uart_init_tx...) #2

Closed michaelchien1972 closed 7 years ago

michaelchien1972 commented 7 years ago

`void uart_init_tx(int baudrate, byte config, LX8266DMX* dmxo) { pinMode(2, SPECIAL); uint32_t conf1 = 0x00000000;

uart_set_baudrate(UART1, baudrate); USC0(UART1) = config; uart_tx_flush(); uart_enable_tx_interrupt(dmxo);

conf1 |= (0x01 << UCFFT);//empty threshold 0x20 <== the UCFFT should be UCFET
USC1(UART1) = conf1;

}`

claudeheintz commented 7 years ago

This code is working correctly (the DMX driver functions correctly and outputs good DMX as it is). The FIFO should not be used so the register bit may not make a difference anyway. ESP8266 documentation is a bit scarce and inconsistent. So, if you have a link to docs that show why you think the other register bit should be used, please post it.

claudeheintz commented 7 years ago

Setting the configuration register bit is actually not necessary. It has been commented out of the source.