reset locks on forced mode switch

This commit is contained in:
nvt-se 2008-05-27 13:05:52 +00:00
parent 9c9c2573c3
commit ce84dce702

View file

@ -196,6 +196,7 @@ uart_set_mode(unsigned mode)
IE2 &= ~(URXIE1 | UTXIE1); // disable irq
uart_configure(mode); // configure uart parameters
uart_mode = mode;
uart_lockcnt = 0;
if (uart_handler[mode] != NULL) {
IE2 |= URXIE1; // Enable USART1 RX interrupt