We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
https://github.com/nodemcu/nodemcu-firmware/blob/master/app/driver/uart.c#L79-L85 essentially polls for TX buffer empty in manner they do with AVR:
// char gone on wire OS_INTERRUPT void USART_UDRE_vect(void) { // anything else in output buffer? if (txhead != txtail) { uint8_t tmptail = (txtail + 1) & UART_TX_BUFFER_MASK; txtail = tmptail; // disable reader UCSR0B &= ~_BV(RXEN0); // load next char from output buffer UDR0 = uart_tx_buf[tmptail]; // output buffer empty } else { // disable TX ready interrupt UCSR0B &= ~_BV(UDRIE0); } } OS_INTERRUPT void USART_TX_vect(void) { // char transmitted, enable reader UCSR0B |= _BV(RXEN0); } static void uart_putc(char c) { // put to output buffer uint8_t tmphead = (txhead + 1) & UART_TX_BUFFER_MASK; while (tmphead == txtail) {} uart_tx_buf[tmphead] = c; txhead = tmphead; // enable TX ready interrupt UCSR0B |= _BV(UDRIE0); }
Otherwise printing long lines (e.g. TCP payload) hangs the CPU.
The text was updated successfully, but these errors were encountered:
We are doing RTOS version NodeMCU, it may solve this issue.
Sorry, something went wrong.
Closing, see #719.
No branches or pull requests
https://github.com/nodemcu/nodemcu-firmware/blob/master/app/driver/uart.c#L79-L85 essentially polls for TX buffer empty in manner they do with AVR:
Otherwise printing long lines (e.g. TCP payload) hangs the CPU.
The text was updated successfully, but these errors were encountered: