Add branch for the conversion of demos to use standard C header files for configurati...
[pub/USBasp.git] / Demos / Device / LowLevel / VirtualSerial / VirtualSerial.c
index 93fd435..7d18548 100644 (file)
@@ -109,12 +109,9 @@ void EVENT_USB_Device_ConfigurationChanged(void)
        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;
@@ -201,7 +198,7 @@ void CDC_Task(void)
                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);
@@ -225,7 +222,7 @@ void CDC_Task(void)
        }
 
        /* 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())