Add extra LUFA TAR archive export exclusions.
[pub/USBasp.git] / Projects / USBtoSerial / USBtoSerial.c
index fe685d6..194f6b0 100644 (file)
@@ -1,13 +1,13 @@
 /*
              LUFA Library
 /*
              LUFA Library
-     Copyright (C) Dean Camera, 2011.
+     Copyright (C) Dean Camera, 2012.
 
   dean [at] fourwalledcubicle [dot] com
            www.lufa-lib.org
 */
 
 /*
 
   dean [at] fourwalledcubicle [dot] com
            www.lufa-lib.org
 */
 
 /*
-  Copyright 2011  Dean Camera (dean [at] fourwalledcubicle [dot] com)
+  Copyright 2012  Dean Camera (dean [at] fourwalledcubicle [dot] com)
 
   Permission to use, copy, modify, distribute, and sell this
   software and its documentation for any purpose is hereby granted
 
   Permission to use, copy, modify, distribute, and sell this
   software and its documentation for any purpose is hereby granted
@@ -97,10 +97,10 @@ int main(void)
                        if (!(ReceivedByte < 0))
                          RingBuffer_Insert(&USBtoUSART_Buffer, ReceivedByte);
                }
                        if (!(ReceivedByte < 0))
                          RingBuffer_Insert(&USBtoUSART_Buffer, ReceivedByte);
                }
-               
+
                /* Check if the UART receive buffer flush timer has expired or the buffer is nearly full */
                uint16_t BufferCount = RingBuffer_GetCount(&USARTtoUSB_Buffer);
                /* Check if the UART receive buffer flush timer has expired or the buffer is nearly full */
                uint16_t BufferCount = RingBuffer_GetCount(&USARTtoUSB_Buffer);
-               if ((TIFR0 & (1 << TOV0)) || (BufferCount > 200))
+               if ((TIFR0 & (1 << TOV0)) || (BufferCount > (uint8_t)(sizeof(USARTtoUSB_Buffer_Data) * .75)))
                {
                        /* Clear flush timer expiry flag */
                        TIFR0 |= (1 << TOV0);
                {
                        /* Clear flush timer expiry flag */
                        TIFR0 |= (1 << TOV0);