Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

uart_isr: fix interrupts clear

  • Loading branch information...
commit e7c72a826c1d9180bfe9dcd5c6eae6072dd8af3d 1 parent 833d7c7
EnjoyDigital authored October 22, 2013 sbourdeauducq committed October 23, 2013

Showing 1 changed file with 2 additions and 2 deletions. Show diff stats Hide diff stats

  1. 4  software/libbase/uart.c
4  software/libbase/uart.c
@@ -33,9 +33,11 @@ void uart_isr(void)
33 33
 	if(stat & UART_EV_RX) {
34 34
 		rx_buf[rx_produce] = uart_rxtx_read();
35 35
 		rx_produce = (rx_produce + 1) & UART_RINGBUFFER_MASK_RX;
  36
+		uart_ev_pending_write(UART_EV_RX);
36 37
 	}
37 38
 
38 39
 	if(stat & UART_EV_TX) {
  40
+		uart_ev_pending_write(UART_EV_TX);
39 41
 		if(tx_level > 0) {
40 42
 			uart_rxtx_write(tx_buf[tx_consume]);
41 43
 			tx_consume = (tx_consume + 1) & UART_RINGBUFFER_MASK_TX;
@@ -43,8 +45,6 @@ void uart_isr(void)
43 45
 		} else
44 46
 			tx_cts = 1;
45 47
 	}
46  
-
47  
-	uart_ev_pending_write(stat);
48 48
 }
49 49
 
50 50
 /* Do not use in interrupt handlers! */

0 notes on commit e7c72a8

Please sign in to comment.
Something went wrong with that request. Please try again.