fix uart init

pull/326/head v3.2.46.alpha
Thorsten von Eicken 8 years ago
parent 9e8bba88ba
commit 5f56a47436
No known key found for this signature in database
GPG Key ID: C7F972A59D834B46
  1. 2
      serial/uart.c

@ -348,12 +348,10 @@ uart0_config(uint8_t data_bits, uint8_t parity, uint8_t stop_bits) {
void ICACHE_FLASH_ATTR void ICACHE_FLASH_ATTR
uart_init(uint32 conf0, UartBautRate uart0_br, int8_t uart0TxEnablePin, UartBautRate uart1_br) uart_init(uint32 conf0, UartBautRate uart0_br, int8_t uart0TxEnablePin, UartBautRate uart1_br)
{ {
if (uart0TxEnablePin >= 0) {
uart0_set_tx_enable_pin(uart0TxEnablePin); uart0_set_tx_enable_pin(uart0TxEnablePin);
// Set up a timer to disable the TX line after the last byte has been transmitted // Set up a timer to disable the TX line after the last byte has been transmitted
os_timer_disarm(&uart_tx_enable_timer); os_timer_disarm(&uart_tx_enable_timer);
os_timer_setfn(&uart_tx_enable_timer, tx_completed_interrupt, NULL); os_timer_setfn(&uart_tx_enable_timer, tx_completed_interrupt, NULL);
}
// rom use 74880 baut_rate, here reinitialize // rom use 74880 baut_rate, here reinitialize
uart_config(UART0, uart0_br, conf0); uart_config(UART0, uart0_br, conf0);

Loading…
Cancel
Save