Minor documentation adjustments to the demos, projects and bootloaders to ensure...
[pub/USBasp.git] / Demos / Device / LowLevel / VirtualSerial / VirtualSerial.c
index 29ebff4..7d18548 100644 (file)
@@ -7,7 +7,7 @@
 */
 
 /*
 */
 
 /*
-  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
@@ -109,12 +109,9 @@ void EVENT_USB_Device_ConfigurationChanged(void)
        bool ConfigSuccess = true;
 
        /* Setup CDC Data Endpoints */
        bool ConfigSuccess = true;
 
        /* Setup CDC Data Endpoints */
-       ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC_NOTIFICATION_EPNUM, EP_TYPE_INTERRUPT, ENDPOINT_DIR_IN,
-                                                   CDC_NOTIFICATION_EPSIZE, ENDPOINT_BANK_SINGLE);
-       ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC_TX_EPNUM, EP_TYPE_BULK, ENDPOINT_DIR_IN,
-                                                   CDC_TXRX_EPSIZE, ENDPOINT_BANK_SINGLE);
-       ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC_RX_EPNUM, EP_TYPE_BULK, ENDPOINT_DIR_OUT,
-                                                   CDC_TXRX_EPSIZE, ENDPOINT_BANK_SINGLE);
+       ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC_NOTIFICATION_EPADDR, EP_TYPE_INTERRUPT, CDC_NOTIFICATION_EPSIZE, 1);
+       ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC_TX_EPADDR, EP_TYPE_BULK, CDC_TXRX_EPSIZE, 1);
+       ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC_RX_EPADDR, EP_TYPE_BULK,  CDC_TXRX_EPSIZE, 1);
 
        /* Reset line encoding baud rate so that the host knows to send new values */
        LineEncoding.BaudRateBPS = 0;
 
        /* Reset line encoding baud rate so that the host knows to send new values */
        LineEncoding.BaudRateBPS = 0;
@@ -201,7 +198,7 @@ void CDC_Task(void)
                ActionSent = true;
 
                /* Select the Serial Tx Endpoint */
                ActionSent = true;
 
                /* Select the Serial Tx Endpoint */
-               Endpoint_SelectEndpoint(CDC_TX_EPNUM);
+               Endpoint_SelectEndpoint(CDC_TX_EPADDR);
 
                /* Write the String to the Endpoint */
                Endpoint_Write_Stream_LE(ReportString, strlen(ReportString), NULL);
 
                /* Write the String to the Endpoint */
                Endpoint_Write_Stream_LE(ReportString, strlen(ReportString), NULL);
@@ -225,7 +222,7 @@ void CDC_Task(void)
        }
 
        /* Select the Serial Rx Endpoint */
        }
 
        /* Select the Serial Rx Endpoint */
-       Endpoint_SelectEndpoint(CDC_RX_EPNUM);
+       Endpoint_SelectEndpoint(CDC_RX_EPADDR);
 
        /* Throw away any received data from the host */
        if (Endpoint_IsOUTReceived())
 
        /* Throw away any received data from the host */
        if (Endpoint_IsOUTReceived())