ch32-hal icon indicating copy to clipboard operation
ch32-hal copied to clipboard

Can't degrade_adc for PD3/A4 (ch32v003)

Open jsprog opened this issue 1 year ago • 2 comments

Description

AdcChannel trait isn't implemented for PD3/A4

    let adc_channel_7 = p.PD4.degrade_adc(); // success
    let adc_channel_4 = p.PD3.degrade_adc(); // not available
error[E0599]: no method named `degrade_adc` found for struct `PD3` in the current scope

Affected devices:

  • ch32v003f4p6 and CH32V003f4u6

jsprog avatar Nov 09 '24 23:11 jsprog

@andelf Is this dead?

jsprog avatar May 10 '25 10:05 jsprog

Hi @jsprog Thanks for the report, there was an error in the peripheral definition, I have fixed it here: https://github.com/ch32-rs/ch32-data/pull/17

In the meantime, you can fix it locally in ch32-data, generate a new ch32-metapac with:

./d gen

And then use your local ch32-metapac in ch32-hal and then use this local ch32-hal in your project.

romainreignier avatar May 12 '25 10:05 romainreignier

Thank you, I just stumbled over this and the issue was fixed swiftly. Bummer that the project seems on kind of a hiatus right now.

polygon avatar Jun 25 '25 18:06 polygon

Yes, I am not sure what are @andelf plans. It must be quite busy these days because he used to be quite involved in this project before.

romainreignier avatar Jun 25 '25 18:06 romainreignier

@andelf has been pretty quiet lately, so I went ahead and merged the fix.

Dummyc0m avatar Jun 25 '25 20:06 Dummyc0m