Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adc example issue #82

Closed
yhyuan opened this issue Jul 14, 2019 · 3 comments
Closed

adc example issue #82

yhyuan opened this issue Jul 14, 2019 · 3 comments

Comments

@yhyuan
Copy link

yhyuan commented Jul 14, 2019

I am trying to run this adc example. but I found this line of code failed to compile.

let mut adc = adc::Adc::adc1(p.ADC1, &mut rcc.apb2, clocks);

The error message is

error[E0061]: this function takes 2 parameters but 3 parameters were supplied
  --> src/main.rs:28:19
   |
28 |     let mut adc = adc::Adc::adc1(p.ADC1, &mut rcc.apb2, clocks);
   |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected 2 parameters

error: aborting due to previous error

For more information about this error, try `rustc --explain E0061`.
error: Could not compile `blue-pill-quickstart`.

It seems the api has been changed.

@TheZoq2
Copy link
Member

TheZoq2 commented Jul 14, 2019

Yes, that change was made in #67 which has not yet been published to crates.io which is why the example fails to build.

Until we publish it, you can have a look at the examples in the 0.3.0 tag https://github.com/stm32-rs/stm32f1xx-hal/tree/v0.3.0

@yhyuan
Copy link
Author

yhyuan commented Jul 15, 2019

Yes, that change was made in #67 which has not yet been published to crates.io which is why the example fails to build.

Until we publish it, you can have a look at the examples in the 0.3.0 tag https://github.com/stm32-rs/stm32f1xx-hal/tree/v0.3.0

Thanks, I guess I can use the github to directly use the current master branch rather than use the one in crates.io.

@TheZoq2
Copy link
Member

TheZoq2 commented Jul 16, 2019

That works as well. I'll go ahead and close this issue since it will be fixed when we publish the next version

@TheZoq2 TheZoq2 closed this as completed Jul 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants