Changeset e4d7363 in mainline for uspace/lib/usbhost/include/usb/host/ddf_helpers.h
- Timestamp:
- 2017-06-22T21:34:39Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 91ca111
- Parents:
- cb89430
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbhost/include/usb/host/ddf_helpers.h
rcb89430 re4d7363 45 45 #include <device/hw_res_parsed.h> 46 46 47 typedef int (*driver_init_t)(hcd_t *, const hw_res_list_parsed_t *, bool); 47 typedef int (*driver_init_t)(hcd_t *, const hw_res_list_parsed_t *); 48 typedef int (*irq_code_gen_t)(irq_code_t *, hcd_t *, const hw_res_list_parsed_t *); 49 typedef int (*claim_t)(hcd_t *, ddf_dev_t *); 50 typedef int (*driver_start_t)(hcd_t *, bool irq); 51 52 typedef void (*driver_stop_t)(hcd_t *); 48 53 typedef void (*driver_fini_t)(hcd_t *); 49 typedef int (*claim_t)(ddf_dev_t *);50 typedef int (*irq_code_gen_t)(irq_code_t *, const hw_res_list_parsed_t *);51 54 55 /** 56 * All callbacks are optional. 57 */ 52 58 typedef struct { 53 59 hcd_ops_t ops; 54 claim_t claim;55 60 usb_speed_t hc_speed; 56 driver_init_t init;57 driver_fini_t fini;58 interrupt_handler_t *irq_handler;59 irq_code_gen_t irq_code_gen;60 61 const char *name; 62 63 interrupt_handler_t *irq_handler; /**< Handler of IRQ. Do have generic implementation. */ 64 65 /* Initialization sequence: */ 66 driver_init_t init; /**< Initialize internal structures, memory */ 67 claim_t claim; /**< Claim device from BIOS */ 68 irq_code_gen_t irq_code_gen; /**< Generate IRQ handling code */ 69 driver_start_t start; /**< Start the HC */ 70 71 /* Destruction sequence: */ 72 driver_stop_t stop; /**< Stop the HC (counterpart of start) */ 73 driver_fini_t fini; /**< Destroy internal structures (counterpart of init) */ 61 74 } ddf_hc_driver_t; 62 75 … … 75 88 const hw_res_list_parsed_t *hw_res, 76 89 interrupt_handler_t handler, 77 i nt (*gen_irq_code)(irq_code_t *, const hw_res_list_parsed_t *));90 irq_code_gen_t gen_irq_code); 78 91 void ddf_hcd_gen_irq_handler(ipc_callid_t iid, ipc_call_t *call, ddf_dev_t *dev); 79 92
Note:
See TracChangeset
for help on using the changeset viewer.