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