Skip to content

Commit

Permalink
Fix ReadScratch command buffer size (#494)
Browse files Browse the repository at this point in the history
  • Loading branch information
kgv authored Oct 21, 2024
1 parent ff343b6 commit 7d5e233
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/rmt_onewire_temperature.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ fn ds18b20_get_temperature<'a>(addr: &OWAddress, bus: &OWDriver) -> Result<f32,

ds18b20_send_command(addr, bus, Ds18b20Command::ReadScratch as u8)?;

let mut buf = [0u8; 10];
let mut buf = [0u8; 9];
bus.read(&mut buf)?;
let lsb = buf[0];
let msb = buf[1];
Expand Down

0 comments on commit 7d5e233

Please sign in to comment.