![]() |
Ultibo API
C/C++ API for Ultibo Core
|
#include "ultibo/globaltypes.h"#include "ultibo/globalconst.h"#include "ultibo/devices.h"#include "ultibo/sysutils.h"Go to the source code of this file.
Data Structures | |
| struct | _RTC_PROPERTIES |
| struct | _RTC_DEVICE |
Macros | |
| #define | RTC_NAME_PREFIX "RTC" |
| Name prefix for RTC Devices. | |
| #define | RTC_TYPE_NONE 0 |
| #define | RTC_TYPE_MAX 0 |
| #define | RTC_STATE_DISABLED 0 |
| #define | RTC_STATE_ENABLED 1 |
| #define | RTC_STATE_MAX 1 |
| #define | RTC_FLAG_NONE 0x00000000 |
| #define | RTC_FLAG_ALARM 0x00000001 |
| Device supports one or more alarms. | |
| #define | RTC_FLAG_WATCHDOG 0x00000002 |
| Device has a watchdog timer function. | |
Typedefs | |
| typedef struct _RTC_PROPERTIES | RTC_PROPERTIES |
| typedef struct _RTC_DEVICE | RTC_DEVICE |
| typedef uint32_t STDCALL(* | rtc_enumerate_cb) (RTC_DEVICE *rtc, void *data) |
| typedef uint32_t STDCALL(* | rtc_notification_cb) (DEVICE *device, void *data, uint32_t notification) |
| typedef uint32_t STDCALL(* | rtc_device_start_proc) (RTC_DEVICE *rtc) |
| typedef uint32_t STDCALL(* | rtc_device_stop_proc) (RTC_DEVICE *rtc) |
| typedef int64_t STDCALL(* | rtc_device_get_time_proc) (RTC_DEVICE *rtc) |
| typedef int64_t STDCALL(* | rtc_device_set_time_proc) (RTC_DEVICE *rtc, int64_t time) |
| typedef uint32_t STDCALL(* | rtc_device_get_properties_proc) (RTC_DEVICE *rtc, RTC_PROPERTIES *properties) |
Functions | |
| uint32_t STDCALL | rtc_device_start (RTC_DEVICE *rtc) |
| uint32_t STDCALL | rtc_device_stop (RTC_DEVICE *rtc) |
| int64_t STDCALL | rtc_device_get_time (RTC_DEVICE *rtc) |
| int64_t STDCALL | rtc_device_set_time (RTC_DEVICE *rtc, int64_t time) |
| uint32_t STDCALL | rtc_device_properties (RTC_DEVICE *rtc, RTC_PROPERTIES *properties) |
| Get the properties for the specified RTC device. | |
| 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_create (void) |
| Create a new RTC entry. | |
| RTC_DEVICE *STDCALL | rtc_device_create_ex (uint32_t size) |
| Create a new RTC entry. | |
| uint32_t STDCALL | rtc_device_destroy (RTC_DEVICE *rtc) |
| Destroy an existing RTC entry. | |
| uint32_t STDCALL | rtc_device_register (RTC_DEVICE *rtc) |
| Register a new RTC in the RTC table. | |
| uint32_t STDCALL | rtc_device_deregister (RTC_DEVICE *rtc) |
| Deregister a RTC from the RTC table. | |
| RTC_DEVICE *STDCALL | rtc_device_find (uint32_t rtcid) |
| RTC_DEVICE *STDCALL | rtc_device_find_by_name (const char *name) |
| RTC_DEVICE *STDCALL | rtc_device_find_by_description (const char *description) |
| uint32_t STDCALL | rtc_device_enumerate (rtc_enumerate_cb callback, void *data) |
| 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_get_count (void) |
| Get the current RTC count. | |
| RTC_DEVICE *STDCALL | rtc_device_get_default (void) |
| Get the current default RTC device. | |
| uint32_t STDCALL | rtc_device_set_default (RTC_DEVICE *rtc) |
| Set the current default RTC device. | |
| 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) |
| uint32_t STDCALL | rtc_device_state_to_string (uint32_t rtcstate, char *string, uint32_t len) |
| BOOL STDCALL | rtc_time_is_valid (SYSTEMTIME *time) |
| BOOL STDCALL | rtc_systemtime_to_filetime (SYSTEMTIME *systemtime, int64_t *filetime) |
| BOOL STDCALL | rtc_filetime_to_systemtime (int64_t filetime, SYSTEMTIME *systemtime) |
| #define RTC_NAME_PREFIX "RTC" |
Name prefix for RTC Devices.
RTC specific constants
| #define RTC_TYPE_NONE 0 |
RTC Device Types
| #define RTC_TYPE_MAX 0 |
| #define RTC_STATE_DISABLED 0 |
RTC Device States
| #define RTC_STATE_ENABLED 1 |
| #define RTC_STATE_MAX 1 |
| #define RTC_FLAG_NONE 0x00000000 |
RTC Device Flags
| #define RTC_FLAG_ALARM 0x00000001 |
Device supports one or more alarms.
| #define RTC_FLAG_WATCHDOG 0x00000002 |
Device has a watchdog timer function.
| typedef struct _RTC_PROPERTIES RTC_PROPERTIES |
RTC specific types RTC Properties
| typedef struct _RTC_DEVICE RTC_DEVICE |
RTC Device
| typedef uint32_t STDCALL(* rtc_enumerate_cb) (RTC_DEVICE *rtc, void *data) |
RTC Enumeration Callback
RTC Notification Callback
| typedef uint32_t STDCALL(* rtc_device_start_proc) (RTC_DEVICE *rtc) |
RTC Device Methods
| typedef uint32_t STDCALL(* rtc_device_stop_proc) (RTC_DEVICE *rtc) |
| typedef int64_t STDCALL(* rtc_device_get_time_proc) (RTC_DEVICE *rtc) |
| typedef int64_t STDCALL(* rtc_device_set_time_proc) (RTC_DEVICE *rtc, int64_t time) |
| typedef uint32_t STDCALL(* rtc_device_get_properties_proc) (RTC_DEVICE *rtc, RTC_PROPERTIES *properties) |
| uint32_t STDCALL rtc_device_start | ( | RTC_DEVICE * | rtc | ) |
RTC Functions
| uint32_t STDCALL rtc_device_stop | ( | RTC_DEVICE * | rtc | ) |
| int64_t STDCALL rtc_device_get_time | ( | RTC_DEVICE * | rtc | ) |
| int64_t STDCALL rtc_device_set_time | ( | RTC_DEVICE * | rtc, |
| int64_t | time ) |
| uint32_t STDCALL rtc_device_properties | ( | RTC_DEVICE * | rtc, |
| RTC_PROPERTIES * | properties ) |
Get the properties for the specified RTC device.
| RTC | The RTC device to get properties from |
| Properties | Pointer to a PRTCProperties structure to fill in |
| uint32_t STDCALL rtc_device_get_properties | ( | RTC_DEVICE * | rtc, |
| RTC_PROPERTIES * | properties ) |
Get the properties for the specified RTC device.
| RTC | The RTC device to get properties from |
| Properties | Pointer to a PRTCProperties structure to fill in |
| RTC_DEVICE *STDCALL rtc_device_create | ( | void | ) |
Create a new RTC entry.
| RTC_DEVICE *STDCALL rtc_device_create_ex | ( | uint32_t | size | ) |
Create a new RTC entry.
| Size | Size in bytes to allocate for new RTC (Including the RTC entry) |
| uint32_t STDCALL rtc_device_destroy | ( | RTC_DEVICE * | rtc | ) |
Destroy an existing RTC entry.
| uint32_t STDCALL rtc_device_register | ( | RTC_DEVICE * | rtc | ) |
Register a new RTC in the RTC table.
| uint32_t STDCALL rtc_device_deregister | ( | RTC_DEVICE * | rtc | ) |
Deregister a RTC from the RTC table.
| RTC_DEVICE *STDCALL rtc_device_find | ( | uint32_t | rtcid | ) |
| RTC_DEVICE *STDCALL rtc_device_find_by_name | ( | const char * | name | ) |
| RTC_DEVICE *STDCALL rtc_device_find_by_description | ( | const char * | description | ) |
| uint32_t STDCALL rtc_device_enumerate | ( | rtc_enumerate_cb | callback, |
| void * | data ) |
| 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_get_count | ( | void | ) |
Get the current RTC count.
RTC Helper Functions
| RTC_DEVICE *STDCALL rtc_device_get_default | ( | void | ) |
Get the current default RTC device.
| uint32_t STDCALL rtc_device_set_default | ( | RTC_DEVICE * | rtc | ) |
Set the current default RTC device.
| 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 ) |
| uint32_t STDCALL rtc_device_state_to_string | ( | uint32_t | rtcstate, |
| char * | string, | ||
| uint32_t | len ) |
| BOOL STDCALL rtc_time_is_valid | ( | SYSTEMTIME * | time | ) |
| BOOL STDCALL rtc_systemtime_to_filetime | ( | SYSTEMTIME * | systemtime, |
| int64_t * | filetime ) |
| BOOL STDCALL rtc_filetime_to_systemtime | ( | int64_t | filetime, |
| SYSTEMTIME * | systemtime ) |