Uniform Driver Interface: Difference between revisions
[unchecked revision] | [unchecked revision] |
Content deleted Content added
Added more realistic configuration file and udi_cb_t definition |
|||
Line 65:
Below you can see a sample udiprops.txt:
properties_version 0x101
message 1 Project UDI
message 2 http://www.project-UDI.org/participants.html
message 3 Pseudo-Driver
message 4 Generic UDI Pseudo-Driver
release 3 1.01
supplier 1
contact 2
name 3
shortname pseudod
##
module example▼
## Interface dependencies
##
requires udi 0x101
requires udi_gio 0x101
##
## Build instructions.
##
region 0
##
## Metalanguage usage
##
meta 1 udi_gio # Generic I/O Metalanguage
▲ compile_options -DCMOS_BRIDGE_META=1
▲ source_files udi_example.c
child_bind_ops 1 0 1 # GIO meta, primary region, ops_index 1
# Orphan driver; no device line
#
# Initialization, shutdown messages
#
message 1100 pseudod: devmgmt_req %d
message 1500 pseudod: final_cleanup_req
Of course, udiprops.txt can be a lot more complex than this, I only wanted you to see what
==Data objects==
Line 102 ⟶ 126:
Each control block may own a scratch space which is driver-specific and must be preserved across asynchronous and service calls. The driver can change the size for its control blocks' scratch spaces and if any of these are zero in size, their pointers must not be dereferenced.
<source lang="c">
typedef struct {
udi_channel_t channel;
void *context;
void *scratch;
void *initiator_context;
udi_origin_t origin;
} udi_cb_t;
</source>
==Initial state==
|