void ds1302_init(void) { time_t tod; /* initialise the hardware into a sensible state */ ds1302_set_pin_data_driven(true); ds1302_set_pin_data(false); ds1302_set_pin_ce(false); ds1302_set_pin_clk(false); ds1302_check_rtc(); wrtime(&tod); }
void ds1302_init(void) { time_t tod; /* initialise the hardware into a sensible state */ ds1302_set_pin_data_driven(true); ds1302_set_pin_data(false); ds1302_set_pin_ce(false); ds1302_set_pin_clk(false); tod.high = 0; /* until 2106 */ tod.low = ds1302_read_rtc(); wrtime(&tod); }