From 65755c03935443fbac72f2f0ecc7cacecf027e04 Mon Sep 17 00:00:00 2001 From: ramadhan-dev-bright Date: Thu, 26 Mar 2026 19:57:48 +0700 Subject: [PATCH] docs(i2c): clarify write_read operation in examples --- embedded-hal/src/i2c.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/embedded-hal/src/i2c.rs b/embedded-hal/src/i2c.rs index 8b99197e..5dbf8c88 100644 --- a/embedded-hal/src/i2c.rs +++ b/embedded-hal/src/i2c.rs @@ -81,6 +81,7 @@ //! } //! //! pub fn read_temperature(&mut self) -> Result { +//! //send the register address we want to read, then receive the data into 'temp' //! let mut temp = [0]; //! self.i2c.write_read(ADDR, &[TEMP_REGISTER], &mut temp)?; //! Ok(temp[0]) @@ -106,6 +107,7 @@ //! //! pub fn read_temperature(&mut self) -> Result { //! let mut temp = [0]; +//! //send the register address we want to read, then receive the data into 'temp' //! self.i2c.write_read(ADDR, &[TEMP_REGISTER], &mut temp)?; //! Ok(temp[0]) //! }