stm32-rs / stm32g0xx-hal

Peripheral access API for STM32G0 series microcontrollers
Apache License 2.0
75 stars 51 forks source link

i2c-nonblocking: how to use? #145

Open jkorinth opened 7 months ago

jkorinth commented 7 months ago

What is the state of non-blocking i2c, can it be used? I tried cargo add stm32g0xx-hal --no-default-features --features stm32g071cb,rt,i2c-nonblocking but compilation fails with could not find blocking in i2c in prelude.rs.

andresv commented 7 months ago

Non-blocking things are under i2c::nonblocking https://github.com/stm32-rs/stm32g0xx-hal/blob/096121af08f320a3e115945c176c843e7526eff0/src/i2c/mod.rs#L5

PS: have you looked into embassy. It has the most comprehensive driver support for all STM32 families.