Commit Graph

82 Commits

Author SHA1 Message Date
bors[bot]
465e4c8b19
Merge #1151
1151: USB: allow setting the interface string for interface alt settings r=Dirbaio a=mattico

This is a breaking change to embassy-usb's API.

Co-authored-by: Matt Ickstadt <matt@beckenterprises.com>
2023-02-01 00:36:22 +00:00
Dario Nieuwenhuis
ca10fe7135 usb: docs 2023-01-31 22:27:19 +01:00
nitroxis
c9e2cd6dd4 usb: allow adding isochronous endpoints 2023-01-27 15:53:13 +01:00
Matt Ickstadt
7ecb05ff77 usb: allow setting the interface string for interface alt settings 2023-01-13 12:10:36 -06:00
chemicstry
ce842fe28c Refactor embassy-usb address handling to allow reordering of status resoponse 2023-01-11 17:47:12 +01:00
bors[bot]
a6b52bde58
Merge #1130
1130: USB serial (CDC-ACM) improvements r=Dirbaio a=timokroeger

* Remove unused call management descriptor
* Set flag for supported capabilities

The rp `usb_serial` example still works with windows hosts.

Co-authored-by: Timo Kröger <timokroeger93@gmail.com>
2023-01-02 22:51:58 +00:00
Dario Nieuwenhuis
771806be79 net/chan: split state runner. 2022-12-27 01:07:58 +01:00
Timo Kröger
4e0d563997 usb cdc-acm: Set flag for supported capabilities 2022-12-26 09:36:04 +01:00
Timo Kröger
97f9f248f4 usb cdc-acm: Remove unused call management descriptor 2022-12-26 09:35:23 +01:00
Dario Nieuwenhuis
007246b160 net: split channel-based driver impl from usb cdc-ncm into a separate crate. 2022-12-26 04:49:08 +01:00
Dario Nieuwenhuis
1f033d509a net: split driver trait to a separate crate. 2022-12-26 04:49:08 +01:00
Dario Nieuwenhuis
e9219405ca usb/cdc-ncm: add embassy-net Device implementation. 2022-12-13 16:43:25 +01:00
Gabriel Smith
4d84b5469e Drive-by documentation link fixes 2022-11-27 16:32:18 -05:00
chrysn
6718ca3a94 all Cargo.toml: Add license to all crate Cargo.toml files
Closes: https://github.com/embassy-rs/embassy/issues/1002
2022-10-07 12:41:56 +02:00
Dario Nieuwenhuis
753781a263 Build docs in CI 2022-10-02 23:30:12 +02:00
Dario Nieuwenhuis
f27a47a37b usb: move classes into the embassy-usb crate. 2022-09-26 13:00:21 +02:00
Dario Nieuwenhuis
f4f5824972 usb: do not allow converting Directon to/from u8 2022-09-26 12:35:33 +02:00
Dario Nieuwenhuis
7f7c14b7bc usb: split driver trait to separate crate. 2022-09-26 12:29:27 +02:00
Alex Martens
a45fb2d718 usb: fix compile errors with the log feature 2022-09-24 09:42:06 -07:00
Dario Nieuwenhuis
897b72c872 Update Rust nightly.
Removes feature(generic_associated_types)
2022-09-22 16:38:14 +02:00
Dario Nieuwenhuis
598689ef43 futures: move select* and join* to separate modules. 2022-08-29 01:00:22 +02:00
Dario Nieuwenhuis
21072bee48 split embassy-util into embassy-futures, embassy-sync. 2022-08-22 22:18:13 +02:00
Ulf Lilleengen
3e155d2ec3 nRF documentation warning fixes 2022-08-22 16:37:35 +02:00
Dario Nieuwenhuis
dff6847e9c Add -boot docserver metadata. 2022-08-15 20:41:00 +02:00
Dario Nieuwenhuis
a0f1b0ee01 Split embassy crate into embassy-executor, embassy-util. 2022-07-29 23:40:36 +02:00
huntc
8d71a358c8 Build in a new Unpowered state
Replaces the sub-state of representing being being available. Power states also now set enable/disable directly too, which simplifies code.
2022-07-08 15:30:15 +10:00
huntc
4a8f117f25 Puts in the machinery to handle power detected/removed 2022-07-07 10:08:57 +10:00
huntc
c46e9b6cfc Introduces EnabledUsbDevice
EnabledUsbDevice is a wrapper around the UsbDevice where their enablement is also subject to external events, such as POWER events for nRF. It is introduced generically to support other platforms should they also require external signalling for enablement.
2022-07-07 10:08:57 +10:00
Dario Nieuwenhuis
948bb93dc2 docs: Add $COMMIT to git srclinks. 2022-06-26 23:55:38 +02:00
Dario Nieuwenhuis
a8703b7598 Run rustfmt. 2022-06-12 22:22:31 +02:00
Dario Nieuwenhuis
39ab599eed usb: set default max_packet_size_0 to 64.
Supported chips can always do 64 bytes, 8 bytes seems to be more rare.
We can add a way for the driver to specify the default in the future.
2022-05-31 02:01:22 +02:00
Dario Nieuwenhuis
a7383840e7 usb: make ControlPipe accept, reject async. 2022-05-30 00:35:27 +02:00
Dario Nieuwenhuis
883e28a0fb usb: add first, last params to ControlPipe data_in, data_out. 2022-05-30 00:08:28 +02:00
Dario Nieuwenhuis
1ec2e5672f usb: remove is_stalled, set_stalled from Endpoint.
They're unused, and I believe it's not allowed for classes to
stall EPs on their own?
2022-05-30 00:07:15 +02:00
Dario Nieuwenhuis
98d8c9373d usb: delay bus.set_address() to after ending the control transfer. 2022-05-30 00:03:36 +02:00
Dario Nieuwenhuis
5fd55f9529 usb: parse request in embassy-usb instead of the driver. 2022-05-12 18:14:48 +02:00
Dario Nieuwenhuis
6af5f8eb2d usb: merge alloc_control_pipe and into_bus into start.
This prevents calling `alloc_control_pipe` twice at compile time, which was
always an error.
2022-05-10 17:30:07 +02:00
Dario Nieuwenhuis
02ae1138e1 usb: merge Control logic into main code.
Now that control stuff is called from just one place, there's
no need to keep it as a separate struct.
2022-05-09 03:43:24 +02:00
Dario Nieuwenhuis
7ed462a657 usb: simplify control in/out handlng, calling response from a single place. 2022-05-09 02:11:02 +02:00
Dario Nieuwenhuis
2e104170de usb: remove address arg from endpoint allocation. 2022-05-09 02:07:48 +02:00
Dario Nieuwenhuis
0476f6b55b usb: add support for custom string descriptors. 2022-04-23 04:40:57 +02:00
Dario Nieuwenhuis
7c6a88f3dd usb: set the interface handler in InterfaceBuilder. 2022-04-23 01:29:19 +02:00
Dario Nieuwenhuis
092c2b7dfe usb: builtin handling of interface alternate settings
The stack reads its own descriptors to figure out which endpoints
are used in which alt settings, and enables/disables them as needed.

The ControlHandler has a callback so it can get notified of alternate
setting changes, which is purely informative (it doesn't have to do anything).
2022-04-23 01:11:10 +02:00
Dario Nieuwenhuis
50d257cc7c usb: improved descriptor building API
The same API call allocates interfaces/endpoints/etc and writes their descriptors.
This means less API calls, and less possibility to screw things up.

DescriptorWriter is now private.
2022-04-16 04:30:31 +02:00
Dario Nieuwenhuis
1bf7b4d6c3 usb: rename UsbDeviceBuilder -> Builder. 2022-04-16 04:14:20 +02:00
Dario Nieuwenhuis
94090e068e usb: fix wrong logging of CONTROL OUT data. 2022-04-15 18:45:52 +02:00
alexmoon
b0725c14d3 Split UsbDevice::run into run and run_until_suspend 2022-04-13 16:04:31 -04:00
alexmoon
ff7c6b350e Remove channel and make run future cancelable 2022-04-13 14:55:02 -04:00
alexmoon
1d875fab2d Use embassy::util::select3 2022-04-13 14:55:02 -04:00
alexmoon
2915e858ba Make Driver::disable async and fix comment 2022-04-13 14:55:02 -04:00