embassy-rs / embassy

Modern embedded framework, using Rust and async.
https://embassy.dev
Apache License 2.0
5.3k stars 732 forks source link

USB Host Pico #1443

Open MarcoKonrad opened 1 year ago

MarcoKonrad commented 1 year ago

Hello everybody,

does anyone know if it is possible to make the RP Pico a usb host using embassy? If not, does anyone know a diffrent rust crate that does this?

I know there is a C Libary for that, but i want to avoid joining two Languages since i dont know how C and Embassy work together in embbeded coding.

MarcoKonrad commented 1 year ago

Since @Dirbaio added this to the kind-features I assume it is currently not possible.

If anyone would have an idea for my problem, I would be highly thankful.

I do have a HID USB Interface that I want to send data to the pico which later should be send to a web api using the WiFi module on the pico.

I am new to embedded coding and I am struggling a little bit with the whole stuff🙈

Dirbaio commented 1 year ago

Currently embassy-usb is device-mode-only, yes. I'd love to support host mode someday too, but as far as I know no one is planning to work on it for now. PR's welcome :)

There's a Rust USB Host implementation for STM32 here (Apache+MIT licensed) that looks neat, that we could use as a starting point. A lot of the logic is chip-independent.