Changes in uspace/drv/ohci/hc.h [62265ce:02cacce] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/ohci/hc.h
r62265ce r02cacce 53 53 #define OHCI_NEEDED_IRQ_COMMANDS 5 54 54 55 /** Main OHCI drier structure */ 55 56 typedef struct hc { 57 /** USB bus driver, devices and addresses */ 58 usb_device_keeper_t manager; 59 /** USB bus driver, endpoints */ 60 usb_endpoint_manager_t ep_manager; 61 62 /** Memory mapped I/O registers area */ 56 63 ohci_regs_t *registers; 64 /** Host controller communication area structure */ 57 65 hcca_t *hcca; 58 66 59 usb_address_t rh_address; 60 rh_t rh; 61 67 /** Transfer schedules */ 62 68 endpoint_list_t lists[4]; 69 /** List of active transfers */ 63 70 link_t pending_batches; 64 71 65 usb_device_keeper_t manager; 66 usb_endpoint_manager_t ep_manager; 72 /** Fibril for periodic checks if interrupts can't be used */ 67 73 fid_t interrupt_emulator; 74 75 /** Guards schedule and endpoint manipulation */ 68 76 fibril_mutex_t guard; 69 77 … … 73 81 /** Commands that form interrupt code */ 74 82 irq_cmd_t interrupt_commands[OHCI_NEEDED_IRQ_COMMANDS]; 83 84 /** USB hub emulation structure */ 85 rh_t rh; 75 86 } hc_t; 76 87 77 88 int hc_register_hub(hc_t *instance, ddf_fun_t *hub_fun); 78 79 89 int hc_init(hc_t *instance, uintptr_t regs, size_t reg_size, bool interrupts); 80 81 90 void hc_start_hw(hc_t *instance); 82 91 … … 85 94 * @param[in] instance Host controller structure to use. 86 95 */ 87 static inline void hc_fini(hc_t *instance) { /* TODO: implement*/ }; 96 static inline void hc_fini(hc_t *instance) 97 { /* TODO: implement*/ }; 88 98 89 99 int hc_add_endpoint(hc_t *instance, usb_address_t address, usb_endpoint_t ep, 90 100 usb_speed_t speed, usb_transfer_type_t type, usb_direction_t direction, 91 101 size_t max_packet_size, size_t size, unsigned interval); 92 93 102 int hc_remove_endpoint(hc_t *instance, usb_address_t address, 94 103 usb_endpoint_t endpoint, usb_direction_t direction); 95 96 104 endpoint_t * hc_get_endpoint(hc_t *instance, usb_address_t address, 97 105 usb_endpoint_t endpoint, usb_direction_t direction, size_t *bw); 98 106 99 107 int hc_schedule(hc_t *instance, usb_transfer_batch_t *batch); 100 101 108 void hc_interrupt(hc_t *instance, uint32_t status); 102 109 … … 107 114 */ 108 115 static inline hc_t * fun_to_hc(ddf_fun_t *fun) 109 { return (hc_t*)fun->driver_data; }116 { return fun->driver_data; } 110 117 #endif 111 118 /**
Note:
See TracChangeset
for help on using the changeset viewer.