Clean code

This commit is contained in:
2020-11-18 08:48:20 +01:00
parent 26eac4ac69
commit b9c0be68d8
9 changed files with 49 additions and 54 deletions

View File

@@ -22,12 +22,12 @@ void rtc_set_time(uint8_t part, uint8_t value)
i2c_writebuf(RTC_I2C_ADDR, part, 1, &bcd);
}
struct time rtc_read_time(void)
struct TIME rtc_read_time(void)
{
uint8_t buffer[3];
i2c_readbuf(RTC_I2C_ADDR, 0x02, 3, buffer);
struct time curr_time = {
struct TIME curr_time = {
BCD_2_DEC(buffer[2]),
BCD_2_DEC(buffer[1]),
BCD_2_DEC(buffer[0])