LED flashing mechanism added to RX/TX action for the first virtual serial channel.

This commit is contained in:
klaute 2016-08-28 09:37:09 +02:00
parent a0b57e614f
commit 0479d19b28

View file

@ -265,7 +265,9 @@ void CDC1_Task(void)
for (uint16_t i = 0; i < DataLength; i++)
{
// process the received data and descide to do an action
LED0_ON;
cc_processData(Buffer[i]);
LED0_OFF;
}
}
@ -283,6 +285,8 @@ void USB_serialStreamWriteC(char *data, uint16_t len)
if (data != NULL && len > 0 && LineEncoding1.BaudRateBPS)
{
LED1_ON;
/* Select the Serial Tx Endpoint */
Endpoint_SelectEndpoint(CDC1_TX_EPADDR);
@ -297,6 +301,8 @@ void USB_serialStreamWriteC(char *data, uint16_t len)
/* Send an empty packet to ensure that the host does not buffer data sent to it */
Endpoint_ClearIN();
LED1_OFF;
}
}