Datasheet
Flyport Wi-Fi and Ethernet Programmer's guide framework 2.3 (rev 1.0) www.openpicus.com
RTCC module
RTCC – Real Time Clock Calendar – is a hardware clock module embedded on Flyport. It provides
automatic clock counter and customizable interrupt driven alarm.
Using openPicus framework libraries it's possible to read and write values of RTCC (date and time)
and set an alarm. Alarm event can be both assigned to a callback function, or read in a dedicated
status function.
RTCC APIs
Initialize/Write RTCC module → void RTCCSet(struct tm* rtcc);
This function sets the date/time and enables RTCC module.
Parameters:
rtcc: a pointer to a struct tm variable, containing the date and the time to set
Read RTCC module → void RTCCGet(struct tm* rtcc);
This function reads the actual date/time from the RTCC and put it inside a struct pointer
Parameters:
rtcc: a pointer to a struct tm variable to fill with data
Configure Alarm of RTCC module → void RTCCAlarmConf(
struct tm* rtcc,
int repeats,
BYTE whenToRaise,
void (*fptr)());
This function reads the actual date/time from the RTCC and put it inside a struct pointer
Parameters:
rtcc: a pointer to a struct tm variable to fill with data
repeats: specifies how many times the alarm must be repeated:
REPEAT_NO alarm must not be repeated
1 – 256 the number of times alarm must be repeated
REPEAT_INFINITE alarm must be repeated forever
whenToRaise: how often alarm should be raised
EVERY_HALF_SEC alarm is raised every half second
EVERY_SEC alarm is raised every second
EVERY_TEN_SEC alarm is raised every 10 seconds
EVERY_MIN alarm is raised every minute
EVERY_TEN_MIN alarm is raised every 10 minutes
EVERY_HOUR alarm is raised every hour
EVERY_DAY alarm is raised every day
EVERY_WEEK alarm is raised every week
EVERY_MONTH alarm is raised every month
EVERY_YEAR alarm is raised every year
fptr: custom function to execute when alarm event is raised. Use NO_ALRM_EVENT to ignore.
28










