Esempio n. 1
0
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);
}
Esempio n. 2
0
arg_t _stime(void)
{
	time_t t;
	if (type != 0) {
		udata.u_error = EINVAL;
		return -1;
	}
	if (uget(&t, tvec, sizeof(t)) || esuper())
		return -1;
	wrtime(&t);
	return (-1);
}
Esempio n. 3
0
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);
}