|
|
The pseudod driver's region data structure contains more data than the udi_cmos driver's region data structure, to manage simulating reads and writes on a device.
pseudod.c sample code (cont.) |
---|
NOTE: pseudo_region_data_t is defined in the pseudod.h header file.
/* * Region data */ #define PSEUDO_BUF_SZ 1024 typedef struct pseudo_region_data { udi_init_context_t init_context; test_state_t testmode; udi_ubit32_t testcounter; udi_ubit8_t rx_queue[PSEUDO_BUF_SZ]; /* A 'holding' place for * writes */ udi_ubit8_t * tx_queue; /* The test pattern we * generate to fulfill reads. * points to a movable mem blk. */ udi_bus_bind_cb_t *bus_bind_cb; udi_xfer_constraints_t xfer_constraints; /* xfer constraints */ } pseudo_region_data_t; |