embassy-rs / docserver

2 stars 3 forks source link

Docs refer to wrong version of embedded_hal #2

Open elpiel opened 1 year ago

elpiel commented 1 year ago

The Adc struct of embassy_rp implements Channel from embedded_hal 0.2 but the URL in the docs points to 1.0.0-alpha.9 and once clicked it shows 404.

https://docs.embassy.dev/embassy-rp/git/rp2040/adc/struct.Adc.html#implementations

peter-lyons-kehl commented 1 year ago

This comes from embassy/embassy-rp > Cargo.toml:

embedded-hal-02 = { package = "embedded-hal", version = "0.2.6", features = ["unproven"] }
embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-alpha.9", optional = true}

There is https://docs.rs/embedded-hal/0.2.6/embedded_hal/adc/trait.Channel.html, but no counterpart under https://docs.rs/embedded-hal/1.0.0-alpha.9/embedded_hal/index.html.

Any tips, please?

elpiel commented 1 year ago

Channel is indeed from 0.2 and I believe it has something to do with the server and this method in particular:

https://github.com/embassy-rs/docserver/blob/main/src/bin/server.rs#L153-L158

But you have to double check this because it seems that this method only handles built crates not external.