A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://technical.swissmicros.com/dmcp/doc/DMCP-ifc-html/group__rtc.html below:

DMCP interface: RTC

RTC related functions. More...

#define  RTCREGS_SS_PER_SEC   256   Resolution of ticks reading.
 

RTC related functions.

◆ get_rtc_ticks() uint32_t get_rtc_ticks ( )

Get time ticks (linear time)

Returns current time ticks value in 24.8 format, therefore ticks resolution is 1/256 of second.

Returns
(sec) Time tick in 24.8 format
◆ rtc_check_unset()

Check whether RTC was updated from cold start state. Displays set time and set date dialogs if it wasn't.

This function is called during system restart and usually is not needed to be used by user program.

◆ rtc_read()

Read current data and time.

Parameters
[out] tm Time structure [out] dt Date structure
◆ rtc_read_century() uint8_t rtc_read_century ( )

Read current century.

Returns
century (as number i.e. year/100)

See rtc_write_century() for details.

◆ rtc_read_min()

Reads current minute.

Returns
[0-59] Current minute
◆ rtc_read_sec()

Reads current second.

Returns
[0-59] Current second
◆ rtc_set_alarm() void rtc_set_alarm ( tm_t * tm, dt_t * dt )

Plants RTC alarm at given time.

When RTC reaches given date and time CPU is woken-up and program gains control. Further alarms are disabled.

Parameters
tm Wake-up time dt Wake-up date
◆ rtc_update_time_sec() void rtc_update_time_sec ( int delta_sec )

Shift time by given amount of seconds.

Parameters
delta_sec Number of seconds
◆ rtc_wakeup_delay() void rtc_wakeup_delay ( )

Workaround for CPU bug.

This function should be called before first RTC read after wakeup from sleep to avoid wrong RTC reading.

◆ rtc_write()

Set date and time.

Parameters
tm Time to set dt Date to set
◆ rtc_write_century() void rtc_write_century ( uint8_t cent )

Write century.

Parameters
cent Century (as number i.e. year/100)

Note that here is the century taken as a number not a sociocultural notion.

Hardware accommodates only two digit year, thus century has to be handled in software. Default value is set by system to 20 and program has to set century beyond this (e.g. after reset from user's profile).


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4