Skip to content

Commit

Permalink
fix: demo compile error
Browse files Browse the repository at this point in the history
  • Loading branch information
andelf committed Jul 14, 2024
1 parent 4dacf70 commit 186784e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion examples/hpm6750evkmini/src/bin/i2c_ds3231m.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ impl<'d> DS3231M<'d> {
pub fn now(&mut self) -> Option<DateTime> {
let mut buf = [0u8; 7];
self.i2c.blocking_write_read(ADDRESS, &[regs::SECONDS], &mut buf).ok()?;
//self.i2c.blocking_write(ADDRESS, &[regs::SECONDS]).ok()?;
//self.i2c.blocking_read(ADDRESS, &mut buf).ok()?;

let seconds = bcd2bin(buf[0]);
let minutes = bcd2bin(buf[1]);
Expand Down Expand Up @@ -186,7 +188,7 @@ async fn main(_spawner: embassy_executor::Spawner) -> ! {

let r = split_resources!(p);

let mut led = Output::new(r.leds.red, Level::Low, Speed::Medium);
let mut led = Output::new(r.leds.red, Level::Low, Speed::default());

// use IOC for power domain PY pins
r.uart.tx.set_as_ioc_gpio();
Expand Down

0 comments on commit 186784e

Please sign in to comment.