26#ifndef _ULTIBO_DEVICE_H
27#define _ULTIBO_DEVICE_H
38#define DEVICE_NAME_PREFIX "Device"
41#define DEVICE_SIGNATURE 0xAD03FE3C
44#define DEVICE_NAME_LENGTH SIZE_64
45#define DEVICE_DESC_LENGTH SIZE_128
48#define DEVICE_BUS_NONE 0
49#define DEVICE_BUS_PCI 1
50#define DEVICE_BUS_USB 2
51#define DEVICE_BUS_ISA 3
52#define DEVICE_BUS_PS2 4
53#define DEVICE_BUS_FIREWIRE 5
54#define DEVICE_BUS_SD 6
55#define DEVICE_BUS_MMC 7
56#define DEVICE_BUS_ATA 8
57#define DEVICE_BUS_IDE 9
58#define DEVICE_BUS_SCSI 10
59#define DEVICE_BUS_ATAPI 11
60#define DEVICE_BUS_SATA 12
61#define DEVICE_BUS_SERIAL 13
62#define DEVICE_BUS_SPI 14
63#define DEVICE_BUS_MMIO 15
64#define DEVICE_BUS_PCIE 16
65#define DEVICE_BUS_I2C 17
66#define DEVICE_BUS_VIRTIO 18
67#define DEVICE_BUS_BLUETOOTH 19
69#define DEVICE_BUS_MAX 19
72#define DEVICE_STATE_UNREGISTERED 0
73#define DEVICE_STATE_REGISTERED 1
75#define DEVICE_STATE_MAX 1
78#define DEVICE_ID_ANY 0xFFFFFFFF
81#define DEVICE_CLASS_NONE 0
82#define DEVICE_CLASS_USBHOST 1
83#define DEVICE_CLASS_PCIHOST 2
84#define DEVICE_CLASS_USB 3
85#define DEVICE_CLASS_PCI 4
86#define DEVICE_CLASS_NETWORK 5
87#define DEVICE_CLASS_STORAGE 6
88#define DEVICE_CLASS_BLOCK DEVICE_CLASS_STORAGE
89#define DEVICE_CLASS_FILESYSTEM 7
90#define DEVICE_CLASS_PROTOCOL 8
91#define DEVICE_CLASS_TRANSPORT DEVICE_CLASS_PROTOCOL
92#define DEVICE_CLASS_KEYBOARD 9
93#define DEVICE_CLASS_MOUSE 10
94#define DEVICE_CLASS_BLUETOOTH 11
95#define DEVICE_CLASS_SERIAL 12
96#define DEVICE_CLASS_AUDIO 13
97#define DEVICE_CLASS_VIDEO 14
98#define DEVICE_CLASS_SCSI 15
99#define DEVICE_CLASS_ATA 16
100#define DEVICE_CLASS_IDE DEVICE_CLASS_ATA
101#define DEVICE_CLASS_ATAPI DEVICE_CLASS_ATA
102#define DEVICE_CLASS_IMAGE 17
103#define DEVICE_CLASS_PRINTER 18
104#define DEVICE_CLASS_COMMUNICATIONS 19
105#define DEVICE_CLASS_SMART_CARD 20
106#define DEVICE_CLASS_MONITOR 21
107#define DEVICE_CLASS_DISPLAY 22
108#define DEVICE_CLASS_AUDIOVIDEO 23
109#define DEVICE_CLASS_IRDA 24
110#define DEVICE_CLASS_SPI 25
111#define DEVICE_CLASS_I2C 26
112#define DEVICE_CLASS_UART 27
113#define DEVICE_CLASS_MMC 28
114#define DEVICE_CLASS_SD 29
115#define DEVICE_CLASS_SDHCI 30
116#define DEVICE_CLASS_SDHOST DEVICE_CLASS_SDHCI
117#define DEVICE_CLASS_MMCHOST DEVICE_CLASS_SDHCI
118#define DEVICE_CLASS_MMCIHOST DEVICE_CLASS_SDHCI
119#define DEVICE_CLASS_DFU 31
120#define DEVICE_CLASS_GPIO 32
121#define DEVICE_CLASS_MAILBOX 33
122#define DEVICE_CLASS_OPENGL 34
123#define DEVICE_CLASS_DVB 35
124#define DEVICE_CLASS_DAB 36
125#define DEVICE_CLASS_DMA 37
126#define DEVICE_CLASS_SCSIHOST 38
127#define DEVICE_CLASS_ATAHOST 39
128#define DEVICE_CLASS_TIMER 40
129#define DEVICE_CLASS_RANDOM 41
130#define DEVICE_CLASS_FRAMEBUFFER 42
131#define DEVICE_CLASS_WATCHDOG 43
132#define DEVICE_CLASS_CLOCK 44
133#define DEVICE_CLASS_CONSOLE 45
134#define DEVICE_CLASS_RTC 46
135#define DEVICE_CLASS_USBHUB 47
136#define DEVICE_CLASS_LOGGING 48
137#define DEVICE_CLASS_PCM 49
138#define DEVICE_CLASS_I2S DEVICE_CLASS_PCM
139#define DEVICE_CLASS_PWM 50
140#define DEVICE_CLASS_1WIRE 51
141#define DEVICE_CLASS_CLOCK_MANAGER 52
142#define DEVICE_CLASS_CODEC 53
143#define DEVICE_CLASS_TOUCH 54
144#define DEVICE_CLASS_MEMORY 55
145#define DEVICE_CLASS_GENERIC 56
146#define DEVICE_CLASS_VIRTIO 57
147#define DEVICE_CLASS_BLUETOOTHHOST 58
148#define DEVICE_CLASS_JOYSTICK 59
149#define DEVICE_CLASS_HID 60
151#define DEVICE_CLASS_MAX 60
153#define DEVICE_CLASS_ANY 0xFFFFFFFF
156#define DEVICE_NOTIFICATION_NONE 0x00000000
157#define DEVICE_NOTIFICATION_REGISTER 0x00000001
158#define DEVICE_NOTIFICATION_DEREGISTER 0x00000002
159#define DEVICE_NOTIFICATION_OPEN 0x00000004
160#define DEVICE_NOTIFICATION_CLOSE 0x00000008
161#define DEVICE_NOTIFICATION_UP 0x00000010
162#define DEVICE_NOTIFICATION_DOWN 0x00000020
163#define DEVICE_NOTIFICATION_INSERT 0x00000040
164#define DEVICE_NOTIFICATION_EJECT 0x00000080
165#define DEVICE_NOTIFICATION_ATTACH 0x00000100
166#define DEVICE_NOTIFICATION_DETACH 0x00000200
167#define DEVICE_NOTIFICATION_ENABLE 0x00000400
168#define DEVICE_NOTIFICATION_DISABLE 0x00000800
169#define DEVICE_NOTIFICATION_BIND 0x00001000
170#define DEVICE_NOTIFICATION_UNBIND 0x00002000
171#define DEVICE_NOTIFICATION_ATTACHING 0x00004000
172#define DEVICE_NOTIFICATION_DETACHING 0x00008000
173#define DEVICE_NOTIFICATION_INSERTING 0x00010000
174#define DEVICE_NOTIFICATION_EJECTING 0x00020000
175#define DEVICE_NOTIFICATION_OPENING 0x00040000
176#define DEVICE_NOTIFICATION_CLOSING 0x00080000
177#define DEVICE_NOTIFICATION_RESIZE 0x00100000
178#define DEVICE_NOTIFICATION_RESIZING 0x00200000
181#define FIRMWARE_NAME_LENGTH SIZE_256
184#define FIRMWARE_ACTION_NONE 0
185#define FIRMWARE_ACTION_SIZE 1
186#define FIRMWARE_ACTION_OPEN 2
187#define FIRMWARE_ACTION_READ 3
188#define FIRMWARE_ACTION_SEEK 4
189#define FIRMWARE_ACTION_CLOSE 5
190#define FIRMWARE_ACTION_ACQUIRE 6
191#define FIRMWARE_ACTION_RELEASE 7
194#define FIRMWARE_WAIT_DELAY 100
195#define FIRMWARE_MAX_BUFFER SIZE_4M
198#define NOTIFIER_SIGNATURE 0x6FA1BEC9
201#define NOTIFIER_STATE_UNREGISTERED 0
202#define NOTIFIER_STATE_REGISTERED 1
205#define NOTIFIER_FLAG_NONE 0x00000000
206#define NOTIFIER_FLAG_WORKER 0x00000001
207#define NOTIFIER_FLAG_UNLOCK 0x00000002
210#define DRIVER_NAME_PREFIX "Driver"
213#define DRIVER_SIGNATURE 0x1EB4980A
216#define DRIVER_NAME_LENGTH SIZE_64
219#define DRIVER_STATE_UNREGISTERED 0
220#define DRIVER_STATE_REGISTERED 1
222#define DRIVER_STATE_MAX 1
225#define DRIVER_ID_ANY 0xFFFFFFFF
228#define DRIVER_CLASS_NONE 0
229#define DRIVER_CLASS_USB 1
230#define DRIVER_CLASS_PCI 2
231#define DRIVER_CLASS_SDIO 3
232#define DRIVER_CLASS_BLUETOOTH 4
233#define DRIVER_CLASS_VIRTIO 5
234#define DRIVER_CLASS_HID 6
236#define DRIVER_CLASS_MAX 6
238#define DRIVER_CLASS_ANY 0xFFFFFFFF
241#define HOST_NAME_PREFIX "Host"
244#define HOST_SIGNATURE 0xF45D30FE
247#define HOST_NAME_LENGTH SIZE_64
250#define HOST_STATE_UNREGISTERED 0
251#define HOST_STATE_REGISTERED 1
253#define HOST_STATE_MAX 1
256#define HOST_ID_ANY 0xFFFFFFFF
259#define HOST_CLASS_NONE 0
260#define HOST_CLASS_USB 1
261#define HOST_CLASS_PCI 2
262#define HOST_CLASS_SD 3
263#define HOST_CLASS_BLUETOOTH 4
265#define HOST_CLASS_MAX 4
267#define HOST_CLASS_ANY 0xFFFFFFFF
270#define CLOCK_NAME_PREFIX "Clock"
273#define CLOCK_TYPE_NONE 0
274#define CLOCK_TYPE_HARDWARE 1
276#define CLOCK_TYPE_MAX 1
279#define CLOCK_STATE_DISABLED 0
280#define CLOCK_STATE_ENABLED 1
282#define CLOCK_STATE_MAX 1
285#define CLOCK_FLAG_NONE 0x00000000
286#define CLOCK_FLAG_WRITABLE 0x00000001
287#define CLOCK_FLAG_VARIABLE 0x00000002
290#define TIMER_NAME_PREFIX "Timer"
293#define TIMER_TYPE_NONE 0
294#define TIMER_TYPE_HARDWARE 1
296#define TIMER_TYPE_MAX 1
299#define TIMER_STATE_DISABLED 0
300#define TIMER_STATE_ENABLED 1
302#define TIMER_STATE_MAX 1
305#define TIMER_FLAG_NONE 0x00000000
306#define TIMER_FLAG_WRAPPING 0x00000001
307#define TIMER_FLAG_COUNTER 0x00000002
308#define TIMER_FLAG_DOWN 0x00000004
311#define TIMER_EVENT_FLAG_NONE 0x00000000
312#define TIMER_EVENT_FLAG_REPEAT 0x00000001
313#define TIMER_EVENT_FLAG_INTERRUPT 0x00000002
317#define RANDOM_NAME_PREFIX "Random"
320#define RANDOM_TYPE_NONE 0
321#define RANDOM_TYPE_HARDWARE 1
322#define RANDOM_TYPE_SOFTWARE 2
324#define RANDOM_TYPE_MAX 2
327#define RANDOM_STATE_DISABLED 0
328#define RANDOM_STATE_ENABLED 1
330#define RANDOM_STATE_MAX 1
333#define RANDOM_FLAG_NONE 0x00000000
336#define MAILBOX_NAME_PREFIX "Mailbox"
339#define MAILBOX_TYPE_NONE 0
340#define MAILBOX_TYPE_GPU 1
341#define MAILBOX_TYPE_LOCAL 2
343#define MAILBOX_TYPE_MAX 2
346#define MAILBOX_STATE_DISABLED 0
347#define MAILBOX_STATE_ENABLED 1
349#define MAILBOX_STATE_MAX 1
352#define MAILBOX_FLAG_NONE 0x00000000
355#define WATCHDOG_NAME_PREFIX "Watchdog"
358#define WATCHDOG_TYPE_NONE 0
359#define WATCHDOG_TYPE_HARDWARE 1
361#define WATCHDOG_TYPE_MAX 1
364#define WATCHDOG_STATE_DISABLED 0
365#define WATCHDOG_STATE_ENABLED 1
367#define WATCHDOG_STATE_MAX 1
370#define WATCHDOG_FLAG_NONE 0x00000000
uint32_t STDCALL notification_to_string(uint32_t notification, char *string, uint32_t len)
uint32_t STDCALL device_set_description(DEVICE *device, const char *description)
Set the description of the supplied Device.
uint32_t STDCALL(* timer_device_get_rate_proc)(TIMER_DEVICE *timer)
Definition devices.h:605
uint32_t STDCALL timer_type_to_string(uint32_t timertype, char *string, uint32_t len)
Convert a Timer type value to a string.
RANDOM_DEVICE *STDCALL random_device_find_by_description(const char *description)
uint32_t STDCALL(* random_device_read_longword_proc)(RANDOM_DEVICE *random)
Definition devices.h:664
uint32_t STDCALL device_state_to_string(uint32_t devicestate, char *string, uint32_t len)
uint32_t STDCALL random_device_start(RANDOM_DEVICE *random)
uint32_t STDCALL(* clock_device_start_proc)(CLOCK_DEVICE *clock)
Definition devices.h:524
uint32_t STDCALL(* timer_device_read_proc)(TIMER_DEVICE *timer)
Definition devices.h:600
CLOCK_DEVICE *STDCALL clock_device_find(uint32_t clockid)
Find a clock device by ID in the clock table.
WATCHDOG_DEVICE *STDCALL watchdog_device_create_ex(uint32_t size)
Create a new Watchdog entry.
struct _CLOCK_PROPERTIES CLOCK_PROPERTIES
Definition devices.h:506
uint32_t STDCALL(* device_firmware_handler)(DEVICE_FIRMWARE *firmware, uint32_t action, HANDLE *handle, void *buffer, uint32_t *value)
Definition devices.h:402
uint32_t STDCALL mailbox_device_enumerate(mailbox_enumerate_cb callback, void *data)
uint32_t STDCALL(* mailbox_enumerate_cb)(MAILBOX_DEVICE *mailbox, void *data)
Definition devices.h:699
int64_t STDCALL(* random_device_read_long_long_proc)(RANDOM_DEVICE *random)
Definition devices.h:665
uint32_t STDCALL driver_state_to_string(uint32_t driverstate, char *string, uint32_t len)
#define DRIVER_NAME_LENGTH
Length of driver name.
Definition devices.h:216
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 timer_device_deregister(TIMER_DEVICE *timer)
Deregister a Timer from the Timer table.
DRIVER *STDCALL driver_check(DRIVER *driver)
Check if the supplied Driver is in the driver table.
uint32_t STDCALL(* clock_device_get_properties_proc)(CLOCK_DEVICE *clock, CLOCK_PROPERTIES *properties)
Definition devices.h:531
uint32_t STDCALL watchdog_device_start(WATCHDOG_DEVICE *watchdog)
uint32_t STDCALL(* timer_device_cancel_proc)(TIMER_DEVICE *timer)
Definition devices.h:604
uint32_t STDCALL timer_state_to_string(uint32_t timerstate, char *string, uint32_t len)
Convert a Timer state value to a string.
uint32_t STDCALL(* driver_enumerate_cb)(DRIVER *driver, void *data)
Definition devices.h:468
MAILBOX_DEVICE *STDCALL mailbox_device_check(MAILBOX_DEVICE *mailbox)
Check if the supplied Mailbox is in the Mailbox table.
uint32_t STDCALL device_enumerate(uint32_t deviceclass, device_enumerate_cb callback, void *data)
Enumerate all devices in the device table.
#define HOST_NAME_LENGTH
Length of host name.
Definition devices.h:247
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 clock_device_register(CLOCK_DEVICE *clock)
Register a new Clock in the Clock table.
uint32_t STDCALL device_class_to_string(uint32_t deviceclass, char *string, uint32_t len)
uint32_t STDCALL(* clock_enumerate_cb)(CLOCK_DEVICE *clock, void *data)
Definition devices.h:519
DEVICE_FIRMWARE *STDCALL device_firmware_find_by_handle(HANDLE handle)
Find an existing device firmware handler from a returned handle.
DEVICE *STDCALL device_find_by_name_ex(uint32_t deviceclass, const char *name)
Find a device by class and name in the device table.
uint32_t STDCALL(* random_device_start_proc)(RANDOM_DEVICE *random)
Definition devices.h:659
CLOCK_DEVICE *STDCALL clock_device_find_by_name(const char *name)
Find a clock device by name in the clock table.
DEVICE *STDCALL device_find_by_device_data(void *devicedata)
Find a device with matching DeviceData property in the device table.
uint32_t STDCALL mailbox_device_notification(MAILBOX_DEVICE *mailbox, mailbox_notification_cb callback, void *data, uint32_t notification, uint32_t flags)
uint32_t STDCALL mailbox_device_get_count(void)
Get the current mailbox device count.
uint32_t STDCALL clock_device_deregister(CLOCK_DEVICE *clock)
Deregister a Clock from the Clock table.
uint8_t STDCALL random_device_read_byte(RANDOM_DEVICE *random)
uint32_t STDCALL(* watchdog_device_start_proc)(WATCHDOG_DEVICE *watchdog)
Definition devices.h:749
DEVICE *STDCALL device_create_ex(uint32_t size)
Create a new Device entry.
DEVICE *STDCALL device_check(DEVICE *device)
Check if the supplied Device is in the device table.
struct _TIMER_WAITER TIMER_WAITER
Definition devices.h:582
MAILBOX_DEVICE *STDCALL mailbox_device_create(void)
Create a new Mailbox entry.
TIMER_DEVICE *STDCALL timer_device_create(void)
Create a new Timer entry.
struct _DEVICE DEVICE
Definition devices.h:373
uint32_t STDCALL driver_destroy(DRIVER *driver)
Destroy an existing Driver entry.
uint32_t STDCALL device_destroy(DEVICE *device)
Destroy an existing Device entry.
TIMER_DEVICE *STDCALL timer_device_check(TIMER_DEVICE *timer)
Check if the supplied Timer is in the Timer table.
uint32_t STDCALL(* watchdog_enumerate_cb)(WATCHDOG_DEVICE *watchdog, void *data)
Definition devices.h:744
struct _TIMER_PROPERTIES TIMER_PROPERTIES
Definition devices.h:566
uint32_t STDCALL(* mailbox_device_set_timeout_proc)(MAILBOX_DEVICE *mailbox, uint32_t timeout)
Definition devices.h:710
uint32_t STDCALL(* timer_device_event_proc)(TIMER_DEVICE *timer, uint32_t flags, timer_cb callback, void *data)
Definition devices.h:603
RANDOM_DEVICE *STDCALL random_device_create_ex(uint32_t size)
Create a new Random entry.
uint32_t STDCALL(* timer_notification_cb)(DEVICE *device, void *data, uint32_t notification)
Definition devices.h:595
uint32_t STDCALL(* device_enumerate_cb)(DEVICE *device, void *data)
Definition devices.h:376
counter_event_cb timer_cb
Counter callback from Platform.
Definition devices.h:563
uint32_t STDCALL random_device_deregister(RANDOM_DEVICE *random)
Deregister a Random from the Random table.
uint32_t STDCALL watchdog_device_deregister(WATCHDOG_DEVICE *watchdog)
Deregister a Watchdog from the Watchdog table.
uint32_t STDCALL clock_device_write64(CLOCK_DEVICE *clock, int64_t value)
Write the counter value of the specified Clock device.
uint32_t STDCALL random_device_read_long_word(RANDOM_DEVICE *random)
uint32_t STDCALL timer_device_get_count(void)
Get the current timer device count.
uint32_t STDCALL watchdog_device_stop(WATCHDOG_DEVICE *watchdog)
uint32_t STDCALL clock_device_get_count(void)
Get the current clock device count.
NOTIFIER *STDCALL notifier_find(DEVICE *device, uint32_t deviceclass, device_notification_cb callback, void *data)
uint32_t STDCALL(* mailbox_notification_cb)(DEVICE *device, void *data, uint32_t notification)
Definition devices.h:701
int64_t STDCALL(* clock_device_read64_proc)(CLOCK_DEVICE *clock)
Definition devices.h:527
CLOCK_DEVICE *STDCALL clock_device_create_ex(uint32_t size)
Create a new Clock entry.
double_t STDCALL random_device_read_double(RANDOM_DEVICE *random)
uint32_t STDCALL random_device_get_count(void)
Get the current random device count.
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 mailbox_device_receive(MAILBOX_DEVICE *mailbox, uint32_t channel)
uint32_t STDCALL clock_state_to_string(uint32_t clockstate, char *string, uint32_t len)
Convert a Clock state value to a string.
struct _HOST HOST
Definition devices.h:485
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 clock_type_to_string(uint32_t clocktype, char *string, uint32_t len)
Convert a Clock type value to a string.
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 watchdog_type_to_string(uint32_t watchdogtype, char *string, uint32_t len)
Convert a Watchdog type value to a string.
uint32_t STDCALL watchdog_device_notification(WATCHDOG_DEVICE *watchdog, watchdog_notification_cb callback, void *data, uint32_t notification, uint32_t flags)
DEVICE *STDCALL device_create(void)
Create a new Device entry.
uint32_t STDCALL notifier_get_count(void)
Get the current notifier count.
WATCHDOG_DEVICE *STDCALL watchdog_device_find_by_name(const char *name)
uint32_t STDCALL notifier_notify(DEVICE *device, uint32_t notification)
uint32_t STDCALL mailbox_device_send(MAILBOX_DEVICE *mailbox, uint32_t channel, uint32_t data)
uint32_t STDCALL watchdog_device_get_remain(WATCHDOG_DEVICE *watchdog)
uint32_t STDCALL watchdog_device_destroy(WATCHDOG_DEVICE *watchdog)
Destroy an existing Watchdog entry.
uint16_t STDCALL(* random_device_read_word_proc)(RANDOM_DEVICE *random)
Definition devices.h:663
CLOCK_DEVICE *STDCALL clock_device_create(void)
Create a new Clock entry.
uint32_t STDCALL mailbox_type_to_string(uint32_t mailboxtype, char *string, uint32_t len)
Convert a Mailbox type value to a string.
WATCHDOG_DEVICE *STDCALL watchdog_device_find(uint32_t watchdogid)
RANDOM_DEVICE *STDCALL random_device_find_by_name(const char *name)
uint32_t STDCALL mailbox_device_start(MAILBOX_DEVICE *mailbox)
uint32_t STDCALL watchdog_device_refresh(WATCHDOG_DEVICE *watchdog)
uint32_t STDCALL device_deregister(DEVICE *device)
Deregister a Device from the Device table.
uint32_t STDCALL(* random_notification_cb)(DEVICE *device, void *data, uint32_t notification)
Definition devices.h:656
uint32_t STDCALL(* device_notification_cb)(DEVICE *device, void *data, uint32_t notification)
Definition devices.h:378
uint32_t STDCALL timer_device_set_default(TIMER_DEVICE *timer)
Set the current default timer 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(* mailbox_device_receive_proc)(MAILBOX_DEVICE *mailbox, uint32_t channel)
Definition devices.h:706
uint32_t STDCALL(* clock_device_get_rate_proc)(CLOCK_DEVICE *clock)
Definition devices.h:529
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.
RANDOM_DEVICE *STDCALL random_device_create(void)
Create a new Random entry.
uint32_t STDCALL driver_enumerate(uint32_t driverclass, driver_enumerate_cb callback, void *data)
Enumerate all drivers in the driver table.
void STDCALL notifier_worker(NOTIFIER_TASK *task)
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.
DRIVER *STDCALL driver_create(void)
Create a new Driver entry.
uint32_t STDCALL random_device_notification(RANDOM_DEVICE *random, random_notification_cb callback, void *data, uint32_t notification, uint32_t flags)
struct _MAILBOX_DEVICE MAILBOX_DEVICE
Definition devices.h:696
uint32_t STDCALL(* timer_device_set_rate_proc)(TIMER_DEVICE *timer, uint32_t rate)
Definition devices.h:606
uint32_t STDCALL random_device_register(RANDOM_DEVICE *random)
Register a new Random in the Random table.
RANDOM_DEVICE *STDCALL random_device_get_default(void)
Get the current default random device.
uint32_t STDCALL(* watchdog_device_refresh_proc)(WATCHDOG_DEVICE *watchdog)
Definition devices.h:751
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.
DEVICE *STDCALL device_find(uint32_t deviceclass, uint32_t deviceid)
Find a device by ID in the device table.
uint32_t STDCALL timer_device_stop(TIMER_DEVICE *timer)
Stop the clock and counter 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.
struct _DEVICE_FIRMWARE DEVICE_FIRMWARE
Definition devices.h:399
TIMER_DEVICE *STDCALL timer_device_find_by_name(const char *name)
Find a timer device by name in the timer table.
uint32_t STDCALL watchdog_device_get_count(void)
Get the current watchdog device count.
TIMER_DEVICE *STDCALL timer_device_find_by_description(const char *description)
Find a timer device by description in the timer table.
uint32_t STDCALL(* clock_device_read_proc)(CLOCK_DEVICE *clock)
Definition devices.h:526
MAILBOX_DEVICE *STDCALL mailbox_device_find(uint32_t mailboxid)
uint32_t STDCALL random_device_destroy(RANDOM_DEVICE *random)
Destroy an existing Random entry.
uint32_t STDCALL random_device_enumerate(random_enumerate_cb callback, void *data)
uint32_t STDCALL mailbox_device_get_timeout(MAILBOX_DEVICE *mailbox)
TIMER_DEVICE *STDCALL timer_device_create_ex(uint32_t size)
Create a new Timer entry.
uint16_t STDCALL random_device_read_word(RANDOM_DEVICE *random)
uint32_t STDCALL watchdog_device_register(WATCHDOG_DEVICE *watchdog)
Register a new Watchdog in the Watchdog table.
int64_t STDCALL timer_device_read64(TIMER_DEVICE *timer)
Read the current value of 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.
struct _FIRMWARE_HANDLE FIRMWARE_HANDLE
Definition devices.h:404
#define DEVICE_NAME_LENGTH
Length of device name.
Definition devices.h:44
uint32_t STDCALL mailbox_device_deregister(MAILBOX_DEVICE *mailbox)
Deregister a Mailbox from the Mailbox table.
DRIVER *STDCALL driver_find(uint32_t driverclass, uint32_t driverid)
Find a driver by ID in the driver table.
struct _RANDOM_DEVICE RANDOM_DEVICE
Definition devices.h:651
uint32_t STDCALL watchdog_device_get_timeout(WATCHDOG_DEVICE *watchdog)
uint32_t STDCALL device_set_name(DEVICE *device, const char *name)
Set the name of the supplied Device.
uint32_t STDCALL(* mailbox_device_call_proc)(MAILBOX_DEVICE *mailbox, uint32_t channel, uint32_t data, uint32_t *response)
Definition devices.h:708
uint32_t STDCALL random_device_set_default(RANDOM_DEVICE *random)
Set the current default random device.
uint32_t STDCALL driver_set_name(DRIVER *driver, const char *name)
Set the name of the supplied Driver.
uint32_t STDCALL mailbox_device_stop(MAILBOX_DEVICE *mailbox)
uint32_t STDCALL random_device_stop(RANDOM_DEVICE *random)
struct _NOTIFIER NOTIFIER
Definition devices.h:428
uint32_t STDCALL device_firmware_deregister(HANDLE handle)
Deregister an existing device firmware handler.
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_remain_proc)(WATCHDOG_DEVICE *watchdog)
Definition devices.h:752
uint32_t STDCALL(* timer_device_get_interval_proc)(TIMER_DEVICE *timer)
Definition devices.h:607
uint32_t STDCALL timer_device_properties(TIMER_DEVICE *timer, TIMER_PROPERTIES *properties)
Get the properties for the specified Timer device.
NOTIFIER *STDCALL notifier_check(NOTIFIER *notifier)
Check if the supplied Notifier is in the notifier table.
uint32_t STDCALL(* random_device_stop_proc)(RANDOM_DEVICE *random)
Definition devices.h:660
uint32_t STDCALL(* random_enumerate_cb)(RANDOM_DEVICE *random, void *data)
Definition devices.h:654
uint32_t STDCALL driver_register(DRIVER *driver)
Register a new Driver in the Driver table.
uint32_t STDCALL clock_device_read(CLOCK_DEVICE *clock)
Read the counter value of the specified Clock device.
uint32_t STDCALL device_get_description(DEVICE *device, char *name, uint32_t len)
Get the description of the supplied Device.
DRIVER *STDCALL driver_create_ex(uint32_t size)
Create a new Driver entry.
uint32_t STDCALL device_register(DEVICE *device)
Register a new Device in the Device table.
struct _CLOCK_DEVICE CLOCK_DEVICE
Definition devices.h:516
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_enumerate(clock_enumerate_cb callback, void *data)
Enumerate all clock devices in the clock table.
uint32_t STDCALL timer_device_destroy(TIMER_DEVICE *timer)
Destroy an existing Timer entry.
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.
void STDCALL notifier_retry(NOTIFIER_RETRY *retry)
RANDOM_DEVICE *STDCALL random_device_find(uint32_t randomid)
CLOCK_DEVICE *STDCALL clock_device_get_default(void)
Get the current default clock device.
uint32_t STDCALL device_get_count(void)
Get the current device count.
MAILBOX_DEVICE *STDCALL mailbox_device_create_ex(uint32_t size)
Create a new Mailbox entry.
uint32_t STDCALL timer_device_enumerate(timer_enumerate_cb callback, void *data)
Enumerate all timer devices in the timer table.
uint8_t STDCALL(* random_device_read_byte_proc)(RANDOM_DEVICE *random)
Definition devices.h:662
uint32_t STDCALL(* watchdog_notification_cb)(DEVICE *device, void *data, uint32_t notification)
Definition devices.h:746
TIMER_DEVICE *STDCALL timer_device_find(uint32_t timerid)
Find a timer device by ID in the timer table.
uint32_t STDCALL timer_device_get_properties(TIMER_DEVICE *timer, TIMER_PROPERTIES *properties)
Get the properties for the specified Timer device.
CLOCK_DEVICE *STDCALL clock_device_find_by_description(const char *description)
Find a clock device by description in the clock table.
uint32_t STDCALL device_firmware_close(HANDLE handle)
Close a handle to the firmware for a specified device from a registered handler.
uint32_t STDCALL(* timer_device_stop_proc)(TIMER_DEVICE *timer)
Definition devices.h:599
uint32_t STDCALL(* timer_device_set_interval_proc)(TIMER_DEVICE *timer, uint32_t interval)
Definition devices.h:608
uint32_t STDCALL random_type_to_string(uint32_t randomtype, char *string, uint32_t len)
Convert a Random type value to a string.
struct _NOTIFIER_RETRY NOTIFIER_RETRY
Definition devices.h:457
uint32_t STDCALL(* watchdog_device_set_timeout_proc)(WATCHDOG_DEVICE *watchdog, uint32_t timeout)
Definition devices.h:754
uint32_t STDCALL watchdog_device_enumerate(watchdog_enumerate_cb callback, void *data)
uint32_t STDCALL timer_device_start(TIMER_DEVICE *timer)
Start the clock and counter of the specified Timer device.
uint32_t STDCALL(* clock_device_write64_proc)(CLOCK_DEVICE *clock, int64_t value)
Definition devices.h:528
uint32_t STDCALL timer_device_deregister_waiter(TIMER_DEVICE *timer, TIMER_WAITER *waiter)
Deregister a waiter from the waiter list of the supplied Timer.
MAILBOX_DEVICE *STDCALL mailbox_device_find_by_name(const char *name)
uint32_t STDCALL(* timer_enumerate_cb)(TIMER_DEVICE *timer, void *data)
Definition devices.h:593
struct _WATCHDOG_DEVICE WATCHDOG_DEVICE
Definition devices.h:741
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.
int64_t STDCALL(* timer_device_read64_proc)(TIMER_DEVICE *timer)
Definition devices.h:601
uint32_t STDCALL mailbox_device_destroy(MAILBOX_DEVICE *mailbox)
Destroy an existing Mailbox entry.
uint32_t STDCALL(* mailbox_device_send_proc)(MAILBOX_DEVICE *mailbox, uint32_t channel, uint32_t data)
Definition devices.h:707
uint32_t STDCALL device_bus_to_string(uint32_t devicebus, char *string, uint32_t len)
uint32_t STDCALL device_get_name(DEVICE *device, char *name, uint32_t len)
Get the name of the supplied Device.
WATCHDOG_DEVICE *STDCALL watchdog_device_find_by_description(const char *description)
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.
struct _DRIVER DRIVER
Definition devices.h:465
uint32_t STDCALL clock_device_stop(CLOCK_DEVICE *clock)
Stop the counter of 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.
uint32_t STDCALL clock_device_start(CLOCK_DEVICE *clock)
Start the counter of the specified Clock device.
WATCHDOG_DEVICE *STDCALL watchdog_device_create(void)
Create a new Watchdog entry.
#define DEVICE_DESC_LENGTH
Length of device description.
Definition devices.h:45
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_stop_proc)(MAILBOX_DEVICE *mailbox)
Definition devices.h:705
struct _TIMER_DEVICE TIMER_DEVICE
Forward declared for TimerWaiter.
Definition devices.h:579
uint32_t STDCALL clock_device_destroy(CLOCK_DEVICE *clock)
Destroy an existing Clock entry.
uint32_t STDCALL(* timer_device_wait_proc)(TIMER_DEVICE *timer)
Definition devices.h:602
uint32_t STDCALL driver_deregister(DRIVER *driver)
Deregister a Driver from the Driver table.
MAILBOX_DEVICE *STDCALL mailbox_device_find_by_description(const char *description)
uint32_t STDCALL timer_device_wait(TIMER_DEVICE *timer)
Wait for the current interval to expire on the specified Timer device.
uint32_t STDCALL(* mailbox_device_start_proc)(MAILBOX_DEVICE *mailbox)
Definition devices.h:704
uint32_t STDCALL watchdog_device_set_default(WATCHDOG_DEVICE *watchdog)
Set the current default watchdog device.
uint32_t STDCALL mailbox_device_register(MAILBOX_DEVICE *mailbox)
Register a new Mailbox in the Mailbox table.
uint32_t STDCALL clock_device_properties(CLOCK_DEVICE *clock, CLOCK_PROPERTIES *properties)
Get the properties for the specified Clock device.
RANDOM_DEVICE *STDCALL random_device_check(RANDOM_DEVICE *random)
Check if the supplied Random is in the Random table.
uint32_t STDCALL driver_get_count(void)
Get the current driver count.
uint32_t STDCALL watchdog_state_to_string(uint32_t watchdogstate, char *string, uint32_t len)
Convert a Watchdog state value to a string.
uint32_t STDCALL mailbox_device_set_timeout(MAILBOX_DEVICE *mailbox, uint32_t timeout)
uint32_t STDCALL(* watchdog_device_get_timeout_proc)(WATCHDOG_DEVICE *watchdog)
Definition devices.h:753
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(* clock_device_set_rate_proc)(CLOCK_DEVICE *clock, uint32_t rate)
Definition devices.h:530
DRIVER *STDCALL driver_find_by_name(const char *name)
Find a driver by name in the driver table.
struct _NOTIFIER_TASK NOTIFIER_TASK
Definition devices.h:446
uint32_t STDCALL random_device_seed(RANDOM_DEVICE *random, uint32_t seed)
uint32_t STDCALL driver_class_to_string(uint32_t driverclass, char *string, uint32_t len)
CLOCK_DEVICE *STDCALL clock_device_check(CLOCK_DEVICE *clock)
Check if the supplied Clock is in the Clock table.
WATCHDOG_DEVICE *STDCALL watchdog_device_get_default(void)
Get the current default watchdog device.
uint32_t STDCALL(* clock_device_stop_proc)(CLOCK_DEVICE *clock)
Definition devices.h:525
DEVICE *STDCALL device_find_by_description(const char *description)
Find a device by description in the device table.
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.
uint32_t STDCALL notifier_release(NOTIFIER *notifier)
Deregister and Destroy a Notifier from the Notifier table.
uint32_t STDCALL(* random_device_seed_proc)(RANDOM_DEVICE *random, uint32_t seed)
Definition devices.h:661
uint32_t STDCALL(* watchdog_device_stop_proc)(WATCHDOG_DEVICE *watchdog)
Definition devices.h:750
uint32_t STDCALL timer_device_register(TIMER_DEVICE *timer)
Register a new Timer in the Timer table.
uint32_t STDCALL timer_device_destroy_waiter(TIMER_DEVICE *timer, TIMER_WAITER *waiter)
Destroy an existing waiter.
uint32_t STDCALL timer_device_cancel(TIMER_DEVICE *timer)
Cancel a previously scheduled event callback function on the specified Timer device.
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.
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.
uint32_t STDCALL(* timer_device_start_proc)(TIMER_DEVICE *timer)
Definition devices.h:598
double_t STDCALL random_device_read_extended(RANDOM_DEVICE *random)
uint32_t STDCALL timer_device_get_interval(TIMER_DEVICE *timer)
Get the current interval in ticks of the specified Timer device.
int64_t STDCALL random_device_read_quad_word(RANDOM_DEVICE *random)
uint32_t STDCALL watchdog_device_set_timeout(WATCHDOG_DEVICE *watchdog, uint32_t timeout)
int32_t STDCALL device_firmware_size(HANDLE handle)
Return the size of the firmware for a specified device from a registered handler.
uint32_t STDCALL mailbox_device_call(MAILBOX_DEVICE *mailbox, uint32_t channel, uint32_t data, uint32_t *response)
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 timer_device_read(TIMER_DEVICE *timer)
Read the current value of the specified Timer device.
int64_t STDCALL clock_device_read64(CLOCK_DEVICE *clock)
Read the counter value of the specified Clock device.
DEVICE *STDCALL device_find_by_name(const char *name)
Find a device by name in the device table.
TIMER_DEVICE *STDCALL timer_device_get_default(void)
Get the current default timer device.
uint32_t STDCALL(* mailbox_device_get_timeout_proc)(MAILBOX_DEVICE *mailbox)
Definition devices.h:709
#define FIRMWARE_NAME_LENGTH
Length of firmware name.
Definition devices.h:181
uint32_t STDCALL mailbox_device_set_default(MAILBOX_DEVICE *mailbox)
Set the current default mailbox device.
double_t STDCALL(* random_device_read_double_proc)(RANDOM_DEVICE *random)
Definition devices.h:666
WATCHDOG_DEVICE *STDCALL watchdog_device_check(WATCHDOG_DEVICE *watchdog)
Check if the supplied Watchdog is in the Watchdog table.
uint32_t STDCALL(* host_enumerate_cb)(HOST *host, void *data)
Definition devices.h:488
uint32_t STDCALL driver_get_name(DRIVER *driver, char *name, uint32_t len)
Get the name of the supplied Driver.
MAILBOX_DEVICE *STDCALL mailbox_device_get_default(void)
Get the current default mailbox device.
DEVICE_FIRMWARE *STDCALL device_firmware_find(uint32_t deviceclass, const char *name)
Find an existing device firmware handler for a specified device.
uint32_t STDCALL clock_device_set_default(CLOCK_DEVICE *clock)
Set the current default clock device.
uint32_t STDCALL(* timer_device_get_properties_proc)(TIMER_DEVICE *timer, TIMER_PROPERTIES *properties)
Definition devices.h:609
uint32_t STDCALL(* clock_notification_cb)(DEVICE *device, void *data, uint32_t notification)
Definition devices.h:521
HANDLE EVENT_HANDLE
Definition globaltypes.h:117
size_t HANDLE
Definition globaltypes.h:51
#define STDCALL
Definition globaltypes.h:45
_Bool BOOL
Built in Boolean type (1 byte) (Redeclared here for flexibility).
Definition globaltypes.h:55
HANDLE MUTEX_HANDLE
Definition globaltypes.h:105
clock_device_set_rate_proc devicesetrate
A device specific DeviceSetRate method implementing a standard clock device interface (Optional).
Definition devices.h:547
uint32_t clockid
Unique Id of this Clock device in the Clock device table.
Definition devices.h:539
MUTEX_HANDLE lock
Device lock.
Definition devices.h:552
clock_device_write64_proc devicewrite64
A device specific DeviceWrite64 method implementing a standard clock device interface (Optional).
Definition devices.h:545
clock_device_read_proc deviceread
A device specific DeviceRead method implementing a standard clock device interface (Or nil if the def...
Definition devices.h:543
uint32_t minrate
Device minimum rate (Hz).
Definition devices.h:555
DEVICE device
The Device entry for this Clock device.
Definition devices.h:537
clock_device_read64_proc deviceread64
A device specific DeviceRead64 method implementing a standard clock device interface (Mandatory).
Definition devices.h:544
CLOCK_DEVICE * next
Next entry in Clock device table.
Definition devices.h:559
clock_device_start_proc devicestart
A device specific DeviceStart method implementing a standard clock device interface (Or nil if the de...
Definition devices.h:541
CLOCK_DEVICE * prev
Previous entry in Clock device table.
Definition devices.h:558
uint32_t maxrate
Device maximum rate (Hz).
Definition devices.h:556
uint32_t rate
Device rate (Hz).
Definition devices.h:554
clock_device_stop_proc devicestop
A device specific DeviceStop method implementing a standard clock device interface (Or nil if the def...
Definition devices.h:542
clock_device_get_rate_proc devicegetrate
A device specific DeviceGetRate method implementing a standard clock device interface (Or nil if the ...
Definition devices.h:546
uint32_t clockstate
Clock device state (eg CLOCK_STATE_ENABLED).
Definition devices.h:540
uint32_t readcount
Definition devices.h:550
clock_device_get_properties_proc devicegetproperties
A device specific DeviceGetProperties method implementing a standard clock device interface (Or nil i...
Definition devices.h:548
void * address
Device register base address.
Definition devices.h:553
uint32_t minrate
Device minimum clock rate (Hz).
Definition devices.h:511
uint32_t flags
Device flags (eg CLOCK_FLAG_WRITABLE).
Definition devices.h:509
uint32_t maxrate
Device maximum clock rate (Hz).
Definition devices.h:512
uint32_t rate
Device current clock rate (Hz).
Definition devices.h:510
DEVICE_FIRMWARE * next
Next entry in Device Firmware table.
Definition devices.h:417
char name[FIRMWARE_NAME_LENGTH]
The device specific name of the firmware which may be a filename, a device model, id or type.
Definition devices.h:410
device_firmware_handler handler
The device specific callback for the handler which provides this firmware.
Definition devices.h:414
void * buffer
For block (memory) based firmware, the buffer passed to Create or nil for other firmware types.
Definition devices.h:412
uint32_t deviceclass
The Device class supported by this firmware (or DEVICE_CLASS_ANY for all devices).
Definition devices.h:409
FIRMWARE_HANDLE * handles
List of currently open handles for this firmware.
Definition devices.h:413
uint32_t size
For block (memory) based firmware, the size passed to Create or 0 for other firmware types.
Definition devices.h:411
DEVICE_FIRMWARE * prev
Previous entry in Device Firmware table.
Definition devices.h:416
uint32_t devicestate
Device state (eg Registered/Unregistered).
Definition devices.h:386
uint32_t deviceclass
The class of this Device (eg DEVICE_CLASS_USB, DEVICE_CLASS_NETWORK, DEVICE_CLASS_STORAGE etc).
Definition devices.h:388
uint32_t deviceflags
The class specific Device flags.
Definition devices.h:391
uint32_t devicetype
A class specific Device type (eg KEYBOARD_TYPE_USB, MOUSE_TYPE_USB, NETWORK_TYPE_ETHERNET etc).
Definition devices.h:390
char devicedescription[DEVICE_DESC_LENGTH]
A description of the Device (eg BCM2835 PL011 UART).
Definition devices.h:393
DEVICE * prev
Previous entry in Device table.
Definition devices.h:395
uint32_t devicebus
The Bus type for the Device (eg DEVICE_BUS_USB).
Definition devices.h:389
uint32_t deviceid
Unique Id of this Device in the Device table.
Definition devices.h:385
void * devicedata
A pointer to a class specific Device interface (eg PUSBDevice, PNetworkDevice or PStorageDevice etc) ...
Definition devices.h:392
char devicename[DEVICE_NAME_LENGTH]
The name of the Device (eg Keyboard0, Storage0 or Network0 etc).
Definition devices.h:387
DEVICE * next
Next entry in Device table.
Definition devices.h:396
uint32_t signature
Signature for entry validation.
Definition devices.h:384
char drivername[DRIVER_NAME_LENGTH]
Descriptive name for the Driver (eg USB Mouse Driver).
Definition devices.h:477
uint32_t driverstate
Driver state (eg Registered/Unregistered).
Definition devices.h:476
uint32_t driverclass
The class of this Driver (eg DRIVER_CLASS_USB etc).
Definition devices.h:478
DRIVER * next
Next entry in Driver table.
Definition devices.h:481
uint32_t signature
Signature for entry validation.
Definition devices.h:474
DRIVER * prev
Previous entry in Driver table.
Definition devices.h:480
uint32_t driverid
Unique Id of this Driver in the Driver table.
Definition devices.h:475
HANDLE handle
Definition devices.h:423
FIRMWARE_HANDLE * next
Definition devices.h:424
HOST * next
Next entry in Host table.
Definition devices.h:501
uint32_t hoststate
Host state (eg Registered/Unregistered).
Definition devices.h:496
char hostname[HOST_NAME_LENGTH]
Descriptive name for the Host (eg DWC OTG Host).
Definition devices.h:497
uint32_t hostclass
The class of this Host (eg HOST_CLASS_USB etc).
Definition devices.h:498
uint32_t hostid
Unique Id of this Host in the Host table.
Definition devices.h:495
HOST * prev
Previous entry in Host table.
Definition devices.h:500
uint32_t signature
Signature for entry validation.
Definition devices.h:494
mailbox_device_send_proc devicesend
A device specific DeviceSend method implementing a standard mailbox device interface (Mandatory).
Definition devices.h:723
MAILBOX_DEVICE * next
Next entry in Mailbox device table.
Definition devices.h:737
MUTEX_HANDLE lock
Device lock.
Definition devices.h:732
uint32_t callcount
Definition devices.h:730
DEVICE device
The Device entry for this Mailbox device.
Definition devices.h:716
uint32_t sendcount
Definition devices.h:729
uint32_t receivecount
Definition devices.h:728
mailbox_device_call_proc devicecall
A device specific DeviceCall method implementing a standard mailbox device interface (Mandatory).
Definition devices.h:724
uint32_t mailboxstate
Mailbox device state (eg MAILBOX_STATE_ENABLED).
Definition devices.h:719
MAILBOX_DEVICE * prev
Previous entry in Mailbox device table.
Definition devices.h:736
uint32_t timeout
Device timeout (Milliseconds).
Definition devices.h:734
void * address
Device register base address.
Definition devices.h:733
uint32_t mailboxid
Unique Id of this Mailbox device in the Mailbox device table.
Definition devices.h:718
mailbox_device_stop_proc devicestop
A device specific DeviceStop method implementing a standard mailbox device interface (Or nil if the d...
Definition devices.h:721
mailbox_device_start_proc devicestart
A device specific DeviceStart method implementing a standard mailbox device interface (Or nil if the ...
Definition devices.h:720
mailbox_device_receive_proc devicereceive
A device specific DeviceReceive method implementing a standard mailbox device interface (Mandatory).
Definition devices.h:722
mailbox_device_get_timeout_proc devicegettimeout
A device specific DeviceGetTimeout method implementing a standard mailbox device interface (Or nil if...
Definition devices.h:725
mailbox_device_set_timeout_proc devicesettimeout
A device specific DeviceSetTimeout method implementing a standard mailbox device interface (Or nil if...
Definition devices.h:726
uint32_t notification
Definition devices.h:461
DEVICE * device
Definition devices.h:460
uint32_t notification
Definition devices.h:452
device_notification_cb callback
Definition devices.h:450
void * data
Definition devices.h:451
NOTIFIER_TASK * next
Definition devices.h:453
DEVICE * device
Definition devices.h:449
uint32_t notification
The mask of events to notify on (eg DEVICE_NOTIFICATION_REGISTER etc).
Definition devices.h:439
uint32_t deviceclass
The Device class to notify on (or DEVICE_CLASS_ANY for all devices).
Definition devices.h:436
NOTIFIER * next
Next entry in Notifier table.
Definition devices.h:442
device_notification_cb callback
The callback for device notifications.
Definition devices.h:437
NOTIFIER * prev
Previous entry in Notifier table.
Definition devices.h:441
uint32_t notifierstate
Notifier state (eg Registered/Unregistered).
Definition devices.h:433
void * data
A pointer to callback specific data to be passed with notifications (Optional).
Definition devices.h:438
uint32_t notifierflags
Notifier flags (eg NOTIFIER_FLAG_WORKER).
Definition devices.h:434
uint32_t signature
Signature for entry validation.
Definition devices.h:432
DEVICE * device
The Device to notify on (or nil for all devices).
Definition devices.h:435
random_device_read_double_proc devicereaddouble
A device specific DeviceReadFloat method implementing a standard random device interface (Or nil if t...
Definition devices.h:683
MUTEX_HANDLE lock
Device lock.
Definition devices.h:688
random_device_seed_proc deviceseed
A device specific DeviceSeed method implementing a standard random device interface (Or nil if the de...
Definition devices.h:678
DEVICE device
The Device entry for this Random device.
Definition devices.h:672
random_device_read_byte_proc devicereadbyte
A device specific DeviceReadByte method implementing a standard random device interface (Or nil if th...
Definition devices.h:679
random_device_read_word_proc devicereadword
A device specific DeviceReadWord method implementing a standard random device interface (Or nil if th...
Definition devices.h:680
uint32_t seedcount
Definition devices.h:685
random_device_read_longword_proc devicereadlongword
A device specific DeviceReadLongWord method implementing a standard random device interface (Mandator...
Definition devices.h:681
RANDOM_DEVICE * prev
Previous entry in Random device table.
Definition devices.h:691
uint32_t randomid
Unique Id of this Random device in the Random device table.
Definition devices.h:674
RANDOM_DEVICE * next
Next entry in Random device table.
Definition devices.h:692
uint32_t readcount
Definition devices.h:686
void * address
Device register base address.
Definition devices.h:689
random_device_read_long_long_proc devicereadquadword
A device specific DeviceReadQuadWord method implementing a standard random device interface (Or nil i...
Definition devices.h:682
random_device_start_proc devicestart
A device specific DeviceStart method implementing a standard random device interface (Mandatory).
Definition devices.h:676
uint32_t randomstate
Random device state (eg RANDOM_STATE_ENABLED).
Definition devices.h:675
random_device_stop_proc devicestop
A device specific DeviceStop method implementing a standard random device interface (Or nil if the de...
Definition devices.h:677
timer_device_set_rate_proc devicesetrate
A device specific DeviceSetRate method implementing a standard timer device interface (Or nil if the ...
Definition devices.h:626
timer_device_start_proc devicestart
A device specific DeviceStart method implementing a standard timer device interface (Mandatory).
Definition devices.h:618
MUTEX_HANDLE lock
Device lock.
Definition devices.h:635
timer_device_get_properties_proc devicegetproperties
A device specific DeviceGetProperties method implementing a standard timer device interface (Or nil i...
Definition devices.h:629
timer_device_read64_proc deviceread64
A device specific DeviceRead64 method implementing a standard timer device interface (One of Read or ...
Definition devices.h:621
uint32_t waitcount
Definition devices.h:632
TIMER_WAITER * waiters
List of events waiting for this timer.
Definition devices.h:644
timer_device_event_proc deviceevent
A device specific DeviceEvent method implementing a standard timer device interface (Or nil if the op...
Definition devices.h:623
timer_device_get_rate_proc devicegetrate
A device specific DeviceGetRate method implementing a standard timer device interface (Or nil if the ...
Definition devices.h:625
DEVICE device
The Device entry for this Timer device.
Definition devices.h:614
timer_device_cancel_proc devicecancel
A device specific DeviceCancel method implementing a standard timer device interface (Or nil if the o...
Definition devices.h:624
uint32_t eventcount
Definition devices.h:633
timer_device_set_interval_proc devicesetinterval
A device specific DeviceSetInterval method implementing a standard timer device interface (Or nil if ...
Definition devices.h:628
timer_device_wait_proc devicewait
A device specific DeviceWait method implementing a standard timer device interface (Or nil if the ope...
Definition devices.h:622
timer_device_read_proc deviceread
A device specific DeviceRead method implementing a standard timer device interface (One of Read or Re...
Definition devices.h:620
uint32_t flags
Event flags for this timer (eg TIMER_EVENT_FLAG_REPEAT).
Definition devices.h:641
TIMER_PROPERTIES properties
Device properties.
Definition devices.h:639
uint32_t rate
Device rate (Hz).
Definition devices.h:637
uint32_t timerstate
Timer device state (eg TIMER_STATE_ENABLED).
Definition devices.h:617
uint32_t count
Count of threads and events waiting for this timer.
Definition devices.h:642
TIMER_DEVICE * next
Next entry in Timer device table.
Definition devices.h:647
uint32_t timerid
Unique Id of this Timer device in the Timer device table.
Definition devices.h:616
timer_device_get_interval_proc devicegetinterval
A device specific DeviceGetInterval method implementing a standard timer device interface (Or nil if ...
Definition devices.h:627
uint32_t readcount
Definition devices.h:631
void * address
Device register base address.
Definition devices.h:636
timer_device_stop_proc devicestop
A device specific DeviceStop method implementing a standard timer device interface (Mandatory).
Definition devices.h:619
uint32_t interval
Device interval (Ticks).
Definition devices.h:638
EVENT_HANDLE event
Event for threads waiting for this timer.
Definition devices.h:643
TIMER_DEVICE * prev
Previous entry in Timer device table.
Definition devices.h:646
uint32_t minrate
Device minimum clock rate (Hz).
Definition devices.h:571
uint32_t mininterval
Device minimum interval (Ticks).
Definition devices.h:573
uint32_t flags
Device flags (eg TIMER_FLAG_WRAPPING).
Definition devices.h:569
uint32_t maxrate
Device maximum clock rate (Hz).
Definition devices.h:572
uint32_t maxinterval
Device maximum interval (Ticks).
Definition devices.h:574
uint32_t bits
Number of valid bits in timer read (eg 32 or 64).
Definition devices.h:570
void * data
Pointer to pass to the callback function when event occurs.
Definition devices.h:587
TIMER_WAITER * prev
Previous event in the list.
Definition devices.h:588
timer_cb callback
Callback function to call when event occurs.
Definition devices.h:586
TIMER_DEVICE * timer
Timer device this waiter belongs to.
Definition devices.h:585
TIMER_WAITER * next
Next event in the list.
Definition devices.h:589
WATCHDOG_DEVICE * prev
Previous entry in Watchdog device table.
Definition devices.h:779
MUTEX_HANDLE lock
Device lock.
Definition devices.h:775
WATCHDOG_DEVICE * next
Next entry in Watchdog device table.
Definition devices.h:780
watchdog_device_stop_proc devicestop
A device specific DeviceStop method implementing a standard watchdog device interface (Mandatory).
Definition devices.h:765
uint32_t stopcount
Definition devices.h:772
DEVICE device
The Device entry for this Watchdog device.
Definition devices.h:760
uint32_t watchdogstate
Watchdog device state (eg WATCHDOG_STATE_ENABLED).
Definition devices.h:763
watchdog_device_refresh_proc devicerefresh
A device specific DeviceRefresh method implementing a standard watchdog device interface (Mandatory).
Definition devices.h:766
watchdog_device_get_remain_proc devicegetremain
A device specific DeviceGetRemain method implementing a standard watchdog device interface (Mandatory...
Definition devices.h:767
watchdog_device_set_timeout_proc devicesettimeout
A device specific DeviceSetTimeout method implementing a standard watchdog device interface (Or nil i...
Definition devices.h:769
watchdog_device_get_timeout_proc devicegettimeout
A device specific DeviceGetTimeout method implementing a standard watchdog device interface (Or nil i...
Definition devices.h:768
uint32_t refreshcount
Definition devices.h:773
uint32_t timeout
Device timeout (Milliseconds).
Definition devices.h:777
void * address
Device register base address.
Definition devices.h:776
uint32_t watchdogid
Unique Id of this Watchdog device in the Watchdog device table.
Definition devices.h:762
watchdog_device_start_proc devicestart
A device specific DeviceStart method implementing a standard watchdog device interface (Mandatory).
Definition devices.h:764
uint32_t startcount
Definition devices.h:771