File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -70,6 +70,7 @@ int SerialUSB::peek() {
7070 }
7171
7272 uint8_t c;
73+ tud_task ();
7374 return tud_cdc_peek (&c) ? (int ) c : -1 ;
7475}
7576
@@ -79,6 +80,7 @@ int SerialUSB::read() {
7980 return -1 ;
8081 }
8182
83+ tud_task ();
8284 if (tud_cdc_available ()) {
8385 return tud_cdc_read_char ();
8486 }
@@ -91,6 +93,7 @@ int SerialUSB::available() {
9193 return 0 ;
9294 }
9395
96+ tud_task ();
9497 return tud_cdc_available ();
9598}
9699
@@ -100,6 +103,7 @@ int SerialUSB::availableForWrite() {
100103 return 0 ;
101104 }
102105
106+ tud_task ();
103107 return tud_cdc_write_available ();
104108}
105109
@@ -110,6 +114,7 @@ void SerialUSB::flush() {
110114 }
111115
112116 tud_cdc_write_flush ();
117+ tud_task ();
113118}
114119
115120size_t SerialUSB::write (uint8_t c) {
@@ -151,6 +156,7 @@ size_t SerialUSB::write(const uint8_t *buf, size_t length) {
151156 // reset our timeout
152157 last_avail_time = 0 ;
153158 }
159+ tud_task ();
154160 return written;
155161}
156162
You can’t perform that action at this time.
0 commit comments