group::RTC

The Real Time Clock (RTC) module is an API to access an MCUs integrated real time clock.

More information about accessing peripheral IO is in the Device Interface section.

Details

defineRTC_VERSION


defineRTC_IOC_IDENT_CHAR


defineI_RTC_GETVERSION


defineI_RTC_GETINFO


defineI_RTC_SETATTR


defineI_RTC_SETACTION


defineI_RTC_SET

This request writes the value of the timer. For example:

rtc_time_t the_time;
ioctl(rtc_fd, I_RTC_SET, &the_time);

defineI_RTC_GET

This request reads the value of the timer. For example:

rtc_time_t current_time;
ioctl(rtc_fd, I_RTC_GET, &current_time );

defineI_RTC_TOTAL


enumrtc_flag_t

  • RTC_FLAG_NONE
  • RTC_FLAG_ENABLE Set the alarm
  • RTC_FLAG_DISABLE Set the alarm
  • RTC_FLAG_IS_SOURCE_EXTERNAL_32768 External 32.768KHz Crystal
  • RTC_FLAG_IS_SOURCE_INTERNAL_40000 Internal 40KHz Oscillator
  • RTC_FLAG_ENABLE_ALARM Enable the alarm
  • RTC_FLAG_DISABLE_ALARM Enable the alarm
  • RTC_FLAG_IS_ALARM_ONCE One time alarm
  • RTC_FLAG_IS_ALARM_MINUTE Alarm every minute
  • RTC_FLAG_IS_ALARM_HOURLY Alarm every hour
  • RTC_FLAG_IS_ALARM_DAILY Daily alarm
  • RTC_FLAG_IS_ALARM_WEEKLY Weekly alarm
  • RTC_FLAG_IS_ALARM_MONTHLY Monthly alarm
  • RTC_FLAG_IS_ALARM_YEARLY Yearly alarm
  • RTC_FLAG_ENABLE_COUNT_EVENT Enable a count event
  • RTC_FLAG_IS_COUNT_SECOND One time alarm
  • RTC_FLAG_IS_COUNT_MINUTE One time alarm
  • RTC_FLAG_IS_COUNT_HOUR One time alarm
  • RTC_FLAG_IS_COUNT_DAY_OF_WEEK One time alarm
  • RTC_FLAG_IS_COUNT_DAY_OF_MONTH One time alarm
  • RTC_FLAG_IS_COUNT_DAY_OF_YEAR One time alarm
  • RTC_FLAG_IS_COUNT_WEEK One time alarm
  • RTC_FLAG_IS_COUNT_MONTH One time alarm
  • RTC_FLAG_IS_COUNT_YEAR One time alarm
  • RTC_FLAG_DISABLE_COUNT_EVENT Enable a count event

enumrtc_day_of_week_t

  • RTC_DAY_SUNDAY Sunday
  • RTC_DAY_MONDAY Monday
  • RTC_DAY_TUESDAY Tuesday
  • RTC_DAY_WEDNESDAY Wednesday
  • RTC_DAY_THURSDAY Thursday
  • RTC_DAY_FRIDAY Friday
  • RTC_DAY_SATURDAY Saturday

This is a list of the valid days of the week.


enumrtc_mon_t

  • RTC_MON_JAN
  • RTC_MON_FEB February
  • RTC_MON_MAR March
  • RTC_MON_APR April
  • RTC_MON_MAY May
  • RTC_MON_JUN June
  • RTC_MON_JUL July
  • RTC_MON_AUG August
  • RTC_MON_SEP September
  • RTC_MON_OCT October
  • RTC_MON_NOV November
  • RTC_MON_DEC December

This is a list of the valid months of the year.



date: “2019-06-27” layout: post title: struct::rtc_time_t katex: true

categories: struct

This structure holds the time. It should be compatible with struct tm.

Methods

Details


public u32useconds


public u32time_t


public u32use_time_t



date: “2019-06-27” layout: post title: struct::rtc_info_t katex: true

categories: struct

Methods

Details

public u32o_flags


public u32o_events


publicrtc_time_talarm


public u32resd



date: “2019-06-27” layout: post title: struct::rtc_attr_t katex: true

categories: struct

This data structure defines the structure used with I_RTC_ATTR and I_RTC_SETATTR ioctl requests on the RTC. It is also used when opening the RTC.

Methods

Details

public u32o_flags

Bitmask for setting attributes


public u32freq

Calibration frequency for setting the pre-scalar


publicrtc_time_ttime


public u32resd


X

Thanks for Coming!

Subscribe to news and updates