Skip to content

Commit 7af1ffd

Browse files
author
Connor Truono
committed
Spelling fix
1 parent 40cbd31 commit 7af1ffd

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/lib.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,9 @@ impl<I2C: embedded_hal_async::i2c::I2c> Lis2dw12<I2C> {
130130
Ok(self.read_reg(Register::TempOut).await? as i8)
131131
}
132132

133-
/// Reads the current temperature and returns the value in degrees Celcius
134-
pub async fn temp_celcius(&mut self) -> Result<f32, I2C::Error> {
135-
Ok(Lis2dw12::<I2C>::convert_temp_reg_to_celcius(self.temp_12bit().await?))
133+
/// Reads the current temperature and returns the value in degrees Celsius
134+
pub async fn temp_celsius(&mut self) -> Result<f32, I2C::Error> {
135+
Ok(Lis2dw12::<I2C>::convert_temp_reg_to_celsius(self.temp_12bit().await?))
136136
}
137137

138138
/// Reads the device acceleration register in the X axis
@@ -259,9 +259,9 @@ impl<I2C: embedded_hal_async::i2c::I2c> Lis2dw12<I2C> {
259259

260260
// -------------------------- Helper Functions --------------------------
261261

262-
/// Converts i16 temperature representation to degrees Celcius
262+
/// Converts i16 temperature representation to degrees Celsius
263263
/// For use with 8bit temp register, convert to i16 and shift data to upper (MSB) byte for input
264-
pub fn convert_temp_reg_to_celcius(temp_in: i16) -> f32 {
264+
pub fn convert_temp_reg_to_celsius(temp_in: i16) -> f32 {
265265
// Convert temp int to float
266266
let mut temp: f32 = temp_in as f32;
267267

0 commit comments

Comments
 (0)