Commit 8ac9084
committed
sys/usb/cdc_acm: Change API to report errors
- Change return type of `usbus_cdc_acm_submit` from `size_t` to `ssize_t`
to be able to report errors
- Change `stdio_cdc_acm` to make use of the new API
- Change `stdio_cdc_acm` to not loop until all data is flushed, but just
report what could be added to the buffer now and post the flush event
- The layers above should already loop until all data is written
- The layers above could opt to not loop when in IRQ context. This
would allow using `stdio_usb_cdc_acm` from IRQ context.1 parent 3a04a1d commit 8ac9084
File tree
3 files changed
+12
-15
lines changed- sys
- include/usb/usbus/cdc
- usb/usbus/cdc/acm
3 files changed
+12
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
| 45 | + | |
44 | 46 | | |
45 | 47 | | |
46 | 48 | | |
| |||
198 | 200 | | |
199 | 201 | | |
200 | 202 | | |
201 | | - | |
| 203 | + | |
| 204 | + | |
202 | 205 | | |
203 | | - | |
| 206 | + | |
204 | 207 | | |
205 | 208 | | |
206 | 209 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
148 | 149 | | |
149 | 150 | | |
150 | 151 | | |
151 | | - | |
| 152 | + | |
152 | 153 | | |
153 | | - | |
| 154 | + | |
154 | 155 | | |
155 | 156 | | |
156 | | - | |
| 157 | + | |
157 | 158 | | |
158 | 159 | | |
159 | 160 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | 27 | | |
29 | 28 | | |
30 | 29 | | |
| |||
36 | 35 | | |
37 | 36 | | |
38 | 37 | | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
48 | 41 | | |
49 | 42 | | |
50 | 43 | | |
| |||
0 commit comments