fix set_day method

The method receives in decimal the value to be set as the day of the month, but the ds3231 module expects it in bcd format.  
Using the 'write_register_decimal' method, can be written in the correct format.
master
kirbylife 2023-04-26 22:24:34 -06:00 committed by Diego Barrios Romero
parent de0231b958
commit fd6a145825
1 changed files with 1 additions and 1 deletions

View File

@ -160,7 +160,7 @@ where
if !(1..=31).contains(&day) {
return Err(Error::InvalidInputData);
}
self.iface.write_register(Register::DOM, day)
self.write_register_decimal(Register::DOM, day)
}
fn set_month(&mut self, month: u8) -> Result<(), Self::Error> {