-
Notifications
You must be signed in to change notification settings - Fork 8
Home
Manjunath CV edited this page May 22, 2020
·
9 revisions
Functions common with all RTCs.
Function | Parameters | Returns | Description |
---|---|---|---|
isRunning() | None | Return boolean true or false | This method returns status of clock. |
startClock() | None | None | Starts the Clock |
stopClock() | None | None | Stops the Clock |
Function | Parameters | Returns | Description |
---|---|---|---|
setDay(unsigned int) | From 1 to 31 | None | Sets day on RTC |
setMonth(unsigned int) | From 0 to 23 | None | Sets month on RTC |
setYear(unsigned int) | 2 or 4 digit year | None | Sets year on RTC |
setWeek(unsigned int) | for 1 to 7, 1 is Sunday | None | Sets week day on RTC |
setHours(unsigned int) | From 0 to 59 | None | Sets hour on RTC |
setMinutes(unsigned int) | From 0 to 59 | None | Sets minute on RTC |
setSeconds(unsigned int) | From 0 to 59 | None | Sets second on RTC |
setEpoch(time_t) | Unix timestamp | None | Sets date and time on RTC |
Function | Parameters | Returns | Description |
---|---|---|---|
setTime(unsigned int, unsigned int, unsigned int) | (hour, minute, second) | None | Sets time on RTC |
setDate(unsigned int, unsigned int, unsigned int) | (day, month, year) | None | Sets time on RTC |
setDateTime(char* date, char* time) | (__DATE__, __TIME__) | None | Sets date & time on RTC from build time |
Function | Parameters | Returns | Description |
---|---|---|---|
getDay() | None | unsigned int | Gets day from RTC |
getMonth() | None | unsigned int | Gets month from RTC |
getYear() | None | unsigned int | Gets year from RTC |
getWeek() | None | unsigned int | Gets week day from RTC |
getHours() | None | unsigned int | Gets hour from RTC |
getMinutes() | None | unsigned int | Gets minute from RTC |
getSeconds() | None | unsigned int | Gets second from RTC |
getEpoch() | None | time_t | Gets Unix timestamp from RTC |