Commit Graph

6294 Commits

Author SHA1 Message Date
b2e517bb28 usb/serial: add multitask example. 2022-04-06 05:38:11 +02:00
3dbb7c9e15 usb/hid: add keyboard example. 2022-04-06 05:38:11 +02:00
de9acf5d48 usb/hid: fix infinite loop when N=0 2022-04-06 05:38:11 +02:00
6d514a0b31 usb/hid: update for endpoint state changes. 2022-04-06 05:38:11 +02:00
fa9eadcee9 Add docserver metadata. 2022-04-06 05:38:11 +02:00
2ce435dc34 Add basic device state handling for endpoints. 2022-04-06 05:38:11 +02:00
99f95a33c3 Simplify hid output report handling 2022-04-06 05:38:11 +02:00
c8ad82057d Reduce memory overhead and simplify logic for merging endpoint and control request output reports. 2022-04-06 05:38:11 +02:00
c309531874 Remove output() and split() methods from HidClass when there is no out endpoint, and route set_report requests for output reports to RequestHandler::set_report in that case. 2022-04-06 05:38:11 +02:00
daf2379fa4 Make the interupt IN endpoint non-optional 2022-04-06 05:38:11 +02:00
a51de5a39a Remove the feature report reader 2022-04-06 05:38:11 +02:00
cf89c85569 Log when reports are dropped without being read. 2022-04-06 05:38:11 +02:00
5ee7a85b33 Async USB HID class 2022-04-06 05:38:11 +02:00
8fe3b44d82 usb: log on reset, resume, suspend 2022-04-06 05:38:11 +02:00
522a87ae42 usb: centralize all control logging in control.rs 2022-04-06 05:38:11 +02:00
d7d199f2ac nrf/usb: unify in/out wakers for ep0 2022-04-06 05:38:11 +02:00
f5ba022257 Refactor ControlPipe to use the typestate pattern for safety 2022-04-06 05:38:11 +02:00
77e0aca03b Move data chunking from the driver to the lib 2022-04-06 05:38:11 +02:00
1672fdc666 usb-serial: make inner guts private. 2022-04-06 05:38:11 +02:00
cdb7bae51a examples/nrf: don't build usb stuff in stable. 2022-04-06 05:38:11 +02:00
a435d78cf7 usb: cleanup and simplify error handling. 2022-04-06 05:38:11 +02:00
60d3d11197 usb: cleanup logging. 2022-04-06 05:38:11 +02:00
d1e4b3d7d5 usb: add -usb-serial crate, fix warnings and stable build. 2022-04-06 05:38:11 +02:00
c06488eb29 Support multi-frame data phase control requests 2022-04-06 05:38:11 +02:00
d40ebcccf6 Add handlers for standard reqs to ControlHandler 2022-04-06 05:38:11 +02:00
13370c28db Add a control_buf to UsbDevice 2022-04-06 05:38:11 +02:00
c53bb7394a Switch to ControlHandler owned bufs for control_in() 2022-04-06 05:38:11 +02:00
a22639ad92 Remove UnsafeCell from cdc_acm::Control 2022-04-06 05:38:11 +02:00
46bafecb2a Only copy through RAM when needed 2022-04-06 05:38:11 +02:00
d7b1f8ca57 usb: update docs on ControlHandler. 2022-04-06 05:38:11 +02:00
e99a3a1da4 usb: simplify buffer handling for Control IN transfers. 2022-04-06 05:38:11 +02:00
bfce731982 usb: nicer names for control structs. 2022-04-06 05:38:11 +02:00
2b547f311e usb: move all control-related stuff to mod control. 2022-04-06 05:38:11 +02:00
15cc97d794 usb: associate ControlHandlers with interfaces, automatically route requests. 2022-04-06 05:38:11 +02:00
3412e5dc4a usb: cleanup giant matches in control code. 2022-04-06 05:38:11 +02:00
a2f5763a67 usb: add add_class to builder, so that FooBarClass::new(&mut builder) can set up everything. 2022-04-06 05:38:11 +02:00
a062baae38 nrf/usb: fix wrong DMA read size 2022-04-06 05:38:11 +02:00
52c622b1cd Use trait objects instead of generics for UsbDevice::classes 2022-04-06 05:38:11 +02:00
bdc6e0481c Add support for USB classes handling control requests. 2022-04-06 05:38:11 +02:00
5c0db627fe nrf/usb: update where clause syntax. 2022-04-06 05:38:11 +02:00
9a6d11281d Add some comments on the example. 2022-04-06 05:38:11 +02:00
0320500f0f Working CDC-ACM device->host 2022-04-06 05:38:11 +02:00
77ceced036 Working CDC-ACM host->device 2022-04-06 05:38:11 +02:00
37598a5b37 wip: experimental async usb stack 2022-04-06 05:38:11 +02:00
c1b3822964 Merge #695
695: Simplify Channel. r=Dirbaio a=Dirbaio

- Allow initializing in a static, without Forever.
- Remove ability to close, since in embedded enviromnents channels usually live forever and don't get closed.
- Remove MPSC restriction, it's MPMC now. Rename "mpsc" to "channel".
- `Sender` and `Receiver` are still available if you want to enforce a piece of code only has send/receive access, but are optional: you can send/receive directly into the Channel if you want.

Co-authored-by: Dario Nieuwenhuis <dirbaio@dirbaio.net>
2022-04-05 23:53:59 +00:00
6731948056 Add async Mutex. 2022-04-06 01:39:58 +02:00
27a1b0ea73 Simpler Channel.
- Allow initializing in a static, without Forever.
- Remove ability to close, since in embedded enviromnents channels usually live forever and don't get closed.
- Remove MPSC restriction, it's MPMC now. Rename "mpsc" to "channel".
- `Sender` and `Receiver` are still available if you want to enforce a piece of code only has send/receive access, but are optional: you can send/receive directly into the Channel if you want.
2022-04-06 01:34:08 +02:00
f32fa1d33a Add select, select3, select4. 2022-04-05 21:51:43 +02:00
b5c479fdad Remove impl Unpin for SelectAll, as it's automatically inferred. 2022-04-05 21:22:02 +02:00
59ec634246 Remove SelectAll::into_inner.
Due to not requiring Unpin, it's not really possible to call it
after having polled it, you can only call it right after constructing it,
so in practice it's not very useful.
2022-04-05 21:20:44 +02:00