projects
/
pub
/
USBasp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add extra tests to the MassStorage device demo and class driver for validating comman...
[pub/USBasp.git]
/
Demos
/
Device
/
LowLevel
/
DualCDC
/
DualCDC.c
diff --git
a/Demos/Device/LowLevel/DualCDC/DualCDC.c
b/Demos/Device/LowLevel/DualCDC/DualCDC.c
index
1031068
..
862945e
100644
(file)
--- a/
Demos/Device/LowLevel/DualCDC/DualCDC.c
+++ b/
Demos/Device/LowLevel/DualCDC/DualCDC.c
@@
-229,6
+229,10
@@
void CDC1_Task(void)
uint8_t JoyStatus_LCL = Joystick_GetStatus();
\r
static bool ActionSent = false;
\r
\r
uint8_t JoyStatus_LCL = Joystick_GetStatus();
\r
static bool ActionSent = false;
\r
\r
+ /* Device must be connected and configured for the task to run */
\r
+ if (!(USB_IsConnected) || !(USB_ConfigurationNumber))
\r
+ return;
\r
+
\r
char* JoystickStrings[] =
\r
{
\r
"Joystick Up\r\n",
\r
char* JoystickStrings[] =
\r
{
\r
"Joystick Up\r\n",
\r
@@
-288,6
+292,10
@@
void CDC1_Task(void)
*/
\r
void CDC2_Task(void)
\r
{
\r
*/
\r
void CDC2_Task(void)
\r
{
\r
+ /* Device must be connected and configured for the task to run */
\r
+ if (!(USB_IsConnected) || !(USB_ConfigurationNumber))
\r
+ return;
\r
+
\r
/* Select the Serial Rx Endpoint */
\r
Endpoint_SelectEndpoint(CDC2_RX_EPNUM);
\r
\r
/* Select the Serial Rx Endpoint */
\r
Endpoint_SelectEndpoint(CDC2_RX_EPNUM);
\r
\r