Commit Graph

2335 Commits

Author SHA1 Message Date
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
c8bd792b7a reorganize util mod. 2022-04-05 21:17:29 +02:00
aee19185b7 Add more docserver metadata. 2022-04-05 21:05:09 +02:00
f5cf465417 Merge #693
693: no_std version of `futures::future::select_all` r=Dirbaio a=alexmoon

Here's a no-std compatible version of `select_all`. It's not quite as useful as the original because it requires an array of Unpin futures to be pre-constructed instead of taking an iterator (which could return `Pin<Box<_>>` in `std`). And, of course, you don't get a `Vec` of the unfinished futures returned at completion. Still, I think it's cleaner than a long cons of select calls.

I'll leave it up to you whether this is sufficiently general purpose to include in Embassy or not.


Co-authored-by: alexmoon <alex.r.moon@gmail.com>
2022-04-05 17:20:16 +00:00
e42295c4c5 Remove Unpin bound from SelectAll 2022-04-04 21:24:10 -04:00
04a263c700 no_std version of futures::future::select_all 2022-04-04 19:30:16 -04:00
b0de865e0b Merge #691
691: Add pllsai1 and allow for 120Mhz clock on stm32l4+ r=Dirbaio a=ant32



Co-authored-by: Philip A Reimer <antreimer@gmail.com>
2022-04-02 13:30:32 +00:00
1f59f8e7d0 add pllsai1 and allow for 120Mhz clock on stm32l4+ 2022-04-01 22:42:43 -06:00
0eea6fd6b5 Merge #690
690: Use embassy/defmt-timestamp-uptime in all examples. r=Dirbaio a=Dirbaio

bors r+

Co-authored-by: Dario Nieuwenhuis <dirbaio@dirbaio.net>
2022-04-02 02:35:49 +00:00
82803bffda Use embassy/defmt-timestamp-uptime in all examples. 2022-04-02 04:35:06 +02:00