udi_bus_device_ops_t(3udi)


Device driver entry point ops vector

SYNOPSIS

#include <udi.h>

typedef const struct {

	udi_channel_event_ind_op_t *channel_event_ind_op;

	udi_bus_bind_ack_op_t *bus_bind_ack_op;

	udi_bus_unbind_ack_op_t *bus_unbind_ack_op;

	udi_intr_attach_ack_op_t *intr_attach_ack_op;

	udi_intr_detach_ack_op_t *intr_detach_ack_op;

} udi_bus_device_ops_t;
 
/* Bus Device Ops Vector Number */
 
#define  UDI_BUS_DEVICE_OPS_NUM				1
 

DESCRIPTION A driver using the Physical I/O services will specify the udi_bus_device_ops_t as part of its udi_init_info in order to register its entry points for managing bus bindings and handling interrupts (as opposed to dispatching interrupts).

REFERENCES udi_init_info, udi_ops_init_t, udi_bus_bridge_ops_t

EXAMPLE The driver's initialization structure definitions might include the following:

#define MY_DEVICE_OPS 10 /* Ops for my child role */

#define MY_BRIDGE_OPS 11 /* Ops for my bridge role */

#define MY_BUS_META   1 /* Meta index for Bus Bridge Metalanguage */

static

   udi_bus_device_ops_t ddd_bus_device_ops = {

	ddd_bus_device_channel_event_ind,

	ddd_bus_bind_ack,

	ddd_bus_unbind_ack,

	ddd_intr_attach_ack,

	ddd_intr_detach_ack

};

...

static udi_ops_init_t ddd_ops_init_list[] = {

	{	MY_DEVICE_OPS,

		MY_BUS_META,

		UDI_BUS_DEVICE_OPS_NUM,

		0, /* chan_context_size */

		(udi_ops_vector_t *)&ddd_bus_device_ops },

	{ 0 }

};
 

UDI Physical I/O Specification Contents