Commit 9d69bc0
committed
fix(usb): add read delay, improved CDC latency
New CDC behavior: when the code reads data from CDC and the Tx FIFO is empty, we just return an empty buffer instead of waiting until there's some data to send.
Otherwise, this causes output latency in CircuitPython. Also, tested it against the hardware and it seem to be sending empty buffers when there's nothing to send over CDC, matching the new behavior.1 parent 3c7c5c7 commit 9d69bc0
2 files changed
+16
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| 90 | + | |
90 | 91 | | |
91 | 92 | | |
92 | 93 | | |
| |||
197 | 198 | | |
198 | 199 | | |
199 | 200 | | |
200 | | - | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
201 | 212 | | |
202 | 213 | | |
203 | 214 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
71 | | - | |
72 | 70 | | |
73 | 71 | | |
74 | 72 | | |
| |||
118 | 116 | | |
119 | 117 | | |
120 | 118 | | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
125 | 122 | | |
| 123 | + | |
126 | 124 | | |
127 | 125 | | |
128 | 126 | | |
129 | 127 | | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | 128 | | |
144 | 129 | | |
145 | 130 | | |
| |||
157 | 142 | | |
158 | 143 | | |
159 | 144 | | |
160 | | - | |
161 | 145 | | |
162 | 146 | | |
0 commit comments