mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-23 16:29:34 +00:00
fix typos in uart2 where uart1 was accidentally used.
This commit is contained in:
parent
166fa97ef6
commit
9e1612da25
@ -40,7 +40,7 @@ volatile char u2_tx_buf[64];
|
|||||||
volatile uint32_t u2_head, u2_tail;
|
volatile uint32_t u2_head, u2_tail;
|
||||||
|
|
||||||
void uart2_isr(void) {
|
void uart2_isr(void) {
|
||||||
while( *UART1_UTXCON != 0 ) {
|
while( *UART2_UTXCON != 0 ) {
|
||||||
if (u2_head == u2_tail) {
|
if (u2_head == u2_tail) {
|
||||||
disable_irq(UART2);
|
disable_irq(UART2);
|
||||||
return;
|
return;
|
||||||
@ -68,7 +68,7 @@ void uart2_putc(char c) {
|
|||||||
if (u2_head == u2_tail) { /* drop chars when no room */
|
if (u2_head == u2_tail) { /* drop chars when no room */
|
||||||
if (u2_head) { u2_head -=1; } else { u2_head = sizeof(u2_tx_buf); }
|
if (u2_head) { u2_head -=1; } else { u2_head = sizeof(u2_tx_buf); }
|
||||||
}
|
}
|
||||||
enable_irq(UART1);
|
enable_irq(UART2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user