Ultibo API
C/C++ API for Ultibo Core
Loading...
Searching...
No Matches
devices.h File Reference

Go to the source code of this file.

Data Structures

struct  _DEVICE
struct  _DEVICE_FIRMWARE
struct  _FIRMWARE_HANDLE
struct  _NOTIFIER
struct  _NOTIFIER_TASK
struct  _NOTIFIER_RETRY
struct  _DRIVER
struct  _HOST
struct  _CLOCK_PROPERTIES
struct  _CLOCK_DEVICE
struct  _TIMER_PROPERTIES
struct  _TIMER_WAITER
struct  _TIMER_DEVICE
struct  _RANDOM_DEVICE
struct  _MAILBOX_DEVICE
struct  _WATCHDOG_DEVICE

Macros

#define DEVICE_NAME_PREFIX   "Device"
 Name prefix for Devices.
#define DEVICE_SIGNATURE   0xAD03FE3C
#define DEVICE_NAME_LENGTH   SIZE_64
 Length of device name.
#define DEVICE_DESC_LENGTH   SIZE_128
 Length of device description.
#define DEVICE_BUS_NONE   0
#define DEVICE_BUS_PCI   1
#define DEVICE_BUS_USB   2
#define DEVICE_BUS_ISA   3
#define DEVICE_BUS_PS2   4
#define DEVICE_BUS_FIREWIRE   5
#define DEVICE_BUS_SD   6
 SD/SDHC/SDXC/SDIO etc.
#define DEVICE_BUS_MMC   7
 MMC/eMMC etc.
#define DEVICE_BUS_ATA   8
#define DEVICE_BUS_IDE   9
#define DEVICE_BUS_SCSI   10
#define DEVICE_BUS_ATAPI   11
#define DEVICE_BUS_SATA   12
#define DEVICE_BUS_SERIAL   13
#define DEVICE_BUS_SPI   14
 Serial Peripheral Interface device.
#define DEVICE_BUS_MMIO   15
 Memory Mapped IO device (No Bus).
#define DEVICE_BUS_PCIE   16
#define DEVICE_BUS_I2C   17
 I2C connected device.
#define DEVICE_BUS_VIRTIO   18
 Virtual devices.
#define DEVICE_BUS_BLUETOOTH   19
 Bluetooth connected devices.
#define DEVICE_BUS_MAX   19
#define DEVICE_STATE_UNREGISTERED   0
#define DEVICE_STATE_REGISTERED   1
#define DEVICE_STATE_MAX   1
#define DEVICE_ID_ANY   0xFFFFFFFF
 Any Device (Pass to DeviceFind to match all devices).
#define DEVICE_CLASS_NONE   0
 No Device.
#define DEVICE_CLASS_USBHOST   1
 A USB Host Controller (eg XHCI/EHCI/UHCI/OHCI or DWCOTG etc) (Implementing a standard USB host interface).
#define DEVICE_CLASS_PCIHOST   2
 A PCI Host Controller (Implementing a standard PCI host interface).
#define DEVICE_CLASS_USB   3
 A USB Device (eg Hub/Keyboard/Mouse/Mass Storage/Vendor Specific etc) (Implementing a standard USB device interface).
#define DEVICE_CLASS_PCI   4
 A PCI Device (eg Graphics/Controller etc) (Implementing a standard PCI device interface).
#define DEVICE_CLASS_NETWORK   5
 A Network Device (Implementing a standard Network device interface). May also be a USB or PCI device.
#define DEVICE_CLASS_STORAGE   6
 A Storage Device (Implementing a standard Storage device interface). May also be a USB, PCI, MMC, SCSI or ATA device.
#define DEVICE_CLASS_BLOCK   DEVICE_CLASS_STORAGE
#define DEVICE_CLASS_FILESYSTEM   7
 A FileSystem Device (eg FAT/NTFS/CDFS/EXTFS etc)(Implementing a standard FileSystem device interface).
#define DEVICE_CLASS_PROTOCOL   8
 A Protocol Device (eg TCP/UDP/IP/ICMP etc) (Implementing a standard Protocol device interface).
#define DEVICE_CLASS_TRANSPORT   DEVICE_CLASS_PROTOCOL
#define DEVICE_CLASS_KEYBOARD   9
 A Keyboard Device (Implementing a standard Keyboard device interface).
#define DEVICE_CLASS_MOUSE   10
 A Mouse Device (Implementing a standard Mouse device interface).
#define DEVICE_CLASS_BLUETOOTH   11
 A Bluetooth Device (eg Keyboard/Mouse/Audio/Serial) (Implementing a standard Bluetooth device interface).
#define DEVICE_CLASS_SERIAL   12
 A Serial Device (Implementing a standard Serial device interface).
#define DEVICE_CLASS_AUDIO   13
 An Audio Device (Implementing a standard Audio device interface).
#define DEVICE_CLASS_VIDEO   14
 A Video Device (Implementing a standard Video device interface).
#define DEVICE_CLASS_SCSI   15
 A SCSI Device (Implementing a standard SCSI device interface). May also be a PCI device.
#define DEVICE_CLASS_ATA   16
 An ATA/ATAPI Device (Implementing a standard ATA/ATAPI device interface). May also be a PCI device.
#define DEVICE_CLASS_IDE   DEVICE_CLASS_ATA
#define DEVICE_CLASS_ATAPI   DEVICE_CLASS_ATA
#define DEVICE_CLASS_IMAGE   17
 An Image Device (eg Camera) (Implementing a standard Image device interface).
#define DEVICE_CLASS_PRINTER   18
 A Printer Device (Implementing a standard Printer device interface).
#define DEVICE_CLASS_COMMUNICATIONS   19
 A Communications Device (Implementing a standard Communications device interface).
#define DEVICE_CLASS_SMART_CARD   20
 A Smart Card Device (Implementing a standard Smart Card device interface).
#define DEVICE_CLASS_MONITOR   21
 A Monitor Device (Implementing a standard Monitor device interface).
#define DEVICE_CLASS_DISPLAY   22
 A Display Device (eg Billboard) (Implementing a standard Display device interface).
#define DEVICE_CLASS_AUDIOVIDEO   23
 An Audio/Video Device (Implementing a standard Audio/Video device interface).
#define DEVICE_CLASS_IRDA   24
 An Infrared Device (Implementing a standard Infrared device interface).
#define DEVICE_CLASS_SPI   25
 An SPI Device (Implementing a standard SPI device interface).
#define DEVICE_CLASS_I2C   26
 An I2C Device (Implementing a standard I2C device interface).
#define DEVICE_CLASS_UART   27
 A UART Device (Implementing a standard UART device interface).
#define DEVICE_CLASS_MMC   28
 An MMC Device (Implementing a standard MMC device interface).
#define DEVICE_CLASS_SD   29
 An SD Device (Implementing a standard SD device interface).
#define DEVICE_CLASS_SDHCI   30
 An SD/MMC Host Controller (Implementing a standard SDHCI device interface).
#define DEVICE_CLASS_SDHOST   DEVICE_CLASS_SDHCI
#define DEVICE_CLASS_MMCHOST   DEVICE_CLASS_SDHCI
#define DEVICE_CLASS_MMCIHOST   DEVICE_CLASS_SDHCI
#define DEVICE_CLASS_DFU   31
 A Device Firmware Update Device (Implementing a standard DFU device interface).
#define DEVICE_CLASS_GPIO   32
 A GPIO Device (Implementing a standard GPIO device interface).
#define DEVICE_CLASS_MAILBOX   33
 A Mailbox Device.
#define DEVICE_CLASS_OPENGL   34
 An OpenGL Device.
#define DEVICE_CLASS_DVB   35
 A Digital Video Broadcast (DVB) Device.
#define DEVICE_CLASS_DAB   36
 A Digital Audio Broadcast (DAB) Device.
#define DEVICE_CLASS_DMA   37
 A DMA Controller Device (Implementing a standard DMA controller interface).
#define DEVICE_CLASS_SCSIHOST   38
 A SCSI Host Device (Implementing a standard SCSI host interface).
#define DEVICE_CLASS_ATAHOST   39
 An ATA Host Device (Implementing a standard ATA host interface).
#define DEVICE_CLASS_TIMER   40
 A Timer or Counter Device.
#define DEVICE_CLASS_RANDOM   41
 A Random Number Generator Device.
#define DEVICE_CLASS_FRAMEBUFFER   42
 A Frame Buffer Device.
#define DEVICE_CLASS_WATCHDOG   43
 A Watchdog Timer Device.
#define DEVICE_CLASS_CLOCK   44
 A Clock (Date/Time) Device.
#define DEVICE_CLASS_CONSOLE   45
 A Console Device.
#define DEVICE_CLASS_RTC   46
 A Real Time Clock (Battery Backed) Device.
#define DEVICE_CLASS_USBHUB   47
 A USB Hub (Implementing a standard USB hub interface).
#define DEVICE_CLASS_LOGGING   48
 A Logging Device (Implementing a standard Logging device interface).
#define DEVICE_CLASS_PCM   49
 A PCM Sound Device (Implementing a standard PCM device interface).
#define DEVICE_CLASS_I2S   DEVICE_CLASS_PCM
#define DEVICE_CLASS_PWM   50
 A Pulse Width Modulation (PWM) Device.
#define DEVICE_CLASS_1WIRE   51
 A 1-Wire Device (Implementing a standard W1 device interface).
#define DEVICE_CLASS_CLOCK_MANAGER   52
 A Clock Manager Device.
#define DEVICE_CLASS_CODEC   53
 A CODEC Device (eg Audio or Video).
#define DEVICE_CLASS_TOUCH   54
 A Touch Device.
#define DEVICE_CLASS_MEMORY   55
 A Memory Device (eg OTP, NVRAM or Flash).
#define DEVICE_CLASS_GENERIC   56
 A Generic Device.
#define DEVICE_CLASS_VIRTIO   57
 A VIRTIO Device (eg Block/Network/Memory/Console/Input etc) (Implementing a standard VIRTIO device interface).
#define DEVICE_CLASS_BLUETOOTHHOST   58
 A Bluetooth Host Controller (Implementing a standard Bluetooth host interface).
#define DEVICE_CLASS_JOYSTICK   59
 A Joystick or Gamepad Device.
#define DEVICE_CLASS_HID   60
 A Human Interface Device (HID).
#define DEVICE_CLASS_MAX   60
#define DEVICE_CLASS_ANY   0xFFFFFFFF
 Any Device (Pass to DeviceFind or DeviceEnumerate to match all devices).
#define DEVICE_NOTIFICATION_NONE   0x00000000
 Pass to DeviceNotification to cancel an existing Notification.
#define DEVICE_NOTIFICATION_REGISTER   0x00000001
#define DEVICE_NOTIFICATION_DEREGISTER   0x00000002
#define DEVICE_NOTIFICATION_OPEN   0x00000004
#define DEVICE_NOTIFICATION_CLOSE   0x00000008
#define DEVICE_NOTIFICATION_UP   0x00000010
#define DEVICE_NOTIFICATION_DOWN   0x00000020
#define DEVICE_NOTIFICATION_INSERT   0x00000040
#define DEVICE_NOTIFICATION_EJECT   0x00000080
#define DEVICE_NOTIFICATION_ATTACH   0x00000100
#define DEVICE_NOTIFICATION_DETACH   0x00000200
#define DEVICE_NOTIFICATION_ENABLE   0x00000400
#define DEVICE_NOTIFICATION_DISABLE   0x00000800
#define DEVICE_NOTIFICATION_BIND   0x00001000
#define DEVICE_NOTIFICATION_UNBIND   0x00002000
#define DEVICE_NOTIFICATION_ATTACHING   0x00004000
#define DEVICE_NOTIFICATION_DETACHING   0x00008000
#define DEVICE_NOTIFICATION_INSERTING   0x00010000
#define DEVICE_NOTIFICATION_EJECTING   0x00020000
#define DEVICE_NOTIFICATION_OPENING   0x00040000
#define DEVICE_NOTIFICATION_CLOSING   0x00080000
#define DEVICE_NOTIFICATION_RESIZE   0x00100000
#define DEVICE_NOTIFICATION_RESIZING   0x00200000
#define FIRMWARE_NAME_LENGTH   SIZE_256
 Length of firmware name.
#define FIRMWARE_ACTION_NONE   0
#define FIRMWARE_ACTION_SIZE   1
 Return the size in bytes of the firmware item.
#define FIRMWARE_ACTION_OPEN   2
 Open the firmware item and return a handle.
#define FIRMWARE_ACTION_READ   3
 Read from the firmware item specified by a given handle.
#define FIRMWARE_ACTION_SEEK   4
 Seek to a location in the firmware item specified by a given handle.
#define FIRMWARE_ACTION_CLOSE   5
 Close a handle to the firmware item.
#define FIRMWARE_ACTION_ACQUIRE   6
 Acquire a memory block containing the firmware item.
#define FIRMWARE_ACTION_RELEASE   7
 Release a memory block containing the firmware item.
#define FIRMWARE_WAIT_DELAY   100
 Delay between retries for firmware while waiting for timeout (Milliseconds).
#define FIRMWARE_MAX_BUFFER   SIZE_4M
 Maximum size buffer able to be allocated for firmware by acquire.
#define NOTIFIER_SIGNATURE   0x6FA1BEC9
#define NOTIFIER_STATE_UNREGISTERED   0
#define NOTIFIER_STATE_REGISTERED   1
#define NOTIFIER_FLAG_NONE   0x00000000
#define NOTIFIER_FLAG_WORKER   0x00000001
 If set, notification callback event will be scheduled on a worker thread.
#define NOTIFIER_FLAG_UNLOCK   0x00000002
 If set, the notifier table lock will be released before calling the notification callback event.
#define DRIVER_NAME_PREFIX   "Driver"
 Name prefix for Drivers.
#define DRIVER_SIGNATURE   0x1EB4980A
#define DRIVER_NAME_LENGTH   SIZE_64
 Length of driver name.
#define DRIVER_STATE_UNREGISTERED   0
#define DRIVER_STATE_REGISTERED   1
#define DRIVER_STATE_MAX   1
#define DRIVER_ID_ANY   0xFFFFFFFF
 Any Driver (Pass to DriverFind to match all drivers).
#define DRIVER_CLASS_NONE   0
 No Driver.
#define DRIVER_CLASS_USB   1
 A USB Driver (Implementing a standard USB driver interface).
#define DRIVER_CLASS_PCI   2
 A PCI Driver (Implementing a standard PCI driver interface).
#define DRIVER_CLASS_SDIO   3
 An SDIO Driver (Implementing a standard SDIO driver interface).
#define DRIVER_CLASS_BLUETOOTH   4
 A Bluetooth Driver (Implementing a standard Bluetooth driver interface).
#define DRIVER_CLASS_VIRTIO   5
 A VIRTIO Driver (Implementing a standard VIRTIO driver interface).
#define DRIVER_CLASS_HID   6
 A Human Interface Device (HID) Driver (Implementing a standard HID driver interface).
#define DRIVER_CLASS_MAX   6
#define DRIVER_CLASS_ANY   0xFFFFFFFF
 Any Driver (Pass to DriverFind or DriverEnumerate to match all drivers).
#define HOST_NAME_PREFIX   "Host"
 Name prefix for Hosts.
#define HOST_SIGNATURE   0xF45D30FE
#define HOST_NAME_LENGTH   SIZE_64
 Length of host name.
#define HOST_STATE_UNREGISTERED   0
#define HOST_STATE_REGISTERED   1
#define HOST_STATE_MAX   1
#define HOST_ID_ANY   0xFFFFFFFF
 Any Host (Pass to HostFind to match all hosts).
#define HOST_CLASS_NONE   0
 No Host.
#define HOST_CLASS_USB   1
 A USB Host (eg XHCI/EHCI/UHCI/OHCI or DWCOTG etc) (Implementing a standard USB host interface).
#define HOST_CLASS_PCI   2
 A PCI Host (eg AHCI etc) (Implementing a standard PCI host interface).
#define HOST_CLASS_SD   3
 An SD Host (eg MMC/SDIO etc) (Implementing a standard SD host interface).
#define HOST_CLASS_BLUETOOTH   4
 A Bluetooth Host (Implementing a standard Bluetooth host interface).
#define HOST_CLASS_MAX   4
#define HOST_CLASS_ANY   0xFFFFFFFF
 Any Host (Pass to HostFind or HostEnumerate to match all hosts).
#define CLOCK_NAME_PREFIX   "Clock"
 Name prefix for Clock Devices.
#define CLOCK_TYPE_NONE   0
#define CLOCK_TYPE_HARDWARE   1
#define CLOCK_TYPE_MAX   1
#define CLOCK_STATE_DISABLED   0
#define CLOCK_STATE_ENABLED   1
#define CLOCK_STATE_MAX   1
#define CLOCK_FLAG_NONE   0x00000000
#define CLOCK_FLAG_WRITABLE   0x00000001
 Device supports writing the clock value.
#define CLOCK_FLAG_VARIABLE   0x00000002
 Device supports setting the clock rate.
#define TIMER_NAME_PREFIX   "Timer"
 Name prefix for Timer Devices.
#define TIMER_TYPE_NONE   0
#define TIMER_TYPE_HARDWARE   1
#define TIMER_TYPE_MAX   1
#define TIMER_STATE_DISABLED   0
#define TIMER_STATE_ENABLED   1
#define TIMER_STATE_MAX   1
#define TIMER_FLAG_NONE   0x00000000
#define TIMER_FLAG_WRAPPING   0x00000001
 Device provides a wrapping or self reloading counter.
#define TIMER_FLAG_COUNTER   0x00000002
 Device will appear as a continuously incrementing counter when read.
#define TIMER_FLAG_DOWN   0x00000004
 Device counts down from the starting value to zero (And optionally triggers an event).
#define TIMER_EVENT_FLAG_NONE   0x00000000
#define TIMER_EVENT_FLAG_REPEAT   0x00000001
 Event will be repeated until cancelled.
#define TIMER_EVENT_FLAG_INTERRUPT   0x00000002
 Event will be dispatched by interrupt handler (If applicable).
#define RANDOM_NAME_PREFIX   "Random"
 Name prefix for Random Devices.
#define RANDOM_TYPE_NONE   0
#define RANDOM_TYPE_HARDWARE   1
#define RANDOM_TYPE_SOFTWARE   2
#define RANDOM_TYPE_MAX   2
#define RANDOM_STATE_DISABLED   0
#define RANDOM_STATE_ENABLED   1
#define RANDOM_STATE_MAX   1
#define RANDOM_FLAG_NONE   0x00000000
#define MAILBOX_NAME_PREFIX   "Mailbox"
 Name prefix for Mailbox Devices.
#define MAILBOX_TYPE_NONE   0
#define MAILBOX_TYPE_GPU   1
#define MAILBOX_TYPE_LOCAL   2
#define MAILBOX_TYPE_MAX   2
#define MAILBOX_STATE_DISABLED   0
#define MAILBOX_STATE_ENABLED   1
#define MAILBOX_STATE_MAX   1
#define MAILBOX_FLAG_NONE   0x00000000
#define WATCHDOG_NAME_PREFIX   "Watchdog"
 Name prefix for Watchdog Devices.
#define WATCHDOG_TYPE_NONE   0
#define WATCHDOG_TYPE_HARDWARE   1
#define WATCHDOG_TYPE_MAX   1
#define WATCHDOG_STATE_DISABLED   0
#define WATCHDOG_STATE_ENABLED   1
#define WATCHDOG_STATE_MAX   1
#define WATCHDOG_FLAG_NONE   0x00000000

Typedefs

typedef struct _DEVICE DEVICE
typedef uint32_t STDCALL(* device_enumerate_cb) (DEVICE *device, void *data)
typedef uint32_t STDCALL(* device_notification_cb) (DEVICE *device, void *data, uint32_t notification)
typedef struct _DEVICE_FIRMWARE DEVICE_FIRMWARE
typedef uint32_t STDCALL(* device_firmware_handler) (DEVICE_FIRMWARE *firmware, uint32_t action, HANDLE *handle, void *buffer, uint32_t *value)
typedef struct _FIRMWARE_HANDLE FIRMWARE_HANDLE
typedef struct _NOTIFIER NOTIFIER
typedef struct _NOTIFIER_TASK NOTIFIER_TASK
typedef struct _NOTIFIER_RETRY NOTIFIER_RETRY
typedef struct _DRIVER DRIVER
typedef uint32_t STDCALL(* driver_enumerate_cb) (DRIVER *driver, void *data)
typedef struct _HOST HOST
typedef uint32_t STDCALL(* host_enumerate_cb) (HOST *host, void *data)
typedef struct _CLOCK_PROPERTIES CLOCK_PROPERTIES
typedef struct _CLOCK_DEVICE CLOCK_DEVICE
typedef uint32_t STDCALL(* clock_enumerate_cb) (CLOCK_DEVICE *clock, void *data)
typedef uint32_t STDCALL(* clock_notification_cb) (DEVICE *device, void *data, uint32_t notification)
typedef uint32_t STDCALL(* clock_device_start_proc) (CLOCK_DEVICE *clock)
typedef uint32_t STDCALL(* clock_device_stop_proc) (CLOCK_DEVICE *clock)
typedef uint32_t STDCALL(* clock_device_read_proc) (CLOCK_DEVICE *clock)
typedef int64_t STDCALL(* clock_device_read64_proc) (CLOCK_DEVICE *clock)
typedef uint32_t STDCALL(* clock_device_write64_proc) (CLOCK_DEVICE *clock, int64_t value)
typedef uint32_t STDCALL(* clock_device_get_rate_proc) (CLOCK_DEVICE *clock)
typedef uint32_t STDCALL(* clock_device_set_rate_proc) (CLOCK_DEVICE *clock, uint32_t rate)
typedef uint32_t STDCALL(* clock_device_get_properties_proc) (CLOCK_DEVICE *clock, CLOCK_PROPERTIES *properties)
typedef counter_event_cb timer_cb
 Counter callback from Platform.
typedef struct _TIMER_PROPERTIES TIMER_PROPERTIES
typedef struct _TIMER_DEVICE TIMER_DEVICE
 Forward declared for TimerWaiter.
typedef struct _TIMER_WAITER TIMER_WAITER
typedef uint32_t STDCALL(* timer_enumerate_cb) (TIMER_DEVICE *timer, void *data)
typedef uint32_t STDCALL(* timer_notification_cb) (DEVICE *device, void *data, uint32_t notification)
typedef uint32_t STDCALL(* timer_device_start_proc) (TIMER_DEVICE *timer)
typedef uint32_t STDCALL(* timer_device_stop_proc) (TIMER_DEVICE *timer)
typedef uint32_t STDCALL(* timer_device_read_proc) (TIMER_DEVICE *timer)
typedef int64_t STDCALL(* timer_device_read64_proc) (TIMER_DEVICE *timer)
typedef uint32_t STDCALL(* timer_device_wait_proc) (TIMER_DEVICE *timer)
typedef uint32_t STDCALL(* timer_device_event_proc) (TIMER_DEVICE *timer, uint32_t flags, timer_cb callback, void *data)
typedef uint32_t STDCALL(* timer_device_cancel_proc) (TIMER_DEVICE *timer)
typedef uint32_t STDCALL(* timer_device_get_rate_proc) (TIMER_DEVICE *timer)
typedef uint32_t STDCALL(* timer_device_set_rate_proc) (TIMER_DEVICE *timer, uint32_t rate)
typedef uint32_t STDCALL(* timer_device_get_interval_proc) (TIMER_DEVICE *timer)
typedef uint32_t STDCALL(* timer_device_set_interval_proc) (TIMER_DEVICE *timer, uint32_t interval)
typedef uint32_t STDCALL(* timer_device_get_properties_proc) (TIMER_DEVICE *timer, TIMER_PROPERTIES *properties)
typedef struct _RANDOM_DEVICE RANDOM_DEVICE
typedef uint32_t STDCALL(* random_enumerate_cb) (RANDOM_DEVICE *random, void *data)
typedef uint32_t STDCALL(* random_notification_cb) (DEVICE *device, void *data, uint32_t notification)
typedef uint32_t STDCALL(* random_device_start_proc) (RANDOM_DEVICE *random)
typedef uint32_t STDCALL(* random_device_stop_proc) (RANDOM_DEVICE *random)
typedef uint32_t STDCALL(* random_device_seed_proc) (RANDOM_DEVICE *random, uint32_t seed)
typedef uint8_t STDCALL(* random_device_read_byte_proc) (RANDOM_DEVICE *random)
typedef uint16_t STDCALL(* random_device_read_word_proc) (RANDOM_DEVICE *random)
typedef uint32_t STDCALL(* random_device_read_longword_proc) (RANDOM_DEVICE *random)
typedef int64_t STDCALL(* random_device_read_long_long_proc) (RANDOM_DEVICE *random)
typedef double_t STDCALL(* random_device_read_double_proc) (RANDOM_DEVICE *random)
typedef struct _MAILBOX_DEVICE MAILBOX_DEVICE
typedef uint32_t STDCALL(* mailbox_enumerate_cb) (MAILBOX_DEVICE *mailbox, void *data)
typedef uint32_t STDCALL(* mailbox_notification_cb) (DEVICE *device, void *data, uint32_t notification)
typedef uint32_t STDCALL(* mailbox_device_start_proc) (MAILBOX_DEVICE *mailbox)
typedef uint32_t STDCALL(* mailbox_device_stop_proc) (MAILBOX_DEVICE *mailbox)
typedef uint32_t STDCALL(* mailbox_device_receive_proc) (MAILBOX_DEVICE *mailbox, uint32_t channel)
typedef uint32_t STDCALL(* mailbox_device_send_proc) (MAILBOX_DEVICE *mailbox, uint32_t channel, uint32_t data)
typedef uint32_t STDCALL(* mailbox_device_call_proc) (MAILBOX_DEVICE *mailbox, uint32_t channel, uint32_t data, uint32_t *response)
typedef uint32_t STDCALL(* mailbox_device_get_timeout_proc) (MAILBOX_DEVICE *mailbox)
typedef uint32_t STDCALL(* mailbox_device_set_timeout_proc) (MAILBOX_DEVICE *mailbox, uint32_t timeout)
typedef struct _WATCHDOG_DEVICE WATCHDOG_DEVICE
typedef uint32_t STDCALL(* watchdog_enumerate_cb) (WATCHDOG_DEVICE *watchdog, void *data)
typedef uint32_t STDCALL(* watchdog_notification_cb) (DEVICE *device, void *data, uint32_t notification)
typedef uint32_t STDCALL(* watchdog_device_start_proc) (WATCHDOG_DEVICE *watchdog)
typedef uint32_t STDCALL(* watchdog_device_stop_proc) (WATCHDOG_DEVICE *watchdog)
typedef uint32_t STDCALL(* watchdog_device_refresh_proc) (WATCHDOG_DEVICE *watchdog)
typedef uint32_t STDCALL(* watchdog_device_get_remain_proc) (WATCHDOG_DEVICE *watchdog)
typedef uint32_t STDCALL(* watchdog_device_get_timeout_proc) (WATCHDOG_DEVICE *watchdog)
typedef uint32_t STDCALL(* watchdog_device_set_timeout_proc) (WATCHDOG_DEVICE *watchdog, uint32_t timeout)

Functions

DEVICE *STDCALL device_create (void)
 Create a new Device entry.
DEVICE *STDCALL device_create_ex (uint32_t size)
 Create a new Device entry.
uint32_t STDCALL device_destroy (DEVICE *device)
 Destroy an existing Device entry.
uint32_t STDCALL device_get_name (DEVICE *device, char *name, uint32_t len)
 Get the name of the supplied Device.
uint32_t STDCALL device_set_name (DEVICE *device, const char *name)
 Set the name of the supplied Device.
uint32_t STDCALL device_get_description (DEVICE *device, char *name, uint32_t len)
 Get the description of the supplied Device.
uint32_t STDCALL device_set_description (DEVICE *device, const char *description)
 Set the description of the supplied Device.
uint32_t STDCALL device_register (DEVICE *device)
 Register a new Device in the Device table.
uint32_t STDCALL device_deregister (DEVICE *device)
 Deregister a Device from the Device table.
DEVICE *STDCALL device_find (uint32_t deviceclass, uint32_t deviceid)
 Find a device by ID in the device table.
DEVICE *STDCALL device_find_by_device_data (void *devicedata)
 Find a device with matching DeviceData property in the device table.
DEVICE *STDCALL device_find_by_name (const char *name)
 Find a device by name in the device table.
DEVICE *STDCALL device_find_by_name_ex (uint32_t deviceclass, const char *name)
 Find a device by class and name in the device table.
DEVICE *STDCALL device_find_by_description (const char *description)
 Find a device by description in the device table.
DEVICE *STDCALL device_find_by_description_ex (uint32_t deviceclass, const char *description)
 Find a device by class and description in the device table.
uint32_t STDCALL device_enumerate (uint32_t deviceclass, device_enumerate_cb callback, void *data)
 Enumerate all devices in the device table.
uint32_t STDCALL device_notification (DEVICE *device, uint32_t deviceclass, device_notification_cb callback, void *data, uint32_t notification, uint32_t flags)
 Register a notification for device changes.
BOOL STDCALL device_firmware_create (uint32_t deviceclass, const char *name, void *buffer, uint32_t size)
 Create a new block (memory) based firmware entry using the standard block firmware handler.
HANDLE STDCALL device_firmware_register (uint32_t deviceclass, const char *name, device_firmware_handler handler)
 Register a new device firmware handler for acquiring device specific firmware.
uint32_t STDCALL device_firmware_deregister (HANDLE handle)
 Deregister an existing device firmware handler.
DEVICE_FIRMWARE *STDCALL device_firmware_find (uint32_t deviceclass, const char *name)
 Find an existing device firmware handler for a specified device.
DEVICE_FIRMWARE *STDCALL device_firmware_find_by_handle (HANDLE handle)
 Find an existing device firmware handler from a returned handle.
uint32_t STDCALL device_firmware_open (uint32_t deviceclass, const char *name, uint32_t timeout, HANDLE *handle)
 Open the firmware for a specified device from a registered handler.
uint32_t STDCALL device_firmware_close (HANDLE handle)
 Close a handle to the firmware for a specified device from a registered handler.
int32_t STDCALL device_firmware_size (HANDLE handle)
 Return the size of the firmware for a specified device from a registered handler.
int32_t STDCALL device_firmware_seek (HANDLE handle, int32_t position)
 Seek to a position within the firmware for a specified device from a registered handler.
int32_t STDCALL device_firmware_read (HANDLE handle, void *buffer, int32_t count)
 Read into a buffer from the firmware for a specified device from a registered handler.
uint32_t STDCALL device_firmware_acquire (uint32_t deviceclass, const char *name, uint32_t timeout, HANDLE *handle, void *buffer, uint32_t *size)
 Acquire a memory block containing the firmware for a specified device from a registered handler.
uint32_t STDCALL device_firmware_release (HANDLE handle, void *buffer, uint32_t size)
 Release a memory block containing the firmware for a specified device from a registered handler.
NOTIFIER *STDCALL notifier_allocate (DEVICE *device, uint32_t deviceclass, device_notification_cb callback, void *data, uint32_t notification, uint32_t flags)
 Create and Register a new Notifier entry in the Notifier table.
uint32_t STDCALL notifier_release (NOTIFIER *notifier)
 Deregister and Destroy a Notifier from the Notifier table.
NOTIFIER *STDCALL notifier_find (DEVICE *device, uint32_t deviceclass, device_notification_cb callback, void *data)
uint32_t STDCALL notifier_notify (DEVICE *device, uint32_t notification)
void STDCALL notifier_retry (NOTIFIER_RETRY *retry)
void STDCALL notifier_worker (NOTIFIER_TASK *task)
DRIVER *STDCALL driver_create (void)
 Create a new Driver entry.
DRIVER *STDCALL driver_create_ex (uint32_t size)
 Create a new Driver entry.
uint32_t STDCALL driver_destroy (DRIVER *driver)
 Destroy an existing Driver entry.
uint32_t STDCALL driver_get_name (DRIVER *driver, char *name, uint32_t len)
 Get the name of the supplied Driver.
uint32_t STDCALL driver_set_name (DRIVER *driver, const char *name)
 Set the name of the supplied Driver.
uint32_t STDCALL driver_register (DRIVER *driver)
 Register a new Driver in the Driver table.
uint32_t STDCALL driver_deregister (DRIVER *driver)
 Deregister a Driver from the Driver table.
DRIVER *STDCALL driver_find (uint32_t driverclass, uint32_t driverid)
 Find a driver by ID in the driver table.
DRIVER *STDCALL driver_find_by_name (const char *name)
 Find a driver by name in the driver table.
uint32_t STDCALL driver_enumerate (uint32_t driverclass, driver_enumerate_cb callback, void *data)
 Enumerate all drivers in the driver table.
uint32_t STDCALL clock_device_start (CLOCK_DEVICE *clock)
 Start the counter of the specified Clock device.
uint32_t STDCALL clock_device_stop (CLOCK_DEVICE *clock)
 Stop the counter of the specified Clock device.
uint32_t STDCALL clock_device_read (CLOCK_DEVICE *clock)
 Read the counter value of the specified Clock device.
int64_t STDCALL clock_device_read64 (CLOCK_DEVICE *clock)
 Read the counter value of the specified Clock device.
uint32_t STDCALL clock_device_write64 (CLOCK_DEVICE *clock, int64_t value)
 Write the counter value of the specified Clock device.
uint32_t STDCALL clock_device_get_rate (CLOCK_DEVICE *clock)
 Get the current clock rate in Hz of the specified Clock device.
uint32_t STDCALL clock_device_set_rate (CLOCK_DEVICE *clock, uint32_t rate)
 Set the current clock rate in Hz of the specified Clock device.
uint32_t STDCALL clock_device_properties (CLOCK_DEVICE *clock, CLOCK_PROPERTIES *properties)
 Get the properties for the specified Clock device.
uint32_t STDCALL clock_device_get_properties (CLOCK_DEVICE *clock, CLOCK_PROPERTIES *properties)
 Get the properties for the specified Clock device.
CLOCK_DEVICE *STDCALL clock_device_create (void)
 Create a new Clock entry.
CLOCK_DEVICE *STDCALL clock_device_create_ex (uint32_t size)
 Create a new Clock entry.
uint32_t STDCALL clock_device_destroy (CLOCK_DEVICE *clock)
 Destroy an existing Clock entry.
uint32_t STDCALL clock_device_register (CLOCK_DEVICE *clock)
 Register a new Clock in the Clock table.
uint32_t STDCALL clock_device_deregister (CLOCK_DEVICE *clock)
 Deregister a Clock from the Clock table.
CLOCK_DEVICE *STDCALL clock_device_find (uint32_t clockid)
 Find a clock device by ID in the clock table.
CLOCK_DEVICE *STDCALL clock_device_find_by_name (const char *name)
 Find a clock device by name in the clock table.
CLOCK_DEVICE *STDCALL clock_device_find_by_description (const char *description)
 Find a clock device by description in the clock table.
uint32_t STDCALL clock_device_enumerate (clock_enumerate_cb callback, void *data)
 Enumerate all clock devices in the clock table.
uint32_t STDCALL clock_device_notification (CLOCK_DEVICE *clock, clock_notification_cb callback, void *data, uint32_t notification, uint32_t flags)
 Register a notification for clock device changes.
uint32_t STDCALL timer_device_start (TIMER_DEVICE *timer)
 Start the clock and counter of the specified Timer device.
uint32_t STDCALL timer_device_stop (TIMER_DEVICE *timer)
 Stop the clock and counter of the specified Timer device.
uint32_t STDCALL timer_device_read (TIMER_DEVICE *timer)
 Read the current value of the specified Timer device.
int64_t STDCALL timer_device_read64 (TIMER_DEVICE *timer)
 Read the current value of the specified Timer device.
uint32_t STDCALL timer_device_wait (TIMER_DEVICE *timer)
 Wait for the current interval to expire on the specified Timer device.
uint32_t STDCALL timer_device_event (TIMER_DEVICE *timer, uint32_t flags, timer_cb callback, void *data)
 Schedule a function to be called when the current interval expires on the specified Timer device.
uint32_t STDCALL timer_device_cancel (TIMER_DEVICE *timer)
 Cancel a previously scheduled event callback function on the specified Timer device.
uint32_t STDCALL timer_device_get_rate (TIMER_DEVICE *timer)
 Get the current clock rate in Hz of the specified Timer device.
uint32_t STDCALL timer_device_set_rate (TIMER_DEVICE *timer, uint32_t rate)
 Set the current clock rate in Hz of the specified Timer device.
uint32_t STDCALL timer_device_get_interval (TIMER_DEVICE *timer)
 Get the current interval in ticks of the specified Timer device.
uint32_t STDCALL timer_device_set_interval (TIMER_DEVICE *timer, uint32_t interval)
 Set the current interval in ticks of the specified Timer device.
uint32_t STDCALL timer_device_properties (TIMER_DEVICE *timer, TIMER_PROPERTIES *properties)
 Get the properties for the specified Timer device.
uint32_t STDCALL timer_device_get_properties (TIMER_DEVICE *timer, TIMER_PROPERTIES *properties)
 Get the properties for the specified Timer device.
TIMER_DEVICE *STDCALL timer_device_create (void)
 Create a new Timer entry.
TIMER_DEVICE *STDCALL timer_device_create_ex (uint32_t size)
 Create a new Timer entry.
uint32_t STDCALL timer_device_destroy (TIMER_DEVICE *timer)
 Destroy an existing Timer entry.
uint32_t STDCALL timer_device_register (TIMER_DEVICE *timer)
 Register a new Timer in the Timer table.
uint32_t STDCALL timer_device_deregister (TIMER_DEVICE *timer)
 Deregister a Timer from the Timer table.
TIMER_DEVICE *STDCALL timer_device_find (uint32_t timerid)
 Find a timer device by ID in the timer table.
TIMER_DEVICE *STDCALL timer_device_find_by_name (const char *name)
 Find a timer device by name in the timer table.
TIMER_DEVICE *STDCALL timer_device_find_by_description (const char *description)
 Find a timer device by description in the timer table.
uint32_t STDCALL timer_device_enumerate (timer_enumerate_cb callback, void *data)
 Enumerate all timer devices in the timer table.
uint32_t STDCALL timer_device_notification (TIMER_DEVICE *timer, timer_notification_cb callback, void *data, uint32_t notification, uint32_t flags)
 Register a notification for timer device changes.
uint32_t STDCALL random_device_start (RANDOM_DEVICE *random)
uint32_t STDCALL random_device_stop (RANDOM_DEVICE *random)
uint32_t STDCALL random_device_seed (RANDOM_DEVICE *random, uint32_t seed)
uint8_t STDCALL random_device_read_byte (RANDOM_DEVICE *random)
uint16_t STDCALL random_device_read_word (RANDOM_DEVICE *random)
uint32_t STDCALL random_device_read_long_word (RANDOM_DEVICE *random)
int64_t STDCALL random_device_read_quad_word (RANDOM_DEVICE *random)
double_t STDCALL random_device_read_double (RANDOM_DEVICE *random)
double_t STDCALL random_device_read_extended (RANDOM_DEVICE *random)
RANDOM_DEVICE *STDCALL random_device_create (void)
 Create a new Random entry.
RANDOM_DEVICE *STDCALL random_device_create_ex (uint32_t size)
 Create a new Random entry.
uint32_t STDCALL random_device_destroy (RANDOM_DEVICE *random)
 Destroy an existing Random entry.
uint32_t STDCALL random_device_register (RANDOM_DEVICE *random)
 Register a new Random in the Random table.
uint32_t STDCALL random_device_deregister (RANDOM_DEVICE *random)
 Deregister a Random from the Random table.
RANDOM_DEVICE *STDCALL random_device_find (uint32_t randomid)
RANDOM_DEVICE *STDCALL random_device_find_by_name (const char *name)
RANDOM_DEVICE *STDCALL random_device_find_by_description (const char *description)
uint32_t STDCALL random_device_enumerate (random_enumerate_cb callback, void *data)
uint32_t STDCALL random_device_notification (RANDOM_DEVICE *random, random_notification_cb callback, void *data, uint32_t notification, uint32_t flags)
uint32_t STDCALL mailbox_device_start (MAILBOX_DEVICE *mailbox)
uint32_t STDCALL mailbox_device_stop (MAILBOX_DEVICE *mailbox)
uint32_t STDCALL mailbox_device_receive (MAILBOX_DEVICE *mailbox, uint32_t channel)
uint32_t STDCALL mailbox_device_send (MAILBOX_DEVICE *mailbox, uint32_t channel, uint32_t data)
uint32_t STDCALL mailbox_device_call (MAILBOX_DEVICE *mailbox, uint32_t channel, uint32_t data, uint32_t *response)
uint32_t STDCALL mailbox_device_get_timeout (MAILBOX_DEVICE *mailbox)
uint32_t STDCALL mailbox_device_set_timeout (MAILBOX_DEVICE *mailbox, uint32_t timeout)
MAILBOX_DEVICE *STDCALL mailbox_device_create (void)
 Create a new Mailbox entry.
MAILBOX_DEVICE *STDCALL mailbox_device_create_ex (uint32_t size)
 Create a new Mailbox entry.
uint32_t STDCALL mailbox_device_destroy (MAILBOX_DEVICE *mailbox)
 Destroy an existing Mailbox entry.
uint32_t STDCALL mailbox_device_register (MAILBOX_DEVICE *mailbox)
 Register a new Mailbox in the Mailbox table.
uint32_t STDCALL mailbox_device_deregister (MAILBOX_DEVICE *mailbox)
 Deregister a Mailbox from the Mailbox table.
MAILBOX_DEVICE *STDCALL mailbox_device_find (uint32_t mailboxid)
MAILBOX_DEVICE *STDCALL mailbox_device_find_by_name (const char *name)
MAILBOX_DEVICE *STDCALL mailbox_device_find_by_description (const char *description)
uint32_t STDCALL mailbox_device_enumerate (mailbox_enumerate_cb callback, void *data)
uint32_t STDCALL mailbox_device_notification (MAILBOX_DEVICE *mailbox, mailbox_notification_cb callback, void *data, uint32_t notification, uint32_t flags)
uint32_t STDCALL watchdog_device_start (WATCHDOG_DEVICE *watchdog)
uint32_t STDCALL watchdog_device_stop (WATCHDOG_DEVICE *watchdog)
uint32_t STDCALL watchdog_device_refresh (WATCHDOG_DEVICE *watchdog)
uint32_t STDCALL watchdog_device_get_remain (WATCHDOG_DEVICE *watchdog)
uint32_t STDCALL watchdog_device_get_timeout (WATCHDOG_DEVICE *watchdog)
uint32_t STDCALL watchdog_device_set_timeout (WATCHDOG_DEVICE *watchdog, uint32_t timeout)
WATCHDOG_DEVICE *STDCALL watchdog_device_create (void)
 Create a new Watchdog entry.
WATCHDOG_DEVICE *STDCALL watchdog_device_create_ex (uint32_t size)
 Create a new Watchdog entry.
uint32_t STDCALL watchdog_device_destroy (WATCHDOG_DEVICE *watchdog)
 Destroy an existing Watchdog entry.
uint32_t STDCALL watchdog_device_register (WATCHDOG_DEVICE *watchdog)
 Register a new Watchdog in the Watchdog table.
uint32_t STDCALL watchdog_device_deregister (WATCHDOG_DEVICE *watchdog)
 Deregister a Watchdog from the Watchdog table.
WATCHDOG_DEVICE *STDCALL watchdog_device_find (uint32_t watchdogid)
WATCHDOG_DEVICE *STDCALL watchdog_device_find_by_name (const char *name)
WATCHDOG_DEVICE *STDCALL watchdog_device_find_by_description (const char *description)
uint32_t STDCALL watchdog_device_enumerate (watchdog_enumerate_cb callback, void *data)
uint32_t STDCALL watchdog_device_notification (WATCHDOG_DEVICE *watchdog, watchdog_notification_cb callback, void *data, uint32_t notification, uint32_t flags)
uint32_t STDCALL device_get_count (void)
 Get the current device count.
DEVICE *STDCALL device_check (DEVICE *device)
 Check if the supplied Device is in the device table.
uint32_t STDCALL notifier_get_count (void)
 Get the current notifier count.
NOTIFIER *STDCALL notifier_check (NOTIFIER *notifier)
 Check if the supplied Notifier is in the notifier table.
uint32_t STDCALL device_bus_to_string (uint32_t devicebus, char *string, uint32_t len)
uint32_t STDCALL device_state_to_string (uint32_t devicestate, char *string, uint32_t len)
uint32_t STDCALL device_class_to_string (uint32_t deviceclass, char *string, uint32_t len)
uint32_t STDCALL notification_to_string (uint32_t notification, char *string, uint32_t len)
uint32_t STDCALL driver_get_count (void)
 Get the current driver count.
DRIVER *STDCALL driver_check (DRIVER *driver)
 Check if the supplied Driver is in the driver table.
uint32_t STDCALL driver_state_to_string (uint32_t driverstate, char *string, uint32_t len)
uint32_t STDCALL driver_class_to_string (uint32_t driverclass, char *string, uint32_t len)
uint32_t STDCALL clock_device_get_count (void)
 Get the current clock device count.
CLOCK_DEVICE *STDCALL clock_device_get_default (void)
 Get the current default clock device.
uint32_t STDCALL clock_device_set_default (CLOCK_DEVICE *clock)
 Set the current default clock device.
CLOCK_DEVICE *STDCALL clock_device_check (CLOCK_DEVICE *clock)
 Check if the supplied Clock is in the Clock table.
uint32_t STDCALL clock_type_to_string (uint32_t clocktype, char *string, uint32_t len)
 Convert a Clock type value to a string.
uint32_t STDCALL clock_state_to_string (uint32_t clockstate, char *string, uint32_t len)
 Convert a Clock state value to a string.
uint32_t STDCALL timer_device_get_count (void)
 Get the current timer device count.
TIMER_DEVICE *STDCALL timer_device_get_default (void)
 Get the current default timer device.
uint32_t STDCALL timer_device_set_default (TIMER_DEVICE *timer)
 Set the current default timer device.
TIMER_DEVICE *STDCALL timer_device_check (TIMER_DEVICE *timer)
 Check if the supplied Timer is in the Timer table.
uint32_t STDCALL timer_type_to_string (uint32_t timertype, char *string, uint32_t len)
 Convert a Timer type value to a string.
uint32_t STDCALL timer_state_to_string (uint32_t timerstate, char *string, uint32_t len)
 Convert a Timer state value to a string.
TIMER_WAITER *STDCALL timer_device_create_waiter (TIMER_DEVICE *timer, timer_cb callback, void *data)
 Create a new waiter using the supplied parameters.
uint32_t STDCALL timer_device_destroy_waiter (TIMER_DEVICE *timer, TIMER_WAITER *waiter)
 Destroy an existing waiter.
uint32_t STDCALL timer_device_register_waiter (TIMER_DEVICE *timer, TIMER_WAITER *waiter)
 Register a waiter in the waiter list of the supplied Timer.
uint32_t STDCALL timer_device_deregister_waiter (TIMER_DEVICE *timer, TIMER_WAITER *waiter)
 Deregister a waiter from the waiter list of the supplied Timer.
uint32_t STDCALL random_device_get_count (void)
 Get the current random device count.
RANDOM_DEVICE *STDCALL random_device_get_default (void)
 Get the current default random device.
uint32_t STDCALL random_device_set_default (RANDOM_DEVICE *random)
 Set the current default random device.
RANDOM_DEVICE *STDCALL random_device_check (RANDOM_DEVICE *random)
 Check if the supplied Random is in the Random table.
uint32_t STDCALL random_type_to_string (uint32_t randomtype, char *string, uint32_t len)
 Convert a Random type value to a string.
uint32_t STDCALL random_state_to_string (uint32_t randomstate, char *string, uint32_t len)
 Convert a Random state value to a string.
uint32_t STDCALL mailbox_device_get_count (void)
 Get the current mailbox device count.
MAILBOX_DEVICE *STDCALL mailbox_device_get_default (void)
 Get the current default mailbox device.
uint32_t STDCALL mailbox_device_set_default (MAILBOX_DEVICE *mailbox)
 Set the current default mailbox device.
MAILBOX_DEVICE *STDCALL mailbox_device_check (MAILBOX_DEVICE *mailbox)
 Check if the supplied Mailbox is in the Mailbox table.
uint32_t STDCALL mailbox_type_to_string (uint32_t mailboxtype, char *string, uint32_t len)
 Convert a Mailbox type value to a string.
uint32_t STDCALL mailbox_state_to_string (uint32_t mailboxstate, char *string, uint32_t len)
 Convert a Mailbox state value to a string.
uint32_t STDCALL watchdog_device_get_count (void)
 Get the current watchdog device count.
WATCHDOG_DEVICE *STDCALL watchdog_device_get_default (void)
 Get the current default watchdog device.
uint32_t STDCALL watchdog_device_set_default (WATCHDOG_DEVICE *watchdog)
 Set the current default watchdog device.
WATCHDOG_DEVICE *STDCALL watchdog_device_check (WATCHDOG_DEVICE *watchdog)
 Check if the supplied Watchdog is in the Watchdog table.
uint32_t STDCALL watchdog_type_to_string (uint32_t watchdogtype, char *string, uint32_t len)
 Convert a Watchdog type value to a string.
uint32_t STDCALL watchdog_state_to_string (uint32_t watchdogstate, char *string, uint32_t len)
 Convert a Watchdog state value to a string.

Macro Definition Documentation

◆ DEVICE_NAME_PREFIX

#define DEVICE_NAME_PREFIX   "Device"

Name prefix for Devices.

Device specific constants

◆ DEVICE_SIGNATURE

#define DEVICE_SIGNATURE   0xAD03FE3C

Device Signature

◆ DEVICE_NAME_LENGTH

#define DEVICE_NAME_LENGTH   SIZE_64

Length of device name.

Device name constants

◆ DEVICE_DESC_LENGTH

#define DEVICE_DESC_LENGTH   SIZE_128

Length of device description.

◆ DEVICE_BUS_NONE

#define DEVICE_BUS_NONE   0

Device Busses

◆ DEVICE_BUS_PCI

#define DEVICE_BUS_PCI   1

◆ DEVICE_BUS_USB

#define DEVICE_BUS_USB   2

◆ DEVICE_BUS_ISA

#define DEVICE_BUS_ISA   3

◆ DEVICE_BUS_PS2

#define DEVICE_BUS_PS2   4

◆ DEVICE_BUS_FIREWIRE

#define DEVICE_BUS_FIREWIRE   5

◆ DEVICE_BUS_SD

#define DEVICE_BUS_SD   6

SD/SDHC/SDXC/SDIO etc.

◆ DEVICE_BUS_MMC

#define DEVICE_BUS_MMC   7

MMC/eMMC etc.

◆ DEVICE_BUS_ATA

#define DEVICE_BUS_ATA   8

◆ DEVICE_BUS_IDE

#define DEVICE_BUS_IDE   9

◆ DEVICE_BUS_SCSI

#define DEVICE_BUS_SCSI   10

◆ DEVICE_BUS_ATAPI

#define DEVICE_BUS_ATAPI   11

◆ DEVICE_BUS_SATA

#define DEVICE_BUS_SATA   12

◆ DEVICE_BUS_SERIAL

#define DEVICE_BUS_SERIAL   13

◆ DEVICE_BUS_SPI

#define DEVICE_BUS_SPI   14

Serial Peripheral Interface device.

◆ DEVICE_BUS_MMIO

#define DEVICE_BUS_MMIO   15

Memory Mapped IO device (No Bus).

◆ DEVICE_BUS_PCIE

#define DEVICE_BUS_PCIE   16

◆ DEVICE_BUS_I2C

#define DEVICE_BUS_I2C   17

I2C connected device.

◆ DEVICE_BUS_VIRTIO

#define DEVICE_BUS_VIRTIO   18

Virtual devices.

◆ DEVICE_BUS_BLUETOOTH

#define DEVICE_BUS_BLUETOOTH   19

Bluetooth connected devices.

◆ DEVICE_BUS_MAX

#define DEVICE_BUS_MAX   19

◆ DEVICE_STATE_UNREGISTERED

#define DEVICE_STATE_UNREGISTERED   0

Device States

◆ DEVICE_STATE_REGISTERED

#define DEVICE_STATE_REGISTERED   1

◆ DEVICE_STATE_MAX

#define DEVICE_STATE_MAX   1

◆ DEVICE_ID_ANY

#define DEVICE_ID_ANY   0xFFFFFFFF

Any Device (Pass to DeviceFind to match all devices).

Device Ids

◆ DEVICE_CLASS_NONE

#define DEVICE_CLASS_NONE   0

No Device.

Device Classes

◆ DEVICE_CLASS_USBHOST

#define DEVICE_CLASS_USBHOST   1

A USB Host Controller (eg XHCI/EHCI/UHCI/OHCI or DWCOTG etc) (Implementing a standard USB host interface).

◆ DEVICE_CLASS_PCIHOST

#define DEVICE_CLASS_PCIHOST   2

A PCI Host Controller (Implementing a standard PCI host interface).

◆ DEVICE_CLASS_USB

#define DEVICE_CLASS_USB   3

A USB Device (eg Hub/Keyboard/Mouse/Mass Storage/Vendor Specific etc) (Implementing a standard USB device interface).

◆ DEVICE_CLASS_PCI

#define DEVICE_CLASS_PCI   4

A PCI Device (eg Graphics/Controller etc) (Implementing a standard PCI device interface).

◆ DEVICE_CLASS_NETWORK

#define DEVICE_CLASS_NETWORK   5

A Network Device (Implementing a standard Network device interface). May also be a USB or PCI device.

◆ DEVICE_CLASS_STORAGE

#define DEVICE_CLASS_STORAGE   6

A Storage Device (Implementing a standard Storage device interface). May also be a USB, PCI, MMC, SCSI or ATA device.

◆ DEVICE_CLASS_BLOCK

#define DEVICE_CLASS_BLOCK   DEVICE_CLASS_STORAGE

◆ DEVICE_CLASS_FILESYSTEM

#define DEVICE_CLASS_FILESYSTEM   7

A FileSystem Device (eg FAT/NTFS/CDFS/EXTFS etc)(Implementing a standard FileSystem device interface).

◆ DEVICE_CLASS_PROTOCOL

#define DEVICE_CLASS_PROTOCOL   8

A Protocol Device (eg TCP/UDP/IP/ICMP etc) (Implementing a standard Protocol device interface).

◆ DEVICE_CLASS_TRANSPORT

#define DEVICE_CLASS_TRANSPORT   DEVICE_CLASS_PROTOCOL

◆ DEVICE_CLASS_KEYBOARD

#define DEVICE_CLASS_KEYBOARD   9

A Keyboard Device (Implementing a standard Keyboard device interface).

◆ DEVICE_CLASS_MOUSE

#define DEVICE_CLASS_MOUSE   10

A Mouse Device (Implementing a standard Mouse device interface).

◆ DEVICE_CLASS_BLUETOOTH

#define DEVICE_CLASS_BLUETOOTH   11

A Bluetooth Device (eg Keyboard/Mouse/Audio/Serial) (Implementing a standard Bluetooth device interface).

◆ DEVICE_CLASS_SERIAL

#define DEVICE_CLASS_SERIAL   12

A Serial Device (Implementing a standard Serial device interface).

◆ DEVICE_CLASS_AUDIO

#define DEVICE_CLASS_AUDIO   13

An Audio Device (Implementing a standard Audio device interface).

◆ DEVICE_CLASS_VIDEO

#define DEVICE_CLASS_VIDEO   14

A Video Device (Implementing a standard Video device interface).

◆ DEVICE_CLASS_SCSI

#define DEVICE_CLASS_SCSI   15

A SCSI Device (Implementing a standard SCSI device interface). May also be a PCI device.

◆ DEVICE_CLASS_ATA

#define DEVICE_CLASS_ATA   16

An ATA/ATAPI Device (Implementing a standard ATA/ATAPI device interface). May also be a PCI device.

◆ DEVICE_CLASS_IDE

#define DEVICE_CLASS_IDE   DEVICE_CLASS_ATA

◆ DEVICE_CLASS_ATAPI

#define DEVICE_CLASS_ATAPI   DEVICE_CLASS_ATA

◆ DEVICE_CLASS_IMAGE

#define DEVICE_CLASS_IMAGE   17

An Image Device (eg Camera) (Implementing a standard Image device interface).

◆ DEVICE_CLASS_PRINTER

#define DEVICE_CLASS_PRINTER   18

A Printer Device (Implementing a standard Printer device interface).

◆ DEVICE_CLASS_COMMUNICATIONS

#define DEVICE_CLASS_COMMUNICATIONS   19

A Communications Device (Implementing a standard Communications device interface).

◆ DEVICE_CLASS_SMART_CARD

#define DEVICE_CLASS_SMART_CARD   20

A Smart Card Device (Implementing a standard Smart Card device interface).

◆ DEVICE_CLASS_MONITOR

#define DEVICE_CLASS_MONITOR   21

A Monitor Device (Implementing a standard Monitor device interface).

◆ DEVICE_CLASS_DISPLAY

#define DEVICE_CLASS_DISPLAY   22

A Display Device (eg Billboard) (Implementing a standard Display device interface).

◆ DEVICE_CLASS_AUDIOVIDEO

#define DEVICE_CLASS_AUDIOVIDEO   23

An Audio/Video Device (Implementing a standard Audio/Video device interface).

◆ DEVICE_CLASS_IRDA

#define DEVICE_CLASS_IRDA   24

An Infrared Device (Implementing a standard Infrared device interface).

◆ DEVICE_CLASS_SPI

#define DEVICE_CLASS_SPI   25

An SPI Device (Implementing a standard SPI device interface).

◆ DEVICE_CLASS_I2C

#define DEVICE_CLASS_I2C   26

An I2C Device (Implementing a standard I2C device interface).

◆ DEVICE_CLASS_UART

#define DEVICE_CLASS_UART   27

A UART Device (Implementing a standard UART device interface).

◆ DEVICE_CLASS_MMC

#define DEVICE_CLASS_MMC   28

An MMC Device (Implementing a standard MMC device interface).

◆ DEVICE_CLASS_SD

#define DEVICE_CLASS_SD   29

An SD Device (Implementing a standard SD device interface).

◆ DEVICE_CLASS_SDHCI

#define DEVICE_CLASS_SDHCI   30

An SD/MMC Host Controller (Implementing a standard SDHCI device interface).

◆ DEVICE_CLASS_SDHOST

#define DEVICE_CLASS_SDHOST   DEVICE_CLASS_SDHCI

◆ DEVICE_CLASS_MMCHOST

#define DEVICE_CLASS_MMCHOST   DEVICE_CLASS_SDHCI

◆ DEVICE_CLASS_MMCIHOST

#define DEVICE_CLASS_MMCIHOST   DEVICE_CLASS_SDHCI

◆ DEVICE_CLASS_DFU

#define DEVICE_CLASS_DFU   31

A Device Firmware Update Device (Implementing a standard DFU device interface).

◆ DEVICE_CLASS_GPIO

#define DEVICE_CLASS_GPIO   32

A GPIO Device (Implementing a standard GPIO device interface).

◆ DEVICE_CLASS_MAILBOX

#define DEVICE_CLASS_MAILBOX   33

A Mailbox Device.

◆ DEVICE_CLASS_OPENGL

#define DEVICE_CLASS_OPENGL   34

An OpenGL Device.

◆ DEVICE_CLASS_DVB

#define DEVICE_CLASS_DVB   35

A Digital Video Broadcast (DVB) Device.

◆ DEVICE_CLASS_DAB

#define DEVICE_CLASS_DAB   36

A Digital Audio Broadcast (DAB) Device.

◆ DEVICE_CLASS_DMA

#define DEVICE_CLASS_DMA   37

A DMA Controller Device (Implementing a standard DMA controller interface).

◆ DEVICE_CLASS_SCSIHOST

#define DEVICE_CLASS_SCSIHOST   38

A SCSI Host Device (Implementing a standard SCSI host interface).

◆ DEVICE_CLASS_ATAHOST

#define DEVICE_CLASS_ATAHOST   39

An ATA Host Device (Implementing a standard ATA host interface).

◆ DEVICE_CLASS_TIMER

#define DEVICE_CLASS_TIMER   40

A Timer or Counter Device.

◆ DEVICE_CLASS_RANDOM

#define DEVICE_CLASS_RANDOM   41

A Random Number Generator Device.

◆ DEVICE_CLASS_FRAMEBUFFER

#define DEVICE_CLASS_FRAMEBUFFER   42

A Frame Buffer Device.

◆ DEVICE_CLASS_WATCHDOG

#define DEVICE_CLASS_WATCHDOG   43

A Watchdog Timer Device.

◆ DEVICE_CLASS_CLOCK

#define DEVICE_CLASS_CLOCK   44

A Clock (Date/Time) Device.

◆ DEVICE_CLASS_CONSOLE

#define DEVICE_CLASS_CONSOLE   45

A Console Device.

◆ DEVICE_CLASS_RTC

#define DEVICE_CLASS_RTC   46

A Real Time Clock (Battery Backed) Device.

◆ DEVICE_CLASS_USBHUB

#define DEVICE_CLASS_USBHUB   47

A USB Hub (Implementing a standard USB hub interface).

◆ DEVICE_CLASS_LOGGING

#define DEVICE_CLASS_LOGGING   48

A Logging Device (Implementing a standard Logging device interface).

◆ DEVICE_CLASS_PCM

#define DEVICE_CLASS_PCM   49

A PCM Sound Device (Implementing a standard PCM device interface).

◆ DEVICE_CLASS_I2S

#define DEVICE_CLASS_I2S   DEVICE_CLASS_PCM

◆ DEVICE_CLASS_PWM

#define DEVICE_CLASS_PWM   50

A Pulse Width Modulation (PWM) Device.

◆ DEVICE_CLASS_1WIRE

#define DEVICE_CLASS_1WIRE   51

A 1-Wire Device (Implementing a standard W1 device interface).

◆ DEVICE_CLASS_CLOCK_MANAGER

#define DEVICE_CLASS_CLOCK_MANAGER   52

A Clock Manager Device.

◆ DEVICE_CLASS_CODEC

#define DEVICE_CLASS_CODEC   53

A CODEC Device (eg Audio or Video).

◆ DEVICE_CLASS_TOUCH

#define DEVICE_CLASS_TOUCH   54

A Touch Device.

◆ DEVICE_CLASS_MEMORY

#define DEVICE_CLASS_MEMORY   55

A Memory Device (eg OTP, NVRAM or Flash).

◆ DEVICE_CLASS_GENERIC

#define DEVICE_CLASS_GENERIC   56

A Generic Device.

◆ DEVICE_CLASS_VIRTIO

#define DEVICE_CLASS_VIRTIO   57

A VIRTIO Device (eg Block/Network/Memory/Console/Input etc) (Implementing a standard VIRTIO device interface).

◆ DEVICE_CLASS_BLUETOOTHHOST

#define DEVICE_CLASS_BLUETOOTHHOST   58

A Bluetooth Host Controller (Implementing a standard Bluetooth host interface).

◆ DEVICE_CLASS_JOYSTICK

#define DEVICE_CLASS_JOYSTICK   59

A Joystick or Gamepad Device.

◆ DEVICE_CLASS_HID

#define DEVICE_CLASS_HID   60

A Human Interface Device (HID).

◆ DEVICE_CLASS_MAX

#define DEVICE_CLASS_MAX   60

◆ DEVICE_CLASS_ANY

#define DEVICE_CLASS_ANY   0xFFFFFFFF

Any Device (Pass to DeviceFind or DeviceEnumerate to match all devices).

◆ DEVICE_NOTIFICATION_NONE

#define DEVICE_NOTIFICATION_NONE   0x00000000

Pass to DeviceNotification to cancel an existing Notification.

Device Notification Flags

◆ DEVICE_NOTIFICATION_REGISTER

#define DEVICE_NOTIFICATION_REGISTER   0x00000001

◆ DEVICE_NOTIFICATION_DEREGISTER

#define DEVICE_NOTIFICATION_DEREGISTER   0x00000002

◆ DEVICE_NOTIFICATION_OPEN

#define DEVICE_NOTIFICATION_OPEN   0x00000004

◆ DEVICE_NOTIFICATION_CLOSE

#define DEVICE_NOTIFICATION_CLOSE   0x00000008

◆ DEVICE_NOTIFICATION_UP

#define DEVICE_NOTIFICATION_UP   0x00000010

◆ DEVICE_NOTIFICATION_DOWN

#define DEVICE_NOTIFICATION_DOWN   0x00000020

◆ DEVICE_NOTIFICATION_INSERT

#define DEVICE_NOTIFICATION_INSERT   0x00000040

◆ DEVICE_NOTIFICATION_EJECT

#define DEVICE_NOTIFICATION_EJECT   0x00000080

◆ DEVICE_NOTIFICATION_ATTACH

#define DEVICE_NOTIFICATION_ATTACH   0x00000100

◆ DEVICE_NOTIFICATION_DETACH

#define DEVICE_NOTIFICATION_DETACH   0x00000200

◆ DEVICE_NOTIFICATION_ENABLE

#define DEVICE_NOTIFICATION_ENABLE   0x00000400

◆ DEVICE_NOTIFICATION_DISABLE

#define DEVICE_NOTIFICATION_DISABLE   0x00000800

◆ DEVICE_NOTIFICATION_BIND

#define DEVICE_NOTIFICATION_BIND   0x00001000

◆ DEVICE_NOTIFICATION_UNBIND

#define DEVICE_NOTIFICATION_UNBIND   0x00002000

◆ DEVICE_NOTIFICATION_ATTACHING

#define DEVICE_NOTIFICATION_ATTACHING   0x00004000

◆ DEVICE_NOTIFICATION_DETACHING

#define DEVICE_NOTIFICATION_DETACHING   0x00008000

◆ DEVICE_NOTIFICATION_INSERTING

#define DEVICE_NOTIFICATION_INSERTING   0x00010000

◆ DEVICE_NOTIFICATION_EJECTING

#define DEVICE_NOTIFICATION_EJECTING   0x00020000

◆ DEVICE_NOTIFICATION_OPENING

#define DEVICE_NOTIFICATION_OPENING   0x00040000

◆ DEVICE_NOTIFICATION_CLOSING

#define DEVICE_NOTIFICATION_CLOSING   0x00080000

◆ DEVICE_NOTIFICATION_RESIZE

#define DEVICE_NOTIFICATION_RESIZE   0x00100000

◆ DEVICE_NOTIFICATION_RESIZING

#define DEVICE_NOTIFICATION_RESIZING   0x00200000

◆ FIRMWARE_NAME_LENGTH

#define FIRMWARE_NAME_LENGTH   SIZE_256

Length of firmware name.

Firmware name constants

◆ FIRMWARE_ACTION_NONE

#define FIRMWARE_ACTION_NONE   0

Firmware Actions

◆ FIRMWARE_ACTION_SIZE

#define FIRMWARE_ACTION_SIZE   1

Return the size in bytes of the firmware item.

◆ FIRMWARE_ACTION_OPEN

#define FIRMWARE_ACTION_OPEN   2

Open the firmware item and return a handle.

◆ FIRMWARE_ACTION_READ

#define FIRMWARE_ACTION_READ   3

Read from the firmware item specified by a given handle.

◆ FIRMWARE_ACTION_SEEK

#define FIRMWARE_ACTION_SEEK   4

Seek to a location in the firmware item specified by a given handle.

◆ FIRMWARE_ACTION_CLOSE

#define FIRMWARE_ACTION_CLOSE   5

Close a handle to the firmware item.

◆ FIRMWARE_ACTION_ACQUIRE

#define FIRMWARE_ACTION_ACQUIRE   6

Acquire a memory block containing the firmware item.

◆ FIRMWARE_ACTION_RELEASE

#define FIRMWARE_ACTION_RELEASE   7

Release a memory block containing the firmware item.

◆ FIRMWARE_WAIT_DELAY

#define FIRMWARE_WAIT_DELAY   100

Delay between retries for firmware while waiting for timeout (Milliseconds).

Firmware Constants

◆ FIRMWARE_MAX_BUFFER

#define FIRMWARE_MAX_BUFFER   SIZE_4M

Maximum size buffer able to be allocated for firmware by acquire.

◆ NOTIFIER_SIGNATURE

#define NOTIFIER_SIGNATURE   0x6FA1BEC9

Notifier Signature

◆ NOTIFIER_STATE_UNREGISTERED

#define NOTIFIER_STATE_UNREGISTERED   0

Notifier States

◆ NOTIFIER_STATE_REGISTERED

#define NOTIFIER_STATE_REGISTERED   1

◆ NOTIFIER_FLAG_NONE

#define NOTIFIER_FLAG_NONE   0x00000000

Notifier Flags

◆ NOTIFIER_FLAG_WORKER

#define NOTIFIER_FLAG_WORKER   0x00000001

If set, notification callback event will be scheduled on a worker thread.

◆ NOTIFIER_FLAG_UNLOCK

#define NOTIFIER_FLAG_UNLOCK   0x00000002

If set, the notifier table lock will be released before calling the notification callback event.

◆ DRIVER_NAME_PREFIX

#define DRIVER_NAME_PREFIX   "Driver"

Name prefix for Drivers.

Driver specific constants

◆ DRIVER_SIGNATURE

#define DRIVER_SIGNATURE   0x1EB4980A

Driver Signature

◆ DRIVER_NAME_LENGTH

#define DRIVER_NAME_LENGTH   SIZE_64

Length of driver name.

Driver name constants

◆ DRIVER_STATE_UNREGISTERED

#define DRIVER_STATE_UNREGISTERED   0

Driver States

◆ DRIVER_STATE_REGISTERED

#define DRIVER_STATE_REGISTERED   1

◆ DRIVER_STATE_MAX

#define DRIVER_STATE_MAX   1

◆ DRIVER_ID_ANY

#define DRIVER_ID_ANY   0xFFFFFFFF

Any Driver (Pass to DriverFind to match all drivers).

Driver Ids

◆ DRIVER_CLASS_NONE

#define DRIVER_CLASS_NONE   0

No Driver.

Driver Classes

◆ DRIVER_CLASS_USB

#define DRIVER_CLASS_USB   1

A USB Driver (Implementing a standard USB driver interface).

◆ DRIVER_CLASS_PCI

#define DRIVER_CLASS_PCI   2

A PCI Driver (Implementing a standard PCI driver interface).

◆ DRIVER_CLASS_SDIO

#define DRIVER_CLASS_SDIO   3

An SDIO Driver (Implementing a standard SDIO driver interface).

◆ DRIVER_CLASS_BLUETOOTH

#define DRIVER_CLASS_BLUETOOTH   4

A Bluetooth Driver (Implementing a standard Bluetooth driver interface).

◆ DRIVER_CLASS_VIRTIO

#define DRIVER_CLASS_VIRTIO   5

A VIRTIO Driver (Implementing a standard VIRTIO driver interface).

◆ DRIVER_CLASS_HID

#define DRIVER_CLASS_HID   6

A Human Interface Device (HID) Driver (Implementing a standard HID driver interface).

◆ DRIVER_CLASS_MAX

#define DRIVER_CLASS_MAX   6

◆ DRIVER_CLASS_ANY

#define DRIVER_CLASS_ANY   0xFFFFFFFF

Any Driver (Pass to DriverFind or DriverEnumerate to match all drivers).

◆ HOST_NAME_PREFIX

#define HOST_NAME_PREFIX   "Host"

Name prefix for Hosts.

Host specific constants

◆ HOST_SIGNATURE

#define HOST_SIGNATURE   0xF45D30FE

Host Signature

◆ HOST_NAME_LENGTH

#define HOST_NAME_LENGTH   SIZE_64

Length of host name.

Host name constants

◆ HOST_STATE_UNREGISTERED

#define HOST_STATE_UNREGISTERED   0

Host States

◆ HOST_STATE_REGISTERED

#define HOST_STATE_REGISTERED   1

◆ HOST_STATE_MAX

#define HOST_STATE_MAX   1

◆ HOST_ID_ANY

#define HOST_ID_ANY   0xFFFFFFFF

Any Host (Pass to HostFind to match all hosts).

Host Ids

◆ HOST_CLASS_NONE

#define HOST_CLASS_NONE   0

No Host.

Host Classes

◆ HOST_CLASS_USB

#define HOST_CLASS_USB   1

A USB Host (eg XHCI/EHCI/UHCI/OHCI or DWCOTG etc) (Implementing a standard USB host interface).

◆ HOST_CLASS_PCI

#define HOST_CLASS_PCI   2

A PCI Host (eg AHCI etc) (Implementing a standard PCI host interface).

◆ HOST_CLASS_SD

#define HOST_CLASS_SD   3

An SD Host (eg MMC/SDIO etc) (Implementing a standard SD host interface).

◆ HOST_CLASS_BLUETOOTH

#define HOST_CLASS_BLUETOOTH   4

A Bluetooth Host (Implementing a standard Bluetooth host interface).

◆ HOST_CLASS_MAX

#define HOST_CLASS_MAX   4

◆ HOST_CLASS_ANY

#define HOST_CLASS_ANY   0xFFFFFFFF

Any Host (Pass to HostFind or HostEnumerate to match all hosts).

◆ CLOCK_NAME_PREFIX

#define CLOCK_NAME_PREFIX   "Clock"

Name prefix for Clock Devices.

Clock specific constants

◆ CLOCK_TYPE_NONE

#define CLOCK_TYPE_NONE   0

Clock Device Types

◆ CLOCK_TYPE_HARDWARE

#define CLOCK_TYPE_HARDWARE   1

◆ CLOCK_TYPE_MAX

#define CLOCK_TYPE_MAX   1

◆ CLOCK_STATE_DISABLED

#define CLOCK_STATE_DISABLED   0

Clock Device States

◆ CLOCK_STATE_ENABLED

#define CLOCK_STATE_ENABLED   1

◆ CLOCK_STATE_MAX

#define CLOCK_STATE_MAX   1

◆ CLOCK_FLAG_NONE

#define CLOCK_FLAG_NONE   0x00000000

Clock Device Flags

◆ CLOCK_FLAG_WRITABLE

#define CLOCK_FLAG_WRITABLE   0x00000001

Device supports writing the clock value.

◆ CLOCK_FLAG_VARIABLE

#define CLOCK_FLAG_VARIABLE   0x00000002

Device supports setting the clock rate.

◆ TIMER_NAME_PREFIX

#define TIMER_NAME_PREFIX   "Timer"

Name prefix for Timer Devices.

Timer specific constants

◆ TIMER_TYPE_NONE

#define TIMER_TYPE_NONE   0

Timer Device Types

◆ TIMER_TYPE_HARDWARE

#define TIMER_TYPE_HARDWARE   1

◆ TIMER_TYPE_MAX

#define TIMER_TYPE_MAX   1

◆ TIMER_STATE_DISABLED

#define TIMER_STATE_DISABLED   0

Timer Device States

◆ TIMER_STATE_ENABLED

#define TIMER_STATE_ENABLED   1

◆ TIMER_STATE_MAX

#define TIMER_STATE_MAX   1

◆ TIMER_FLAG_NONE

#define TIMER_FLAG_NONE   0x00000000

Timer Device Flags

◆ TIMER_FLAG_WRAPPING

#define TIMER_FLAG_WRAPPING   0x00000001

Device provides a wrapping or self reloading counter.

◆ TIMER_FLAG_COUNTER

#define TIMER_FLAG_COUNTER   0x00000002

Device will appear as a continuously incrementing counter when read.

◆ TIMER_FLAG_DOWN

#define TIMER_FLAG_DOWN   0x00000004

Device counts down from the starting value to zero (And optionally triggers an event).

◆ TIMER_EVENT_FLAG_NONE

#define TIMER_EVENT_FLAG_NONE   0x00000000

Timer Event Flags

◆ TIMER_EVENT_FLAG_REPEAT

#define TIMER_EVENT_FLAG_REPEAT   0x00000001

Event will be repeated until cancelled.

◆ TIMER_EVENT_FLAG_INTERRUPT

#define TIMER_EVENT_FLAG_INTERRUPT   0x00000002

Event will be dispatched by interrupt handler (If applicable).

◆ RANDOM_NAME_PREFIX

#define RANDOM_NAME_PREFIX   "Random"

Name prefix for Random Devices.

Caution: Events called by the interrupt handler must obey interrupt rules with regard to locks, memory allocation and latency Random specific constants

◆ RANDOM_TYPE_NONE

#define RANDOM_TYPE_NONE   0

Random Device Types

◆ RANDOM_TYPE_HARDWARE

#define RANDOM_TYPE_HARDWARE   1

◆ RANDOM_TYPE_SOFTWARE

#define RANDOM_TYPE_SOFTWARE   2

◆ RANDOM_TYPE_MAX

#define RANDOM_TYPE_MAX   2

◆ RANDOM_STATE_DISABLED

#define RANDOM_STATE_DISABLED   0

Random Device States

◆ RANDOM_STATE_ENABLED

#define RANDOM_STATE_ENABLED   1

◆ RANDOM_STATE_MAX

#define RANDOM_STATE_MAX   1

◆ RANDOM_FLAG_NONE

#define RANDOM_FLAG_NONE   0x00000000

Random Device Flags

◆ MAILBOX_NAME_PREFIX

#define MAILBOX_NAME_PREFIX   "Mailbox"

Name prefix for Mailbox Devices.

Mailbox specific constants

◆ MAILBOX_TYPE_NONE

#define MAILBOX_TYPE_NONE   0

Mailbox Device Types

◆ MAILBOX_TYPE_GPU

#define MAILBOX_TYPE_GPU   1

◆ MAILBOX_TYPE_LOCAL

#define MAILBOX_TYPE_LOCAL   2

◆ MAILBOX_TYPE_MAX

#define MAILBOX_TYPE_MAX   2

◆ MAILBOX_STATE_DISABLED

#define MAILBOX_STATE_DISABLED   0

Mailbox Device States

◆ MAILBOX_STATE_ENABLED

#define MAILBOX_STATE_ENABLED   1

◆ MAILBOX_STATE_MAX

#define MAILBOX_STATE_MAX   1

◆ MAILBOX_FLAG_NONE

#define MAILBOX_FLAG_NONE   0x00000000

Mailbox Device Flags

◆ WATCHDOG_NAME_PREFIX

#define WATCHDOG_NAME_PREFIX   "Watchdog"

Name prefix for Watchdog Devices.

Watchdog specific constants

◆ WATCHDOG_TYPE_NONE

#define WATCHDOG_TYPE_NONE   0

Watchdog Device Types

◆ WATCHDOG_TYPE_HARDWARE

#define WATCHDOG_TYPE_HARDWARE   1

◆ WATCHDOG_TYPE_MAX

#define WATCHDOG_TYPE_MAX   1

◆ WATCHDOG_STATE_DISABLED

#define WATCHDOG_STATE_DISABLED   0

Watchdog Device States

◆ WATCHDOG_STATE_ENABLED

#define WATCHDOG_STATE_ENABLED   1

◆ WATCHDOG_STATE_MAX

#define WATCHDOG_STATE_MAX   1

◆ WATCHDOG_FLAG_NONE

#define WATCHDOG_FLAG_NONE   0x00000000

Watchdog Device Flags

Typedef Documentation

◆ DEVICE

typedef struct _DEVICE DEVICE

Device specific types

◆ device_enumerate_cb

typedef uint32_t STDCALL(* device_enumerate_cb) (DEVICE *device, void *data)

Device Enumeration Callback

◆ device_notification_cb

typedef uint32_t STDCALL(* device_notification_cb) (DEVICE *device, void *data, uint32_t notification)

Device Notification Callback

◆ DEVICE_FIRMWARE

◆ device_firmware_handler

typedef uint32_t STDCALL(* device_firmware_handler) (DEVICE_FIRMWARE *firmware, uint32_t action, HANDLE *handle, void *buffer, uint32_t *value)

Device Firmware Handler

◆ FIRMWARE_HANDLE

◆ NOTIFIER

typedef struct _NOTIFIER NOTIFIER

Notifier Entry

◆ NOTIFIER_TASK

typedef struct _NOTIFIER_TASK NOTIFIER_TASK

Notifier Task

◆ NOTIFIER_RETRY

Notifier Retry

◆ DRIVER

typedef struct _DRIVER DRIVER

Driver specific types

◆ driver_enumerate_cb

typedef uint32_t STDCALL(* driver_enumerate_cb) (DRIVER *driver, void *data)

Driver Enumeration Callback

◆ HOST

typedef struct _HOST HOST

Host specific types

◆ host_enumerate_cb

typedef uint32_t STDCALL(* host_enumerate_cb) (HOST *host, void *data)

Host Enumeration Callback

◆ CLOCK_PROPERTIES

Clock specific types Clock Properties

◆ CLOCK_DEVICE

typedef struct _CLOCK_DEVICE CLOCK_DEVICE

Clock Device

◆ clock_enumerate_cb

typedef uint32_t STDCALL(* clock_enumerate_cb) (CLOCK_DEVICE *clock, void *data)

Clock Enumeration Callback

◆ clock_notification_cb

typedef uint32_t STDCALL(* clock_notification_cb) (DEVICE *device, void *data, uint32_t notification)

Clock Notification Callback

◆ clock_device_start_proc

typedef uint32_t STDCALL(* clock_device_start_proc) (CLOCK_DEVICE *clock)

Clock Device Methods

◆ clock_device_stop_proc

typedef uint32_t STDCALL(* clock_device_stop_proc) (CLOCK_DEVICE *clock)

◆ clock_device_read_proc

typedef uint32_t STDCALL(* clock_device_read_proc) (CLOCK_DEVICE *clock)

◆ clock_device_read64_proc

typedef int64_t STDCALL(* clock_device_read64_proc) (CLOCK_DEVICE *clock)

◆ clock_device_write64_proc

typedef uint32_t STDCALL(* clock_device_write64_proc) (CLOCK_DEVICE *clock, int64_t value)

◆ clock_device_get_rate_proc

typedef uint32_t STDCALL(* clock_device_get_rate_proc) (CLOCK_DEVICE *clock)

◆ clock_device_set_rate_proc

typedef uint32_t STDCALL(* clock_device_set_rate_proc) (CLOCK_DEVICE *clock, uint32_t rate)

◆ clock_device_get_properties_proc

typedef uint32_t STDCALL(* clock_device_get_properties_proc) (CLOCK_DEVICE *clock, CLOCK_PROPERTIES *properties)

◆ timer_cb

Counter callback from Platform.

Timer specific types

◆ TIMER_PROPERTIES

Timer Properties

◆ TIMER_DEVICE

typedef struct _TIMER_DEVICE TIMER_DEVICE

Forward declared for TimerWaiter.

Timer Device

◆ TIMER_WAITER

typedef struct _TIMER_WAITER TIMER_WAITER

Timer Waiter (TTimerEvent is used already by the Threads unit)

◆ timer_enumerate_cb

typedef uint32_t STDCALL(* timer_enumerate_cb) (TIMER_DEVICE *timer, void *data)

Timer Enumeration Callback

◆ timer_notification_cb

typedef uint32_t STDCALL(* timer_notification_cb) (DEVICE *device, void *data, uint32_t notification)

Timer Notification Callback

◆ timer_device_start_proc

typedef uint32_t STDCALL(* timer_device_start_proc) (TIMER_DEVICE *timer)

Timer Device Methods

◆ timer_device_stop_proc

typedef uint32_t STDCALL(* timer_device_stop_proc) (TIMER_DEVICE *timer)

◆ timer_device_read_proc

typedef uint32_t STDCALL(* timer_device_read_proc) (TIMER_DEVICE *timer)

◆ timer_device_read64_proc

typedef int64_t STDCALL(* timer_device_read64_proc) (TIMER_DEVICE *timer)

◆ timer_device_wait_proc

typedef uint32_t STDCALL(* timer_device_wait_proc) (TIMER_DEVICE *timer)

◆ timer_device_event_proc

typedef uint32_t STDCALL(* timer_device_event_proc) (TIMER_DEVICE *timer, uint32_t flags, timer_cb callback, void *data)

◆ timer_device_cancel_proc

typedef uint32_t STDCALL(* timer_device_cancel_proc) (TIMER_DEVICE *timer)

◆ timer_device_get_rate_proc

typedef uint32_t STDCALL(* timer_device_get_rate_proc) (TIMER_DEVICE *timer)

◆ timer_device_set_rate_proc

typedef uint32_t STDCALL(* timer_device_set_rate_proc) (TIMER_DEVICE *timer, uint32_t rate)

◆ timer_device_get_interval_proc

typedef uint32_t STDCALL(* timer_device_get_interval_proc) (TIMER_DEVICE *timer)

◆ timer_device_set_interval_proc

typedef uint32_t STDCALL(* timer_device_set_interval_proc) (TIMER_DEVICE *timer, uint32_t interval)

◆ timer_device_get_properties_proc

typedef uint32_t STDCALL(* timer_device_get_properties_proc) (TIMER_DEVICE *timer, TIMER_PROPERTIES *properties)

◆ RANDOM_DEVICE

typedef struct _RANDOM_DEVICE RANDOM_DEVICE

Random specific types

◆ random_enumerate_cb

typedef uint32_t STDCALL(* random_enumerate_cb) (RANDOM_DEVICE *random, void *data)

Random Enumeration Callback

◆ random_notification_cb

typedef uint32_t STDCALL(* random_notification_cb) (DEVICE *device, void *data, uint32_t notification)

Random Notification Callback

◆ random_device_start_proc

typedef uint32_t STDCALL(* random_device_start_proc) (RANDOM_DEVICE *random)

Random Device Methods

◆ random_device_stop_proc

typedef uint32_t STDCALL(* random_device_stop_proc) (RANDOM_DEVICE *random)

◆ random_device_seed_proc

typedef uint32_t STDCALL(* random_device_seed_proc) (RANDOM_DEVICE *random, uint32_t seed)

◆ random_device_read_byte_proc

typedef uint8_t STDCALL(* random_device_read_byte_proc) (RANDOM_DEVICE *random)

◆ random_device_read_word_proc

typedef uint16_t STDCALL(* random_device_read_word_proc) (RANDOM_DEVICE *random)

◆ random_device_read_longword_proc

typedef uint32_t STDCALL(* random_device_read_longword_proc) (RANDOM_DEVICE *random)

◆ random_device_read_long_long_proc

typedef int64_t STDCALL(* random_device_read_long_long_proc) (RANDOM_DEVICE *random)

◆ random_device_read_double_proc

typedef double_t STDCALL(* random_device_read_double_proc) (RANDOM_DEVICE *random)

◆ MAILBOX_DEVICE

Mailbox specific types

◆ mailbox_enumerate_cb

typedef uint32_t STDCALL(* mailbox_enumerate_cb) (MAILBOX_DEVICE *mailbox, void *data)

Mailbox Enumeration Callback

◆ mailbox_notification_cb

typedef uint32_t STDCALL(* mailbox_notification_cb) (DEVICE *device, void *data, uint32_t notification)

Mailbox Notification Callback

◆ mailbox_device_start_proc

typedef uint32_t STDCALL(* mailbox_device_start_proc) (MAILBOX_DEVICE *mailbox)

Mailbox Device Methods

◆ mailbox_device_stop_proc

typedef uint32_t STDCALL(* mailbox_device_stop_proc) (MAILBOX_DEVICE *mailbox)

◆ mailbox_device_receive_proc

typedef uint32_t STDCALL(* mailbox_device_receive_proc) (MAILBOX_DEVICE *mailbox, uint32_t channel)

◆ mailbox_device_send_proc

typedef uint32_t STDCALL(* mailbox_device_send_proc) (MAILBOX_DEVICE *mailbox, uint32_t channel, uint32_t data)

◆ mailbox_device_call_proc

typedef uint32_t STDCALL(* mailbox_device_call_proc) (MAILBOX_DEVICE *mailbox, uint32_t channel, uint32_t data, uint32_t *response)

◆ mailbox_device_get_timeout_proc

typedef uint32_t STDCALL(* mailbox_device_get_timeout_proc) (MAILBOX_DEVICE *mailbox)

◆ mailbox_device_set_timeout_proc

typedef uint32_t STDCALL(* mailbox_device_set_timeout_proc) (MAILBOX_DEVICE *mailbox, uint32_t timeout)

◆ WATCHDOG_DEVICE

Watchdog specific types

◆ watchdog_enumerate_cb

typedef uint32_t STDCALL(* watchdog_enumerate_cb) (WATCHDOG_DEVICE *watchdog, void *data)

Watchdog Enumeration Callback

◆ watchdog_notification_cb

typedef uint32_t STDCALL(* watchdog_notification_cb) (DEVICE *device, void *data, uint32_t notification)

Watchdog Notification Callback

◆ watchdog_device_start_proc

typedef uint32_t STDCALL(* watchdog_device_start_proc) (WATCHDOG_DEVICE *watchdog)

Watchdog Device Methods

◆ watchdog_device_stop_proc

typedef uint32_t STDCALL(* watchdog_device_stop_proc) (WATCHDOG_DEVICE *watchdog)

◆ watchdog_device_refresh_proc

typedef uint32_t STDCALL(* watchdog_device_refresh_proc) (WATCHDOG_DEVICE *watchdog)

◆ watchdog_device_get_remain_proc

typedef uint32_t STDCALL(* watchdog_device_get_remain_proc) (WATCHDOG_DEVICE *watchdog)

◆ watchdog_device_get_timeout_proc

typedef uint32_t STDCALL(* watchdog_device_get_timeout_proc) (WATCHDOG_DEVICE *watchdog)

◆ watchdog_device_set_timeout_proc

typedef uint32_t STDCALL(* watchdog_device_set_timeout_proc) (WATCHDOG_DEVICE *watchdog, uint32_t timeout)

Function Documentation

◆ device_create()

DEVICE *STDCALL device_create ( void )

Create a new Device entry.

Device Functions

Returns
Pointer to new Device entry or nil if device could not be created

◆ device_create_ex()

DEVICE *STDCALL device_create_ex ( uint32_t size)

Create a new Device entry.

Parameters
SizeSize in bytes to allocate for new device (Including the device entry)
Returns
Pointer to new Device entry or nil if device could not be created

◆ device_destroy()

uint32_t STDCALL device_destroy ( DEVICE * device)

Destroy an existing Device entry.

Parameters
DeviceThe device to destroy
Returns
ERROR_SUCCESS if completed or another error code on failure

◆ device_get_name()

uint32_t STDCALL device_get_name ( DEVICE * device,
char * name,
uint32_t len )

Get the name of the supplied Device.

Parameters
DeviceThe device to get the name from
Returns
The name of the device or a blank string on error

◆ device_set_name()

uint32_t STDCALL device_set_name ( DEVICE * device,
const char * name )

Set the name of the supplied Device.

Parameters
DeviceThe device to set the name for
NameThe device name to set
Returns
ERROR_SUCCESS if completed or another error code on failure

◆ device_get_description()

uint32_t STDCALL device_get_description ( DEVICE * device,
char * name,
uint32_t len )

Get the description of the supplied Device.

Parameters
DeviceThe device to get the description from
Returns
The description of the device or a blank string on error

◆ device_set_description()

uint32_t STDCALL device_set_description ( DEVICE * device,
const char * description )

Set the description of the supplied Device.

Parameters
DeviceThe device to set the description for
DescriptionThe device description to set
Returns
ERROR_SUCCESS if completed or another error code on failure

◆ device_register()

uint32_t STDCALL device_register ( DEVICE * device)

Register a new Device in the Device table.

Parameters
DeviceThe device to register
Returns
ERROR_SUCCESS if completed or another error code on failure

◆ device_deregister()

uint32_t STDCALL device_deregister ( DEVICE * device)

Deregister a Device from the Device table.

Parameters
DeviceThe device to deregister
Returns
ERROR_SUCCESS if completed or another error code on failure

◆ device_find()

DEVICE *STDCALL device_find ( uint32_t deviceclass,
uint32_t deviceid )

Find a device by ID in the device table.

Parameters
DeviceClassThe class of the device to find (DEVICE_CLASS_ANY for all classes)
DeviceIdThe ID number of the device to find (DEVICE_ID_ANY for all devices)
Returns
Pointer to device entry or nil if not found

◆ device_find_by_device_data()

DEVICE *STDCALL device_find_by_device_data ( void * devicedata)

Find a device with matching DeviceData property in the device table.

Parameters
DeviceDataThe value to match against the DeviceData property
Returns
Pointer to device entry or nil if not found

◆ device_find_by_name()

DEVICE *STDCALL device_find_by_name ( const char * name)

Find a device by name in the device table.

Parameters
NameThe name of the device to find (eg Timer0)
Returns
Pointer to device entry or nil if not found

◆ device_find_by_name_ex()

DEVICE *STDCALL device_find_by_name_ex ( uint32_t deviceclass,
const char * name )

Find a device by class and name in the device table.

Parameters
DeviceClassThe class of the device to find (eg DEVICE_CLASS_USB) (DEVICE_CLASS_ANY for all classes)
NameThe name of the device to find (eg USB0)
Returns
Pointer to device entry or nil if not found

◆ device_find_by_description()

DEVICE *STDCALL device_find_by_description ( const char * description)

Find a device by description in the device table.

Parameters
DescriptionThe description of the device to find (eg BCM2836 ARM Timer)
Returns
Pointer to device entry or nil if not found

◆ device_find_by_description_ex()

DEVICE *STDCALL device_find_by_description_ex ( uint32_t deviceclass,
const char * description )

Find a device by class and description in the device table.

Parameters
DeviceClassThe class of the device to find (eg DEVICE_CLASS_USB) (DEVICE_CLASS_ANY for all classes)
DescriptionThe description of the device to find (eg BCM2836 ARM Timer)
Returns
Pointer to device entry or nil if not found

◆ device_enumerate()

uint32_t STDCALL device_enumerate ( uint32_t deviceclass,
device_enumerate_cb callback,
void * data )

Enumerate all devices in the device table.

Parameters
DeviceClassThe class of device to enumerate (DEVICE_CLASS_ANY for all classes)
CallbackThe callback function to call for each device in the table
DataA private data pointer to pass to callback for each device in the table
Returns
ERROR_SUCCESS if completed or another error code on failure

◆ device_notification()

uint32_t STDCALL device_notification ( DEVICE * device,
uint32_t deviceclass,
device_notification_cb callback,
void * data,
uint32_t notification,
uint32_t flags )

Register a notification for device changes.

Parameters
DeviceThe device to notify changes for (Optional, pass nil for all devices)
DeviceClassThe class of device to notify changes for (DEVICE_CLASS_ANY for all classes)
CallbackThe function to call when a notification event occurs
DataA private data pointer to pass to callback when a notification event occurs
NotificationThe events to register for notification of (eg DEVICE_NOTIFICATION_REGISTER)
FlagsThe flags to control the notification (eg NOTIFIER_FLAG_WORKER)

◆ device_firmware_create()

BOOL STDCALL device_firmware_create ( uint32_t deviceclass,
const char * name,
void * buffer,
uint32_t size )

Create a new block (memory) based firmware entry using the standard block firmware handler.

Parameters
DeviceClassThe class of device this firmware applies to (eg DEVICE_CLASS_NETWORK)(or DEVICE_CLASS_ANY for all devices)
BufferA pointer to a block of memory containing the firmware to be provided to requesting devices
SizeThe size in bytes of the block pointed to by buffer
Returns
True if the new firmware entry was added or False on failure
Note
Can be used by device drivers to register built in firmware as a device firmware provider
The supplied buffer can be statically or dynamically allocated but must not be freed once the device firmware has been created

◆ device_firmware_register()

HANDLE STDCALL device_firmware_register ( uint32_t deviceclass,
const char * name,
device_firmware_handler handler )

Register a new device firmware handler for acquiring device specific firmware.

Parameters
DeviceClassThe class of device this firmware applies to (eg DEVICE_CLASS_NETWORK)(or DEVICE_CLASS_ANY for all devices)
NameThe name of the device firmware, device specific may be a filename, a device model, id or type
HandlerThe handler function which is to be called when a device requests this firmware
Returns
A handle for the new firmware handler on success or INVALID_HANDLE_VALUE on failure
Note
Used by device firmware providers to register firmware for device drivers

◆ device_firmware_deregister()

uint32_t STDCALL device_firmware_deregister ( HANDLE handle)

Deregister an existing device firmware handler.

Parameters
HandleThe handle returned by Register
Returns
ERROR_SUCCESS on completion or another error code on failure
Note
Used by device firmware providers to deregister firmware for device drivers

◆ device_firmware_find()

DEVICE_FIRMWARE *STDCALL device_firmware_find ( uint32_t deviceclass,
const char * name )

Find an existing device firmware handler for a specified device.

Parameters
DeviceClassThe class of device for the firmware (eg DEVICE_CLASS_NETWORK)(or DEVICE_CLASS_ANY for any class)
NameThe name of the device firmware which is a device specific value such as a filename, a device model, id or type
Returns
A pointer to the device firmware entry which contains the details of the handler
Note
Used internally to locate compatible firmware for a device firmware open request

◆ device_firmware_find_by_handle()

DEVICE_FIRMWARE *STDCALL device_firmware_find_by_handle ( HANDLE handle)

Find an existing device firmware handler from a returned handle.

Parameters
HandleA handle to the firmware returned by Open or Acquire
Returns
A pointer to the device firmware entry which contains the details of the handler
Note
Used internally to locate referenced firmware for a device firmware request

◆ device_firmware_open()

uint32_t STDCALL device_firmware_open ( uint32_t deviceclass,
const char * name,
uint32_t timeout,
HANDLE * handle )

Open the firmware for a specified device from a registered handler.

Parameters
DeviceClassThe class of device for the firmware (eg DEVICE_CLASS_NETWORK)(or DEVICE_CLASS_ANY for any class)
NameThe name of the device firmware which is a device specific value such as a filename, a device model, id or type
TimeoutNumber of milliseconds to wait for the device firmware to be ready (0 to not wait, INFINITE to wait forever)
HandleA variable to receive a handle to the firmware on return
Returns
ERROR_SUCCESS on completion, ERROR_NOT_FOUND if no handler can supply firmware or another error code on failure
Note
A handler may return ERROR_NOT_READY if the firmware may be accepted but is not available yet

◆ device_firmware_close()

uint32_t STDCALL device_firmware_close ( HANDLE handle)

Close a handle to the firmware for a specified device from a registered handler.

Parameters
HandleThe handle to the firmware as returned by Open
Returns
ERROR_SUCCESS on completion, ERROR_NOT_FOUND if no handler accepts this firmware or another error code on failure

◆ device_firmware_size()

int32_t STDCALL device_firmware_size ( HANDLE handle)

Return the size of the firmware for a specified device from a registered handler.

Parameters
HandleThe handle to the firmware as returned by Open
Returns
The size of the firmware on success or -1 on failure

◆ device_firmware_seek()

int32_t STDCALL device_firmware_seek ( HANDLE handle,
int32_t position )

Seek to a position within the firmware for a specified device from a registered handler.

Parameters
HandleThe handle to the firmware as returned by Open
PositionThe byte position within the firmware to seek to
Returns
The new position within the firmware on success or -1 on failure

◆ device_firmware_read()

int32_t STDCALL device_firmware_read ( HANDLE handle,
void * buffer,
int32_t count )

Read into a buffer from the firmware for a specified device from a registered handler.

Parameters
HandleThe handle to the firmware as returned by Open
BufferA pointer to a buffer to receive the data
CountThe maximum number of bytes to be read
Returns
The number of bytes read on success or -1 on failure

◆ device_firmware_acquire()

uint32_t STDCALL device_firmware_acquire ( uint32_t deviceclass,
const char * name,
uint32_t timeout,
HANDLE * handle,
void * buffer,
uint32_t * size )

Acquire a memory block containing the firmware for a specified device from a registered handler.

Parameters
DeviceClassThe class of device for the firmware (eg DEVICE_CLASS_NETWORK)(or DEVICE_CLASS_ANY for any class)
NameThe name of the device firmware which is a device specific value such as a filename, a device model, id or type
TimeoutNumber of milliseconds to wait for the device firmware to be ready (0 to not wait, INFINITE to wait forever)
HandleA variable to receive a handle to the firmware on return
BufferA variable to receive a pointer to the block of memory containing the firmware on return
SizeA variable to receive the size of the memory block pointed to by buffer on return
Returns
ERROR_SUCCESS on completion, ERROR_NOT_FOUND if no handler can supply firmware or another error code on failure
Note
A handler may return ERROR_NOT_READY if the firmware may be accepted but is not available yet
A handler may return ERROR_MORE_DATA if the size of the firmware is larger than can be returned in a single buffer

◆ device_firmware_release()

uint32_t STDCALL device_firmware_release ( HANDLE handle,
void * buffer,
uint32_t size )

Release a memory block containing the firmware for a specified device from a registered handler.

Parameters
HandleThe handle to the firmware as returned by Acquire
BufferThe pointer to the block of memory containing the firmware as returned by Acquire
SizeThe size of the memory block as returned by Acquire
Returns
ERROR_SUCCESS on completion, ERROR_NOT_FOUND if no handler accepts this firmware or another error code on failure

◆ notifier_allocate()

NOTIFIER *STDCALL notifier_allocate ( DEVICE * device,
uint32_t deviceclass,
device_notification_cb callback,
void * data,
uint32_t notification,
uint32_t flags )

Create and Register a new Notifier entry in the Notifier table.

◆ notifier_release()

uint32_t STDCALL notifier_release ( NOTIFIER * notifier)

Deregister and Destroy a Notifier from the Notifier table.

◆ notifier_find()

NOTIFIER *STDCALL notifier_find ( DEVICE * device,
uint32_t deviceclass,
device_notification_cb callback,
void * data )

◆ notifier_notify()

uint32_t STDCALL notifier_notify ( DEVICE * device,
uint32_t notification )

◆ notifier_retry()

void STDCALL notifier_retry ( NOTIFIER_RETRY * retry)

◆ notifier_worker()

void STDCALL notifier_worker ( NOTIFIER_TASK * task)

◆ driver_create()

DRIVER *STDCALL driver_create ( void )

Create a new Driver entry.

Driver Functions

Returns
Pointer to new Driver entry or nil if driver could not be created

◆ driver_create_ex()

DRIVER *STDCALL driver_create_ex ( uint32_t size)

Create a new Driver entry.

Parameters
SizeSize in bytes to allocate for new driver (Including the driver entry)
Returns
Pointer to new Driver entry or nil if driver could not be created

◆ driver_destroy()

uint32_t STDCALL driver_destroy ( DRIVER * driver)

Destroy an existing Driver entry.

Parameters
DriverThe driver to destroy
Returns
ERROR_SUCCESS if completed or another error code on failure

◆ driver_get_name()

uint32_t STDCALL driver_get_name ( DRIVER * driver,
char * name,
uint32_t len )

Get the name of the supplied Driver.

Parameters
DriverThe driver to get the name from
Returns
The name of the driver or a blank string on error

◆ driver_set_name()

uint32_t STDCALL driver_set_name ( DRIVER * driver,
const char * name )

Set the name of the supplied Driver.

Parameters
DriverThe driver to set the name for
NameThe driver name to set
Returns
ERROR_SUCCESS if completed or another error code on failure

◆ driver_register()

uint32_t STDCALL driver_register ( DRIVER * driver)

Register a new Driver in the Driver table.

Parameters
DriverThe driver to register
Returns
ERROR_SUCCESS if completed or another error code on failure

◆ driver_deregister()

uint32_t STDCALL driver_deregister ( DRIVER * driver)

Deregister a Driver from the Driver table.

Parameters
DriverThe driver to deregister
Returns
ERROR_SUCCESS if completed or another error code on failure

◆ driver_find()

DRIVER *STDCALL driver_find ( uint32_t driverclass,
uint32_t driverid )

Find a driver by ID in the driver table.

Parameters
DriverClassThe class of the driver to find (DRIVER_CLASS_ANY for all classes)
DriverIdThe ID number of the driver to find
Returns
Pointer to driver entry or nil if not found

◆ driver_find_by_name()

DRIVER *STDCALL driver_find_by_name ( const char * name)

Find a driver by name in the driver table.

Parameters
NameThe name of the driver to find (eg USB Hub Driver)
Returns
Pointer to driver entry or nil if not found

◆ driver_enumerate()

uint32_t STDCALL driver_enumerate ( uint32_t driverclass,
driver_enumerate_cb callback,
void * data )

Enumerate all drivers in the driver table.

Parameters
DriverClassThe class of driver to enumerate (DRIVER_CLASS_ANY for all classes)
CallbackThe callback function to call for each driver in the table
DataA private data pointer to pass to callback for each driver in the table
Returns
ERROR_SUCCESS if completed or another error code on failure

◆ clock_device_start()

uint32_t STDCALL clock_device_start ( CLOCK_DEVICE * clock)

Start the counter of the specified Clock device.

Clock Device Functions

Parameters
ClockThe Clock device to start
Returns
ERROR_SUCCESS if completed or another error code on failure

◆ clock_device_stop()

uint32_t STDCALL clock_device_stop ( CLOCK_DEVICE * clock)

Stop the counter of the specified Clock device.

Parameters
ClockThe Clock device to stop
Returns
ERROR_SUCCESS if completed or another error code on failure

◆ clock_device_read()

uint32_t STDCALL clock_device_read ( CLOCK_DEVICE * clock)

Read the counter value of the specified Clock device.

Parameters
ClockThe Clock device to read from
Returns
The 32 bit counter value of the clock or 0 on failure

◆ clock_device_read64()

int64_t STDCALL clock_device_read64 ( CLOCK_DEVICE * clock)

Read the counter value of the specified Clock device.

Parameters
ClockThe Clock device to read from
Returns
The 64 bit counter value of the clock or 0 on failure

◆ clock_device_write64()

uint32_t STDCALL clock_device_write64 ( CLOCK_DEVICE * clock,
int64_t value )

Write the counter value of the specified Clock device.

Parameters
ClockThe Clock device to write to
ValueThe counter value to write
Returns
ERROR_SUCCESS if the counter was set or another error code on failure
Note
Not all clock devices support setting the counter value, will return an error if unsupported

◆ clock_device_get_rate()

uint32_t STDCALL clock_device_get_rate ( CLOCK_DEVICE * clock)

Get the current clock rate in Hz of the specified Clock device.

Parameters
ClockThe Clock device to get the rate from
Returns
The current clock rate in Hz or 0 on failure

◆ clock_device_set_rate()

uint32_t STDCALL clock_device_set_rate ( CLOCK_DEVICE * clock,
uint32_t rate )

Set the current clock rate in Hz of the specified Clock device.

Parameters
ClockThe Clock device to set the rate for
RateThe clock rate in Hz to set
Returns
ERROR_SUCCESS if the clock rate was set or another error code on failure
Note
Not all clock devices support setting the clock rate, will return an error if unsupported

◆ clock_device_properties()

uint32_t STDCALL clock_device_properties ( CLOCK_DEVICE * clock,
CLOCK_PROPERTIES * properties )

Get the properties for the specified Clock device.

Parameters
ClockThe Clock device to get properties from
PropertiesPointer to a TClockProperties structure to fill in
Returns
ERROR_SUCCESS if completed or another error code on failure
Note
Replaced by ClockDeviceGetProperties for consistency

◆ clock_device_get_properties()

uint32_t STDCALL clock_device_get_properties ( CLOCK_DEVICE * clock,
CLOCK_PROPERTIES * properties )

Get the properties for the specified Clock device.

Parameters
ClockThe Clock device to get properties from
PropertiesPointer to a TClockProperties structure to fill in
Returns
ERROR_SUCCESS if completed or another error code on failure

◆ clock_device_create()

CLOCK_DEVICE *STDCALL clock_device_create ( void )

Create a new Clock entry.

Returns
Pointer to new Clock entry or nil if Clock could not be created

◆ clock_device_create_ex()

CLOCK_DEVICE *STDCALL clock_device_create_ex ( uint32_t size)

Create a new Clock entry.

Parameters
SizeSize in bytes to allocate for new Clock (Including the Clock entry)
Returns
Pointer to new Clock entry or nil if Clock could not be created

◆ clock_device_destroy()

uint32_t STDCALL clock_device_destroy ( CLOCK_DEVICE * clock)

Destroy an existing Clock entry.

Parameters
ClockThe clock device to destroy
Returns
ERROR_SUCCESS if completed or another error code on failure

◆ clock_device_register()

uint32_t STDCALL clock_device_register ( CLOCK_DEVICE * clock)

Register a new Clock in the Clock table.

Parameters
ClockThe clock device to register
Returns
ERROR_SUCCESS if completed or another error code on failure

◆ clock_device_deregister()

uint32_t STDCALL clock_device_deregister ( CLOCK_DEVICE * clock)

Deregister a Clock from the Clock table.

Parameters
ClockThe clock device to deregister
Returns
ERROR_SUCCESS if completed or another error code on failure

◆ clock_device_find()

CLOCK_DEVICE *STDCALL clock_device_find ( uint32_t clockid)

Find a clock device by ID in the clock table.

Parameters
ClockIdThe ID number of the clock to find
Returns
Pointer to clock device entry or nil if not found

◆ clock_device_find_by_name()

CLOCK_DEVICE *STDCALL clock_device_find_by_name ( const char * name)

Find a clock device by name in the clock table.

Parameters
NameThe name of the clock to find (eg Clock0)
Returns
Pointer to clock device entry or nil if not found

◆ clock_device_find_by_description()

CLOCK_DEVICE *STDCALL clock_device_find_by_description ( const char * description)

Find a clock device by description in the clock table.

Parameters
DescriptionThe description of the clock to find (eg BCM2836 ARM Timer Clock)
Returns
Pointer to clock device entry or nil if not found

◆ clock_device_enumerate()

uint32_t STDCALL clock_device_enumerate ( clock_enumerate_cb callback,
void * data )

Enumerate all clock devices in the clock table.

Parameters
CallbackThe callback function to call for each clock in the table
DataA private data pointer to pass to callback for each clock in the table
Returns
ERROR_SUCCESS if completed or another error code on failure

◆ clock_device_notification()

uint32_t STDCALL clock_device_notification ( CLOCK_DEVICE * clock,
clock_notification_cb callback,
void * data,
uint32_t notification,
uint32_t flags )

Register a notification for clock device changes.

Parameters
ClockThe clock device to notify changes for (Optional, pass nil for all clocks)
CallbackThe function to call when a notification event occurs
DataA private data pointer to pass to callback when a notification event occurs
NotificationThe events to register for notification of (eg DEVICE_NOTIFICATION_REGISTER)
FlagsThe flags to control the notification (eg NOTIFIER_FLAG_WORKER)

◆ timer_device_start()

uint32_t STDCALL timer_device_start ( TIMER_DEVICE * timer)

Start the clock and counter of the specified Timer device.

Timer Device Functions

Parameters
TimerThe Timer device to start
Returns
ERROR_SUCCESS if completed or another error code on failure

◆ timer_device_stop()

uint32_t STDCALL timer_device_stop ( TIMER_DEVICE * timer)

Stop the clock and counter of the specified Timer device.

Parameters
TimerThe Timer device to stop
Returns
ERROR_SUCCESS if completed or another error code on failure

◆ timer_device_read()

uint32_t STDCALL timer_device_read ( TIMER_DEVICE * timer)

Read the current value of the specified Timer device.

Parameters
TimerThe Timer device to read from
Returns
The 32 bit current value of the timer or 0 on failure

◆ timer_device_read64()

int64_t STDCALL timer_device_read64 ( TIMER_DEVICE * timer)

Read the current value of the specified Timer device.

Parameters
TimerThe Timer device to read from
Returns
The 64 bit current value of the timer or 0 on failure

◆ timer_device_wait()

uint32_t STDCALL timer_device_wait ( TIMER_DEVICE * timer)

Wait for the current interval to expire on the specified Timer device.

Parameters
TimerThe Timer device to wait for
Returns
ERROR_SUCCESS if the interval expired or another error code on failure

◆ timer_device_event()

uint32_t STDCALL timer_device_event ( TIMER_DEVICE * timer,
uint32_t flags,
timer_cb callback,
void * data )

Schedule a function to be called when the current interval expires on the specified Timer device.

Parameters
TimerThe Timer device to schedule the callback for
FlagsThe flags to control the event (eg TIMER_EVENT_FLAG_REPEAT)
CallbackThe function to be called when the interval expires
DataA pointer to be passed to the function when the interval expires (Optional)
Returns
ERROR_SUCCESS if the callback was scheduled successfully or another error code on failure

◆ timer_device_cancel()

uint32_t STDCALL timer_device_cancel ( TIMER_DEVICE * timer)

Cancel a previously scheduled event callback function on the specified Timer device.

Parameters
TimerThe Timer device to cancel the callback for
Returns
ERROR_SUCCESS if the callback was cancelled successfully or another error code on failure

◆ timer_device_get_rate()

uint32_t STDCALL timer_device_get_rate ( TIMER_DEVICE * timer)

Get the current clock rate in Hz of the specified Timer device.

Parameters
TimerThe Timer device to get the rate from
Returns
The current clock rate in Hz or 0 on failure

◆ timer_device_set_rate()

uint32_t STDCALL timer_device_set_rate ( TIMER_DEVICE * timer,
uint32_t rate )

Set the current clock rate in Hz of the specified Timer device.

Parameters
TimerThe Timer device to set the rate for
RateThe clock rate in Hz to set
Returns
ERROR_SUCCESS if the clock rate was set or another error code on failure

◆ timer_device_get_interval()

uint32_t STDCALL timer_device_get_interval ( TIMER_DEVICE * timer)

Get the current interval in ticks of the specified Timer device.

Parameters
TimerThe Timer device to get the interval from
Returns
The current interval in ticks or 0 on failure (or not set)
Note
The tick rate is determined by the clock rate

◆ timer_device_set_interval()

uint32_t STDCALL timer_device_set_interval ( TIMER_DEVICE * timer,
uint32_t interval )

Set the current interval in ticks of the specified Timer device.

Parameters
TimerThe Timer device to set the interval for
IntervalThe interval in ticks to set
Returns
ERROR_SUCCESS if the interval was set or another error code on failure
Note
The tick rate is determined by the clock rate

◆ timer_device_properties()

uint32_t STDCALL timer_device_properties ( TIMER_DEVICE * timer,
TIMER_PROPERTIES * properties )

Get the properties for the specified Timer device.

Parameters
TimerThe Timer device to get properties from
PropertiesPointer to a TTimerProperties structure to fill in
Returns
ERROR_SUCCESS if completed or another error code on failure
Note
Replaced by TimerDeviceGetProperties for consistency

◆ timer_device_get_properties()

uint32_t STDCALL timer_device_get_properties ( TIMER_DEVICE * timer,
TIMER_PROPERTIES * properties )

Get the properties for the specified Timer device.

Parameters
TimerThe Timer device to get properties from
PropertiesPointer to a TTimerProperties structure to fill in
Returns
ERROR_SUCCESS if completed or another error code on failure

◆ timer_device_create()

TIMER_DEVICE *STDCALL timer_device_create ( void )

Create a new Timer entry.

Returns
Pointer to new Timer entry or nil if Timer could not be created

◆ timer_device_create_ex()

TIMER_DEVICE *STDCALL timer_device_create_ex ( uint32_t size)

Create a new Timer entry.

Parameters
SizeSize in bytes to allocate for new Timer (Including the Timer entry)
Returns
Pointer to new Timer entry or nil if Timer could not be created

◆ timer_device_destroy()

uint32_t STDCALL timer_device_destroy ( TIMER_DEVICE * timer)

Destroy an existing Timer entry.

Parameters
TimerThe timer device to destroy
Returns
ERROR_SUCCESS if completed or another error code on failure

◆ timer_device_register()

uint32_t STDCALL timer_device_register ( TIMER_DEVICE * timer)

Register a new Timer in the Timer table.

Parameters
TimerThe timer device to register
Returns
ERROR_SUCCESS if completed or another error code on failure

◆ timer_device_deregister()

uint32_t STDCALL timer_device_deregister ( TIMER_DEVICE * timer)

Deregister a Timer from the Timer table.

Parameters
TimerThe timer device to deregister
Returns
ERROR_SUCCESS if completed or another error code on failure

◆ timer_device_find()

TIMER_DEVICE *STDCALL timer_device_find ( uint32_t timerid)

Find a timer device by ID in the timer table.

Parameters
TimerIdThe ID number of the timer to find
Returns
Pointer to timer device entry or nil if not found

◆ timer_device_find_by_name()

TIMER_DEVICE *STDCALL timer_device_find_by_name ( const char * name)

Find a timer device by name in the timer table.

Parameters
NameThe name of the timer to find (eg Timer0)
Returns
Pointer to timer device entry or nil if not found

◆ timer_device_find_by_description()

TIMER_DEVICE *STDCALL timer_device_find_by_description ( const char * description)

Find a timer device by description in the timer table.

Parameters
DescriptionThe description of the timer to find (eg BCM2836 ARM Timer)
Returns
Pointer to timer device entry or nil if not found

◆ timer_device_enumerate()

uint32_t STDCALL timer_device_enumerate ( timer_enumerate_cb callback,
void * data )

Enumerate all timer devices in the timer table.

Parameters
CallbackThe callback function to call for each timer in the table
DataA private data pointer to pass to callback for each timer in the table
Returns
ERROR_SUCCESS if completed or another error code on failure

◆ timer_device_notification()

uint32_t STDCALL timer_device_notification ( TIMER_DEVICE * timer,
timer_notification_cb callback,
void * data,
uint32_t notification,
uint32_t flags )

Register a notification for timer device changes.

Parameters
TimerThe timer device to notify changes for (Optional, pass nil for all timers)
CallbackThe function to call when a notification event occurs
DataA private data pointer to pass to callback when a notification event occurs
NotificationThe events to register for notification of (eg DEVICE_NOTIFICATION_REGISTER)
FlagsThe flags to control the notification (eg NOTIFIER_FLAG_WORKER)

◆ random_device_start()

uint32_t STDCALL random_device_start ( RANDOM_DEVICE * random)

Random Device Functions

◆ random_device_stop()

uint32_t STDCALL random_device_stop ( RANDOM_DEVICE * random)

◆ random_device_seed()

uint32_t STDCALL random_device_seed ( RANDOM_DEVICE * random,
uint32_t seed )

◆ random_device_read_byte()

uint8_t STDCALL random_device_read_byte ( RANDOM_DEVICE * random)

◆ random_device_read_word()

uint16_t STDCALL random_device_read_word ( RANDOM_DEVICE * random)

◆ random_device_read_long_word()

uint32_t STDCALL random_device_read_long_word ( RANDOM_DEVICE * random)

◆ random_device_read_quad_word()

int64_t STDCALL random_device_read_quad_word ( RANDOM_DEVICE * random)

◆ random_device_read_double()

double_t STDCALL random_device_read_double ( RANDOM_DEVICE * random)

◆ random_device_read_extended()

double_t STDCALL random_device_read_extended ( RANDOM_DEVICE * random)
Note
Replaced by RandomDeviceReadDouble

◆ random_device_create()

RANDOM_DEVICE *STDCALL random_device_create ( void )

Create a new Random entry.

Returns
Pointer to new Random entry or nil if Random could not be created

◆ random_device_create_ex()

RANDOM_DEVICE *STDCALL random_device_create_ex ( uint32_t size)

Create a new Random entry.

Parameters
SizeSize in bytes to allocate for new Random (Including the Random entry)
Returns
Pointer to new Random entry or nil if Random could not be created

◆ random_device_destroy()

uint32_t STDCALL random_device_destroy ( RANDOM_DEVICE * random)

Destroy an existing Random entry.

◆ random_device_register()

uint32_t STDCALL random_device_register ( RANDOM_DEVICE * random)

Register a new Random in the Random table.

◆ random_device_deregister()

uint32_t STDCALL random_device_deregister ( RANDOM_DEVICE * random)

Deregister a Random from the Random table.

◆ random_device_find()

RANDOM_DEVICE *STDCALL random_device_find ( uint32_t randomid)

◆ random_device_find_by_name()

RANDOM_DEVICE *STDCALL random_device_find_by_name ( const char * name)

◆ random_device_find_by_description()

RANDOM_DEVICE *STDCALL random_device_find_by_description ( const char * description)

◆ random_device_enumerate()

uint32_t STDCALL random_device_enumerate ( random_enumerate_cb callback,
void * data )

◆ random_device_notification()

uint32_t STDCALL random_device_notification ( RANDOM_DEVICE * random,
random_notification_cb callback,
void * data,
uint32_t notification,
uint32_t flags )

◆ mailbox_device_start()

uint32_t STDCALL mailbox_device_start ( MAILBOX_DEVICE * mailbox)

Mailbox Device Functions

◆ mailbox_device_stop()

uint32_t STDCALL mailbox_device_stop ( MAILBOX_DEVICE * mailbox)

◆ mailbox_device_receive()

uint32_t STDCALL mailbox_device_receive ( MAILBOX_DEVICE * mailbox,
uint32_t channel )

◆ mailbox_device_send()

uint32_t STDCALL mailbox_device_send ( MAILBOX_DEVICE * mailbox,
uint32_t channel,
uint32_t data )

◆ mailbox_device_call()

uint32_t STDCALL mailbox_device_call ( MAILBOX_DEVICE * mailbox,
uint32_t channel,
uint32_t data,
uint32_t * response )

◆ mailbox_device_get_timeout()

uint32_t STDCALL mailbox_device_get_timeout ( MAILBOX_DEVICE * mailbox)

◆ mailbox_device_set_timeout()

uint32_t STDCALL mailbox_device_set_timeout ( MAILBOX_DEVICE * mailbox,
uint32_t timeout )

◆ mailbox_device_create()

MAILBOX_DEVICE *STDCALL mailbox_device_create ( void )

Create a new Mailbox entry.

Returns
Pointer to new Mailbox entry or nil if Mailbox could not be created

◆ mailbox_device_create_ex()

MAILBOX_DEVICE *STDCALL mailbox_device_create_ex ( uint32_t size)

Create a new Mailbox entry.

Parameters
SizeSize in bytes to allocate for new Mailbox (Including the Mailbox entry)
Returns
Pointer to new Mailbox entry or nil if Mailbox could not be created

◆ mailbox_device_destroy()

uint32_t STDCALL mailbox_device_destroy ( MAILBOX_DEVICE * mailbox)

Destroy an existing Mailbox entry.

◆ mailbox_device_register()

uint32_t STDCALL mailbox_device_register ( MAILBOX_DEVICE * mailbox)

Register a new Mailbox in the Mailbox table.

◆ mailbox_device_deregister()

uint32_t STDCALL mailbox_device_deregister ( MAILBOX_DEVICE * mailbox)

Deregister a Mailbox from the Mailbox table.

◆ mailbox_device_find()

MAILBOX_DEVICE *STDCALL mailbox_device_find ( uint32_t mailboxid)

◆ mailbox_device_find_by_name()

MAILBOX_DEVICE *STDCALL mailbox_device_find_by_name ( const char * name)

◆ mailbox_device_find_by_description()

MAILBOX_DEVICE *STDCALL mailbox_device_find_by_description ( const char * description)

◆ mailbox_device_enumerate()

uint32_t STDCALL mailbox_device_enumerate ( mailbox_enumerate_cb callback,
void * data )

◆ mailbox_device_notification()

uint32_t STDCALL mailbox_device_notification ( MAILBOX_DEVICE * mailbox,
mailbox_notification_cb callback,
void * data,
uint32_t notification,
uint32_t flags )

◆ watchdog_device_start()

uint32_t STDCALL watchdog_device_start ( WATCHDOG_DEVICE * watchdog)

Watchdog Device Functions

◆ watchdog_device_stop()

uint32_t STDCALL watchdog_device_stop ( WATCHDOG_DEVICE * watchdog)

◆ watchdog_device_refresh()

uint32_t STDCALL watchdog_device_refresh ( WATCHDOG_DEVICE * watchdog)

◆ watchdog_device_get_remain()

uint32_t STDCALL watchdog_device_get_remain ( WATCHDOG_DEVICE * watchdog)

◆ watchdog_device_get_timeout()

uint32_t STDCALL watchdog_device_get_timeout ( WATCHDOG_DEVICE * watchdog)

◆ watchdog_device_set_timeout()

uint32_t STDCALL watchdog_device_set_timeout ( WATCHDOG_DEVICE * watchdog,
uint32_t timeout )

◆ watchdog_device_create()

WATCHDOG_DEVICE *STDCALL watchdog_device_create ( void )

Create a new Watchdog entry.

Returns
Pointer to new Watchdog entry or nil if Watchdog could not be created

◆ watchdog_device_create_ex()

WATCHDOG_DEVICE *STDCALL watchdog_device_create_ex ( uint32_t size)

Create a new Watchdog entry.

Parameters
SizeSize in bytes to allocate for new Watchdog (Including the Watchdog entry)
Returns
Pointer to new Watchdog entry or nil if Watchdog could not be created

◆ watchdog_device_destroy()

uint32_t STDCALL watchdog_device_destroy ( WATCHDOG_DEVICE * watchdog)

Destroy an existing Watchdog entry.

◆ watchdog_device_register()

uint32_t STDCALL watchdog_device_register ( WATCHDOG_DEVICE * watchdog)

Register a new Watchdog in the Watchdog table.

◆ watchdog_device_deregister()

uint32_t STDCALL watchdog_device_deregister ( WATCHDOG_DEVICE * watchdog)

Deregister a Watchdog from the Watchdog table.

◆ watchdog_device_find()

WATCHDOG_DEVICE *STDCALL watchdog_device_find ( uint32_t watchdogid)

◆ watchdog_device_find_by_name()

WATCHDOG_DEVICE *STDCALL watchdog_device_find_by_name ( const char * name)

◆ watchdog_device_find_by_description()

WATCHDOG_DEVICE *STDCALL watchdog_device_find_by_description ( const char * description)

◆ watchdog_device_enumerate()

uint32_t STDCALL watchdog_device_enumerate ( watchdog_enumerate_cb callback,
void * data )

◆ watchdog_device_notification()

uint32_t STDCALL watchdog_device_notification ( WATCHDOG_DEVICE * watchdog,
watchdog_notification_cb callback,
void * data,
uint32_t notification,
uint32_t flags )

◆ device_get_count()

uint32_t STDCALL device_get_count ( void )

Get the current device count.

Device Helper Functions

◆ device_check()

DEVICE *STDCALL device_check ( DEVICE * device)

Check if the supplied Device is in the device table.

◆ notifier_get_count()

uint32_t STDCALL notifier_get_count ( void )

Get the current notifier count.

◆ notifier_check()

NOTIFIER *STDCALL notifier_check ( NOTIFIER * notifier)

Check if the supplied Notifier is in the notifier table.

◆ device_bus_to_string()

uint32_t STDCALL device_bus_to_string ( uint32_t devicebus,
char * string,
uint32_t len )

◆ device_state_to_string()

uint32_t STDCALL device_state_to_string ( uint32_t devicestate,
char * string,
uint32_t len )

◆ device_class_to_string()

uint32_t STDCALL device_class_to_string ( uint32_t deviceclass,
char * string,
uint32_t len )

◆ notification_to_string()

uint32_t STDCALL notification_to_string ( uint32_t notification,
char * string,
uint32_t len )

◆ driver_get_count()

uint32_t STDCALL driver_get_count ( void )

Get the current driver count.

Driver Helper Functions

◆ driver_check()

DRIVER *STDCALL driver_check ( DRIVER * driver)

Check if the supplied Driver is in the driver table.

◆ driver_state_to_string()

uint32_t STDCALL driver_state_to_string ( uint32_t driverstate,
char * string,
uint32_t len )

◆ driver_class_to_string()

uint32_t STDCALL driver_class_to_string ( uint32_t driverclass,
char * string,
uint32_t len )

◆ clock_device_get_count()

uint32_t STDCALL clock_device_get_count ( void )

Get the current clock device count.

Clock Device Helper Functions

◆ clock_device_get_default()

CLOCK_DEVICE *STDCALL clock_device_get_default ( void )

Get the current default clock device.

◆ clock_device_set_default()

uint32_t STDCALL clock_device_set_default ( CLOCK_DEVICE * clock)

Set the current default clock device.

◆ clock_device_check()

CLOCK_DEVICE *STDCALL clock_device_check ( CLOCK_DEVICE * clock)

Check if the supplied Clock is in the Clock table.

◆ clock_type_to_string()

uint32_t STDCALL clock_type_to_string ( uint32_t clocktype,
char * string,
uint32_t len )

Convert a Clock type value to a string.

◆ clock_state_to_string()

uint32_t STDCALL clock_state_to_string ( uint32_t clockstate,
char * string,
uint32_t len )

Convert a Clock state value to a string.

◆ timer_device_get_count()

uint32_t STDCALL timer_device_get_count ( void )

Get the current timer device count.

Timer Device Helper Functions

◆ timer_device_get_default()

TIMER_DEVICE *STDCALL timer_device_get_default ( void )

Get the current default timer device.

◆ timer_device_set_default()

uint32_t STDCALL timer_device_set_default ( TIMER_DEVICE * timer)

Set the current default timer device.

◆ timer_device_check()

TIMER_DEVICE *STDCALL timer_device_check ( TIMER_DEVICE * timer)

Check if the supplied Timer is in the Timer table.

◆ timer_type_to_string()

uint32_t STDCALL timer_type_to_string ( uint32_t timertype,
char * string,
uint32_t len )

Convert a Timer type value to a string.

◆ timer_state_to_string()

uint32_t STDCALL timer_state_to_string ( uint32_t timerstate,
char * string,
uint32_t len )

Convert a Timer state value to a string.

◆ timer_device_create_waiter()

TIMER_WAITER *STDCALL timer_device_create_waiter ( TIMER_DEVICE * timer,
timer_cb callback,
void * data )

Create a new waiter using the supplied parameters.

Note
Waiter must be registered by calling TimerDeviceRegisterWaiter
Caller must hold the Timer device lock

◆ timer_device_destroy_waiter()

uint32_t STDCALL timer_device_destroy_waiter ( TIMER_DEVICE * timer,
TIMER_WAITER * waiter )

Destroy an existing waiter.

Note
Waiter must be deregistered first by calling TimerDeviceDeregisterWaiter
Caller must hold the Timer device lock

◆ timer_device_register_waiter()

uint32_t STDCALL timer_device_register_waiter ( TIMER_DEVICE * timer,
TIMER_WAITER * waiter )

Register a waiter in the waiter list of the supplied Timer.

Note
Waiter must be created by calling TimerDeviceCreateWaiter
Caller must hold the Timer device lock

◆ timer_device_deregister_waiter()

uint32_t STDCALL timer_device_deregister_waiter ( TIMER_DEVICE * timer,
TIMER_WAITER * waiter )

Deregister a waiter from the waiter list of the supplied Timer.

Note
Waiter must be destroyed by calling TimerDeviceDestroyWaiter
Caller must hold the Timer device lock

◆ random_device_get_count()

uint32_t STDCALL random_device_get_count ( void )

Get the current random device count.

Random Device Helper Functions

◆ random_device_get_default()

RANDOM_DEVICE *STDCALL random_device_get_default ( void )

Get the current default random device.

◆ random_device_set_default()

uint32_t STDCALL random_device_set_default ( RANDOM_DEVICE * random)

Set the current default random device.

◆ random_device_check()

RANDOM_DEVICE *STDCALL random_device_check ( RANDOM_DEVICE * random)

Check if the supplied Random is in the Random table.

◆ random_type_to_string()

uint32_t STDCALL random_type_to_string ( uint32_t randomtype,
char * string,
uint32_t len )

Convert a Random type value to a string.

◆ random_state_to_string()

uint32_t STDCALL random_state_to_string ( uint32_t randomstate,
char * string,
uint32_t len )

Convert a Random state value to a string.

◆ mailbox_device_get_count()

uint32_t STDCALL mailbox_device_get_count ( void )

Get the current mailbox device count.

Mailbox Device Helper Functions

◆ mailbox_device_get_default()

MAILBOX_DEVICE *STDCALL mailbox_device_get_default ( void )

Get the current default mailbox device.

◆ mailbox_device_set_default()

uint32_t STDCALL mailbox_device_set_default ( MAILBOX_DEVICE * mailbox)

Set the current default mailbox device.

◆ mailbox_device_check()

MAILBOX_DEVICE *STDCALL mailbox_device_check ( MAILBOX_DEVICE * mailbox)

Check if the supplied Mailbox is in the Mailbox table.

◆ mailbox_type_to_string()

uint32_t STDCALL mailbox_type_to_string ( uint32_t mailboxtype,
char * string,
uint32_t len )

Convert a Mailbox type value to a string.

◆ mailbox_state_to_string()

uint32_t STDCALL mailbox_state_to_string ( uint32_t mailboxstate,
char * string,
uint32_t len )

Convert a Mailbox state value to a string.

◆ watchdog_device_get_count()

uint32_t STDCALL watchdog_device_get_count ( void )

Get the current watchdog device count.

Watchdog Device Helper Functions

◆ watchdog_device_get_default()

WATCHDOG_DEVICE *STDCALL watchdog_device_get_default ( void )

Get the current default watchdog device.

◆ watchdog_device_set_default()

uint32_t STDCALL watchdog_device_set_default ( WATCHDOG_DEVICE * watchdog)

Set the current default watchdog device.

◆ watchdog_device_check()

WATCHDOG_DEVICE *STDCALL watchdog_device_check ( WATCHDOG_DEVICE * watchdog)

Check if the supplied Watchdog is in the Watchdog table.

◆ watchdog_type_to_string()

uint32_t STDCALL watchdog_type_to_string ( uint32_t watchdogtype,
char * string,
uint32_t len )

Convert a Watchdog type value to a string.

◆ watchdog_state_to_string()

uint32_t STDCALL watchdog_state_to_string ( uint32_t watchdogstate,
char * string,
uint32_t len )

Convert a Watchdog state value to a string.