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() {
70
70
}
71
71
72
72
uint8_t c;
73
+ tud_task ();
73
74
return tud_cdc_peek (&c) ? (int ) c : -1 ;
74
75
}
75
76
@@ -79,6 +80,7 @@ int SerialUSB::read() {
79
80
return -1 ;
80
81
}
81
82
83
+ tud_task ();
82
84
if (tud_cdc_available ()) {
83
85
return tud_cdc_read_char ();
84
86
}
@@ -91,6 +93,7 @@ int SerialUSB::available() {
91
93
return 0 ;
92
94
}
93
95
96
+ tud_task ();
94
97
return tud_cdc_available ();
95
98
}
96
99
@@ -100,6 +103,7 @@ int SerialUSB::availableForWrite() {
100
103
return 0 ;
101
104
}
102
105
106
+ tud_task ();
103
107
return tud_cdc_write_available ();
104
108
}
105
109
@@ -110,6 +114,7 @@ void SerialUSB::flush() {
110
114
}
111
115
112
116
tud_cdc_write_flush ();
117
+ tud_task ();
113
118
}
114
119
115
120
size_t SerialUSB::write (uint8_t c) {
@@ -151,6 +156,7 @@ size_t SerialUSB::write(const uint8_t *buf, size_t length) {
151
156
// reset our timeout
152
157
last_avail_time = 0 ;
153
158
}
159
+ tud_task ();
154
160
return written;
155
161
}
156
162
You can’t perform that action at this time.
0 commit comments