101: /* stop counter temporarily */
102: rtcWrite(rxCTRL, 0x02);
103:
104: /* set current date time */
105: rtcWrite(rxSEC, dt.d_sec);
106: rtcWrite(rxMIN, dt.d_min);
107: rtcWrite(rxHOUR, dt.d_hour);
108: rtcWrite(rxWEEK, 0x01); // we do not use day of the week
109: rtcWrite(rxDAY, dt.d_day);
110: rtcWrite(rxMONTH, dt.d_month);
111: rtcWrite(rxYEAR, dt.d_year);
112:
113: /* resume counter */
114: rtcWrite(rxCTRL, 0x00);
115:
168: if (er >= E_OK) {
169: rtcWrite(rxEXT, 0x00);
170: rtcWrite(rxFLAG, 0x00);
171: rtcWrite(rxCTRL, 0x00);
172: }