LED flashing mechanism added to RX/TX action for the first virtual serial channel.
This commit is contained in:
parent
a0b57e614f
commit
0479d19b28
1 changed files with 6 additions and 0 deletions
|
@ -265,7 +265,9 @@ void CDC1_Task(void)
|
||||||
for (uint16_t i = 0; i < DataLength; i++)
|
for (uint16_t i = 0; i < DataLength; i++)
|
||||||
{
|
{
|
||||||
// process the received data and descide to do an action
|
// process the received data and descide to do an action
|
||||||
|
LED0_ON;
|
||||||
cc_processData(Buffer[i]);
|
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)
|
if (data != NULL && len > 0 && LineEncoding1.BaudRateBPS)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
LED1_ON;
|
||||||
|
|
||||||
/* Select the Serial Tx Endpoint */
|
/* Select the Serial Tx Endpoint */
|
||||||
Endpoint_SelectEndpoint(CDC1_TX_EPADDR);
|
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 */
|
/* Send an empty packet to ensure that the host does not buffer data sent to it */
|
||||||
Endpoint_ClearIN();
|
Endpoint_ClearIN();
|
||||||
|
|
||||||
|
LED1_OFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue