39#define RTC_NAME_PREFIX "RTC"
42#define RTC_TYPE_NONE 0
47#define RTC_STATE_DISABLED 0
48#define RTC_STATE_ENABLED 1
50#define RTC_STATE_MAX 1
53#define RTC_FLAG_NONE 0x00000000
54#define RTC_FLAG_ALARM 0x00000001
55#define RTC_FLAG_WATCHDOG 0x00000002
struct _DEVICE DEVICE
Definition devices.h:373
#define STDCALL
Definition globaltypes.h:45
_Bool BOOL
Built in Boolean type (1 byte) (Redeclared here for flexibility).
Definition globaltypes.h:55
HANDLE MUTEX_HANDLE
Definition globaltypes.h:105
RTC_DEVICE *STDCALL rtc_device_check(RTC_DEVICE *rtc)
Check if the supplied RTC is in the RTC table.
uint32_t STDCALL rtc_device_type_to_string(uint32_t rtctype, char *string, uint32_t len)
BOOL STDCALL rtc_time_is_valid(SYSTEMTIME *time)
uint32_t STDCALL rtc_device_destroy(RTC_DEVICE *rtc)
Destroy an existing RTC entry.
uint32_t STDCALL(* rtc_device_get_properties_proc)(RTC_DEVICE *rtc, RTC_PROPERTIES *properties)
Definition rtc.h:82
RTC_DEVICE *STDCALL rtc_device_find_by_description(const char *description)
uint32_t STDCALL(* rtc_device_stop_proc)(RTC_DEVICE *rtc)
Definition rtc.h:79
int64_t STDCALL rtc_device_set_time(RTC_DEVICE *rtc, int64_t time)
uint32_t STDCALL rtc_device_stop(RTC_DEVICE *rtc)
uint32_t STDCALL(* rtc_device_start_proc)(RTC_DEVICE *rtc)
Definition rtc.h:78
uint32_t STDCALL(* rtc_enumerate_cb)(RTC_DEVICE *rtc, void *data)
Definition rtc.h:73
RTC_DEVICE *STDCALL rtc_device_create(void)
Create a new RTC entry.
int64_t STDCALL rtc_device_get_time(RTC_DEVICE *rtc)
struct _RTC_DEVICE RTC_DEVICE
Definition rtc.h:70
uint32_t STDCALL rtc_device_set_default(RTC_DEVICE *rtc)
Set the current default RTC device.
struct _RTC_PROPERTIES RTC_PROPERTIES
Definition rtc.h:60
int64_t STDCALL(* rtc_device_get_time_proc)(RTC_DEVICE *rtc)
Definition rtc.h:80
uint32_t STDCALL rtc_device_start(RTC_DEVICE *rtc)
RTC_DEVICE *STDCALL rtc_device_find_by_name(const char *name)
uint32_t STDCALL rtc_device_properties(RTC_DEVICE *rtc, RTC_PROPERTIES *properties)
Get the properties for the specified RTC device.
RTC_DEVICE *STDCALL rtc_device_get_default(void)
Get the current default RTC device.
uint32_t STDCALL rtc_device_register(RTC_DEVICE *rtc)
Register a new RTC in the RTC table.
BOOL STDCALL rtc_filetime_to_systemtime(int64_t filetime, SYSTEMTIME *systemtime)
uint32_t STDCALL rtc_device_enumerate(rtc_enumerate_cb callback, void *data)
uint32_t STDCALL rtc_get_count(void)
Get the current RTC count.
uint32_t STDCALL(* rtc_notification_cb)(DEVICE *device, void *data, uint32_t notification)
Definition rtc.h:75
uint32_t STDCALL rtc_device_state_to_string(uint32_t rtcstate, char *string, uint32_t len)
uint32_t STDCALL rtc_device_deregister(RTC_DEVICE *rtc)
Deregister a RTC from the RTC table.
RTC_DEVICE *STDCALL rtc_device_create_ex(uint32_t size)
Create a new RTC entry.
uint32_t STDCALL rtc_device_notification(RTC_DEVICE *rtc, rtc_notification_cb callback, void *data, uint32_t notification, uint32_t flags)
uint32_t STDCALL rtc_device_get_properties(RTC_DEVICE *rtc, RTC_PROPERTIES *properties)
Get the properties for the specified RTC device.
RTC_DEVICE *STDCALL rtc_device_find(uint32_t rtcid)
int64_t STDCALL(* rtc_device_set_time_proc)(RTC_DEVICE *rtc, int64_t time)
Definition rtc.h:81
BOOL STDCALL rtc_systemtime_to_filetime(SYSTEMTIME *systemtime, int64_t *filetime)
MUTEX_HANDLE lock
Device lock.
Definition rtc.h:100
rtc_device_get_time_proc devicegettime
A Device specific DeviceGetTime method implementing the standard RTC device interface.
Definition rtc.h:93
RTC_PROPERTIES properties
Device properties.
Definition rtc.h:101
DEVICE device
The Device entry for this RTC.
Definition rtc.h:87
RTC_DEVICE * prev
Previous entry in RTC table.
Definition rtc.h:103
rtc_device_start_proc devicestart
A Device specific DeviceStart method implementing the standard RTC device interface.
Definition rtc.h:91
uint32_t getcount
Definition rtc.h:97
rtc_device_get_properties_proc devicegetproperties
A Device specific DeviceGetProperties method implementing the standard RTC device interface.
Definition rtc.h:95
uint32_t setcount
Definition rtc.h:98
uint32_t rtcid
Unique Id of this RTC in the RTC table.
Definition rtc.h:89
rtc_device_set_time_proc devicesettime
A Device specific DeviceSetTime method implementing the standard RTC device interface.
Definition rtc.h:94
RTC_DEVICE * next
Next entry in RTC table.
Definition rtc.h:104
uint32_t rtcstate
RTC state (eg RTC_STATE_ENABLED).
Definition rtc.h:90
rtc_device_stop_proc devicestop
A Device specific DeviceStop method implementing the standard RTC device interface.
Definition rtc.h:92
int64_t mintime
Minimum time value represented by the device (Normally the power on reset value).
Definition rtc.h:64
uint32_t flags
Device flags (eg RTC_FLAG_ALARM).
Definition rtc.h:63
int64_t maxtime
Maximum time value represented by the device (Time when a rollover will occur).
Definition rtc.h:65
uint32_t alarmcount
Number of alarms supported by the device (0 if not supported).
Definition rtc.h:66
struct _SYSTEMTIME SYSTEMTIME