Use immediate variable expansion in the second-deepest level makefile scripts to...
[pub/USBasp.git] / Projects / USBtoSerial / USBtoSerial.c
index c34fcf7..7fe67da 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
@@ -57,18 +57,24 @@ USB_ClassInfo_CDC_Device_t VirtualSerial_CDC_Interface =
                .Config =
                        {
                                .ControlInterfaceNumber         = 0,
                .Config =
                        {
                                .ControlInterfaceNumber         = 0,
-
-                               .DataINEndpointNumber           = CDC_TX_EPNUM,
-                               .DataINEndpointSize             = CDC_TXRX_EPSIZE,
-                               .DataINEndpointDoubleBank       = false,
-
-                               .DataOUTEndpointNumber          = CDC_RX_EPNUM,
-                               .DataOUTEndpointSize            = CDC_TXRX_EPSIZE,
-                               .DataOUTEndpointDoubleBank      = false,
-
-                               .NotificationEndpointNumber     = CDC_NOTIFICATION_EPNUM,
-                               .NotificationEndpointSize       = CDC_NOTIFICATION_EPSIZE,
-                               .NotificationEndpointDoubleBank = false,
+                               .DataINEndpoint                 =
+                                       {
+                                               .Address                = CDC_TX_EPADDR,
+                                               .Size                   = CDC_TXRX_EPSIZE,
+                                               .Banks                  = 1,
+                                       },
+                               .DataOUTEndpoint                =
+                                       {
+                                               .Address                = CDC_RX_EPADDR,
+                                               .Size                   = CDC_TXRX_EPSIZE,
+                                               .Banks                  = 1,
+                                       },
+                               .NotificationEndpoint           =
+                                       {
+                                               .Address                = CDC_NOTIFICATION_EPADDR,
+                                               .Size                   = CDC_NOTIFICATION_EPSIZE,
+                                               .Banks                  = 1,
+                                       },
                        },
        };
 
                        },
        };
 
@@ -97,7 +103,7 @@ 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);
                if ((TIFR0 & (1 << TOV0)) || (BufferCount > (uint8_t)(sizeof(USARTtoUSB_Buffer_Data) * .75)))
                /* 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 > (uint8_t)(sizeof(USARTtoUSB_Buffer_Data) * .75)))