Skip to content

Commit cc760c5

Browse files
hakehuangMaureenHelm
authored andcommitted
sample: usb: hid-cdc: add a sleep for cpu to response
add a sleep while the uart init is fail. so cpu will have chance to output error message Signed-off-by: Hake Huang <[email protected]>
1 parent 741ae93 commit cc760c5

File tree

1 file changed

+3
-0
lines changed
  • samples/subsys/usb/hid-cdc/src

1 file changed

+3
-0
lines changed

samples/subsys/usb/hid-cdc/src/main.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -637,6 +637,9 @@ void main(void)
637637
&dtr);
638638
if (dtr) {
639639
break;
640+
} else {
641+
/* Give CPU resources to low priority threads. */
642+
k_sleep(K_MSEC(100));
640643
}
641644
}
642645

0 commit comments

Comments
 (0)