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

feature i2c fails to compile if feature spi isn't enabed #7

Closed
webhet opened this issue Jul 11, 2023 · 1 comment
Closed

feature i2c fails to compile if feature spi isn't enabed #7

webhet opened this issue Jul 11, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@webhet
Copy link

webhet commented Jul 11, 2023

Hi,
very cool and well designed crate.

Just noticed a problem when wanting to use the i2c feature only. This doesn't compile and gives the error:

error[E0432]: unresolved import `spi`
   --> /home/.../.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/bma400-0.1.0/src/lib.rs:193:9
    |
193 | pub use spi::SPIInterface;
    |         ^^^ help: a similar path exists: `embedded_hal::spi`

I think L193 should use cfg(...spi...) instead of i2c.

@webhet webhet changed the title feature i2c fails to compile if fetaure spi isn't enabed feature i2c fails to compile if feature spi isn't enabed Jul 11, 2023
@cfrenette cfrenette self-assigned this Jul 11, 2023
@cfrenette cfrenette added the bug Something isn't working label Jul 11, 2023
@cfrenette
Copy link
Owner

You are correct @webhet, good catch and thank you for reporting this! I've made the changes above. I'll merge them into a new release and publish to crates.io shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants