Kirill Mikhailov aeda6ac00a
Remove embedded-hal 0.2.x impls and dependency from esp-lp-hal package (#2609)
* removed eh02 dependencies, sh*tcode, not yet tested properly,copy-pasted

* changelog entry

* Don't implement eh1 traits
2024-11-27 14:54:00 +00:00

27 lines
599 B
Rust

//! Uses `LP_I2C` and reads calibration data from BMP180 sensor.
//!
//! This example dumps the calibration data from a BMP180 sensor, to view them,
//! logic analyzer or oscilloscope is required.
//!
//! The following wiring is assumed:
//! - SDA => GPIO6
//! - SCL => GPIO7
//% CHIPS: esp32c6
#![no_std]
#![no_main]
use esp_lp_hal::{i2c::LpI2c, prelude::*};
use panic_halt as _;
#[entry]
fn main(mut i2c: LpI2c) -> ! {
let _peripherals = esp32c6_lp::Peripherals::take().unwrap();
loop {
let mut data = [0u8; 22];
i2c.write_read(0x77, &[0xaa], &mut data).ok();
}
}