Update UC3 platform driver support to use the bitmasks defined in the header files...
[pub/USBasp.git] / Demos / Device / LowLevel / DualVirtualSerial / DualVirtualSerial.c
index bf80749..b939129 100644 (file)
  *  It is possible to completely ignore these value or use other settings as the host is completely unaware of the physical
  *  serial link characteristics and instead sends and receives data in endpoint streams.
  */
  *  It is possible to completely ignore these value or use other settings as the host is completely unaware of the physical
  *  serial link characteristics and instead sends and receives data in endpoint streams.
  */
-CDC_LineEncoding_t LineEncoding1 = { .BaudRateBPS = 0,
-                                     .CharFormat  = CDC_LINEENCODING_OneStopBit,
-                                     .ParityType  = CDC_PARITY_None,
-                                     .DataBits    = 8                            };
+static CDC_LineEncoding_t LineEncoding1 = { .BaudRateBPS = 0,
+                                            .CharFormat  = CDC_LINEENCODING_OneStopBit,
+                                            .ParityType  = CDC_PARITY_None,
+                                            .DataBits    = 8                            };
 
 /** Contains the current baud rate and other settings of the second virtual serial port. While this demo does not use
  *  the physical USART and thus does not use these settings, they must still be retained and returned to the host
 
 /** Contains the current baud rate and other settings of the second virtual serial port. While this demo does not use
  *  the physical USART and thus does not use these settings, they must still be retained and returned to the host
@@ -57,10 +57,10 @@ CDC_LineEncoding_t LineEncoding1 = { .BaudRateBPS = 0,
  *  It is possible to completely ignore these value or use other settings as the host is completely unaware of the physical
  *  serial link characteristics and instead sends and receives data in endpoint streams.
  */
  *  It is possible to completely ignore these value or use other settings as the host is completely unaware of the physical
  *  serial link characteristics and instead sends and receives data in endpoint streams.
  */
-CDC_LineEncoding_t LineEncoding2 = { .BaudRateBPS = 0,
-                                     .CharFormat  = CDC_LINEENCODING_OneStopBit,
-                                     .ParityType  = CDC_PARITY_None,
-                                     .DataBits    = 8                            };
+static CDC_LineEncoding_t LineEncoding2 = { .BaudRateBPS = 0,
+                                            .CharFormat  = CDC_LINEENCODING_OneStopBit,
+                                            .ParityType  = CDC_PARITY_None,
+                                            .DataBits    = 8                            };
 
 
 /** Main program entry point. This routine configures the hardware required by the application, then
 
 
 /** Main program entry point. This routine configures the hardware required by the application, then
@@ -227,7 +227,7 @@ void CDC1_Task(void)
                Endpoint_SelectEndpoint(CDC1_TX_EPNUM);
 
                /* Write the String to the Endpoint */
                Endpoint_SelectEndpoint(CDC1_TX_EPNUM);
 
                /* Write the String to the Endpoint */
-               Endpoint_Write_Stream_LE(ReportString, strlen(ReportString));
+               Endpoint_Write_Stream_LE(ReportString, strlen(ReportString), NULL);
 
                /* Finalize the stream transfer to send the last packet */
                Endpoint_ClearIN();
 
                /* Finalize the stream transfer to send the last packet */
                Endpoint_ClearIN();
@@ -269,7 +269,7 @@ void CDC2_Task(void)
                uint16_t DataLength = Endpoint_BytesInEndpoint();
 
                /* Read in the incoming packet into the buffer */
                uint16_t DataLength = Endpoint_BytesInEndpoint();
 
                /* Read in the incoming packet into the buffer */
-               Endpoint_Read_Stream_LE(&Buffer, DataLength);
+               Endpoint_Read_Stream_LE(&Buffer, DataLength, NULL);
 
                /* Finalize the stream transfer to send the last packet */
                Endpoint_ClearOUT();
 
                /* Finalize the stream transfer to send the last packet */
                Endpoint_ClearOUT();
@@ -278,7 +278,7 @@ void CDC2_Task(void)
                Endpoint_SelectEndpoint(CDC2_TX_EPNUM);
 
                /* Write the received data to the endpoint */
                Endpoint_SelectEndpoint(CDC2_TX_EPNUM);
 
                /* Write the received data to the endpoint */
-               Endpoint_Write_Stream_LE(&Buffer, DataLength);
+               Endpoint_Write_Stream_LE(&Buffer, DataLength, NULL);
 
                /* Finalize the stream transfer to send the last packet */
                Endpoint_ClearIN();
 
                /* Finalize the stream transfer to send the last packet */
                Endpoint_ClearIN();