changeset 255:0703e0c8ce9d main

Correct the behavior for interrupt-driven UART on the 16M1/64M1 hardware. Remove spurios debugging port twiddles.
author Bob Cook <bob@bobcookdev.com>
date Mon, 07 Sep 2015 20:23:23 -0700
parents 2b880f37d94a
children d3231309c17e
files main/packages/avr/device/uart.cpp
diffstat 1 files changed, 2 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/main/packages/avr/device/uart.cpp	Mon Sep 07 20:22:16 2015 -0700
+++ b/main/packages/avr/device/uart.cpp	Mon Sep 07 20:23:23 2015 -0700
@@ -7,7 +7,7 @@
 //    
 //  This file provides the implementation for the UART library.
 //
-//  Copyright (C) 2010-2014 Bob Cook
+//  Copyright (C) 2010-2015 Bob Cook
 //
 //  Permission is hereby granted, free of charge, to any person obtaining a copy
 //  of this software and associated documentation files (the "Software"), to deal
@@ -239,8 +239,6 @@
 
 ISR( LIN_TC_vect )
 {
-PORTB |= ( 1 << PB2 );
-
     if ( LINSIR & ( 1 << LRXOK ) )
     {
         if ( uart0_rx_buffer.is_full() )
@@ -490,7 +488,6 @@
 
     return ( UCSRA & ( 1 << RXC ) ) != 0;
 
-
 #elif defined( __AVR_ATmega88__ ) \
       || defined( __AVR_ATmega168__ ) \
       || defined( __AVR_ATmega328P__ ) \
@@ -589,7 +586,7 @@
     //--    If transmission is already in progress, all we need to do is add the
     //      new data to the TX buffer. Otherwise we have to write the data directly.
 
-    if ( LINSIR & ( ( 1 << LBUSY ) | ( 1 << LTXOK ) ) )
+    if ( LINENIR & ( 1 << LTXOK ) )
     {
         uart0_tx_buffer.wait_and_push( data );
     }