From 0479d19b28b3becb1be05ea399ea36313a70af62 Mon Sep 17 00:00:00 2001 From: klaute Date: Sun, 28 Aug 2016 09:37:09 +0200 Subject: [PATCH] LED flashing mechanism added to RX/TX action for the first virtual serial channel. --- firmware/main.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/firmware/main.c b/firmware/main.c index 0a3d165..b4b113b 100755 --- a/firmware/main.c +++ b/firmware/main.c @@ -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; } }