i2c addresses go only up to 127
This commit is contained in:
parent
790a27cc6d
commit
75544904a5
@ -20,7 +20,7 @@ async fn main(_spawner: Spawner) {
|
||||
let config = twim::Config::default();
|
||||
let mut i2c = Twim::new(p.TWISPI0, Irqs, p.P0_03, p.P0_04, config);
|
||||
|
||||
for addr in 1..=u8::MAX {
|
||||
for addr in 1..=127 {
|
||||
if i2c.read(addr, &mut [0]).await.is_ok() {
|
||||
info!("i2c device at 0x{:02X}", addr)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user