From 90b129a67a39cb0bbc0ae93bdfa0aa87f8260534 Mon Sep 17 00:00:00 2001 From: Bart Van Der Meerssche Date: Tue, 10 May 2011 16:19:32 +0200 Subject: [PATCH] [avr] link the RS485 driver/receiver enable line to TXCIE0 --- mote/v2/avr/uart.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/mote/v2/avr/uart.c b/mote/v2/avr/uart.c index 7a81a47..7e4ff8d 100644 --- a/mote/v2/avr/uart.c +++ b/mote/v2/avr/uart.c @@ -238,7 +238,7 @@ u08 uartSendBuffer(char *buffer, u16 nBytes) } } */ -// UART Transmit Complete Interrupt Handler +// UART Data Register Empty Interrupt Handler UART_INTERRUPT_HANDLER(SIG_UART_DATA) { // check if buffered tx is enabled @@ -247,6 +247,8 @@ UART_INTERRUPT_HANDLER(SIG_UART_DATA) // check if there's data left in the buffer if(uartTxBuffer.datalength) { + // set RS-485 into transmit mode + PORTD |= (1<