j
Fork of ds3231 by
Diff: ds3231.h
- Revision:
- 4:0beb5e9ac927
- Parent:
- 3:312589d8185c
- Child:
- 5:61dfe2690360
diff -r 312589d8185c -r 0beb5e9ac927 ds3231.h --- a/ds3231.h Thu Nov 20 21:06:57 2014 +0000 +++ b/ds3231.h Thu Nov 20 22:16:15 2014 +0000 @@ -214,7 +214,6 @@ * * On Entry: * @param[in] time - struct cotaining time data; - * seconds, minutes and hours * * On Exit: * @return return value = 0 on success, non-0 on failure @@ -225,7 +224,8 @@ * //instantiate rtc object * Ds3231 rtc(D14, D15); * - * ds3231_time_t time = {0, 0, 0} // time = 0:0:0 24hr format + * //time = 12:00:00 AM 12hr mode + * ds3231_time_t time = {12, 0, 0, 0, 1} * uint16_t rtn_val; * * rtn_val = rtc.set_time(time); @@ -279,8 +279,8 @@ * //instantiate rtc object * Ds3231 rtc(D14, D15); * - * //see datasheet for alarm format - * ds3231_alrm_t alarm = {0, 0, 0, 0, 0}; + * //see ds3231.h for .members and datasheet for alarm format + * ds3231_alrm_t alarm; * uint16_t rtn_val; * * rtn_val = rtc.set_alarm(alarm, FALSE); @@ -320,8 +320,7 @@ * Gets the time on DS3231 * * On Entry: - * @param[in] time - pointer to struct for storing time - * data; seconds, minutes and hours + * @param[in] time - pointer to struct for storing time data * * On Exit: * @param[out] time - contains current integrer rtc time @@ -334,7 +333,8 @@ * //instantiate rtc object * Ds3231 rtc(D14, D15); * - * ds3231_time_t time = {0, 0, 0} // time = 0:0:0 24hr format + * //time = 12:00:00 AM 12hr mode + * ds3231_time_t time = {12, 0, 0, 0, 1} * uint16_t rtn_val; * * rtn_val = rtc.get_time(&time); @@ -349,8 +349,7 @@ * * On Entry: * @param[in] calendar - pointer to struct for storing - * calendar data; - * day, date, month, year + * calendar data * * On Exit: * @param[out] calendar - contains current integer rtc @@ -380,8 +379,6 @@ * On Entry: * @param[in] alarm - pointer to struct for storing alarm * data; - * seconds, minutes, hours, day, date - * seconds used on Alarm1 only * * @param[in] one_r_two - TRUE for Alarm1 and FALSE for * Alarm2 @@ -396,8 +393,8 @@ * //instantiate rtc object * Ds3231 rtc(D14, D15); * - * //see datasheet for alarm format - * ds3231_alrm_t alarm = {0, 0, 0, 0, 0}; + * //see ds3231.h for .members and datasheet for alarm format + * ds3231_alrm_t alarm; * uint16_t rtn_val; * * rtn_val = rtc.get_alarm(&alarm, FALSE); @@ -412,7 +409,7 @@ * * On Entry: * @param[in] data - pointer to struct for storing control - * nd status register data + * and status register data * * On Exit: * @param[out] data - contains control and status registers