Changeset 41ef5b9 in mainline for uspace/drv/ohci/hc.h
- Timestamp:
- 2011-03-21T17:16:10Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 4d0c40b
- Parents:
- fd9f6e4c (diff), 434ef65 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/ohci/hc.h
rfd9f6e4c r41ef5b9 26 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 27 */ 28 29 /** @addtogroup drvusbohcihc 28 /** @addtogroup drvusbohci 30 29 * @{ 31 30 */ … … 33 32 * @brief OHCI host controller driver structure 34 33 */ 35 #ifndef DRV_OHCI_ OHCI_HC_H36 #define DRV_OHCI_ OHCI_HC_H34 #ifndef DRV_OHCI_HC_H 35 #define DRV_OHCI_HC_H 37 36 38 37 #include <fibril.h> … … 42 41 43 42 #include <usb/usb.h> 43 #include <usb/host/device_keeper.h> 44 44 #include <usbhc_iface.h> 45 45 46 46 #include "batch.h" 47 47 #include "ohci_regs.h" 48 #include " ohci_rh.h"48 #include "root_hub.h" 49 49 50 typedef struct ohci_hc {50 typedef struct hc { 51 51 ohci_regs_t *registers; 52 52 usb_address_t rh_address; 53 ohci_rh_t rh;53 rh_t rh; 54 54 ddf_fun_t *ddf_instance; 55 } ohci_hc_t; 55 usb_device_keeper_t manager; 56 fid_t interrupt_emulator; 57 } hc_t; 56 58 57 int ohci_hc_init(ohci_hc_t *instance, ddf_fun_t *fun,59 int hc_init(hc_t *instance, ddf_fun_t *fun, ddf_dev_t *dev, 58 60 uintptr_t regs, size_t reg_size, bool interrupts); 59 61 60 int ohci_hc_schedule(ohci_hc_t *instance, batch_t *batch);62 int hc_register_hub(hc_t *instance); 61 63 62 void ohci_hc_interrupt(ohci_hc_t *instance, uint16_t status); 64 int hc_schedule(hc_t *instance, usb_transfer_batch_t *batch); 65 66 void hc_interrupt(hc_t *instance, uint32_t status); 63 67 64 68 /** Safely dispose host controller internal structures … … 66 70 * @param[in] instance Host controller structure to use. 67 71 */ 68 static inline void ohci_hc_fini(ohci_hc_t *instance) { /* TODO: implement*/ };72 static inline void hc_fini(hc_t *instance) { /* TODO: implement*/ }; 69 73 70 74 /** Get and cast pointer to the driver data … … 73 77 * @return cast pointer to driver_data 74 78 */ 75 static inline ohci_hc_t * fun_to_ohci_hc(ddf_fun_t *fun)76 { return ( ohci_hc_t*)fun->driver_data; }79 static inline hc_t * fun_to_hc(ddf_fun_t *fun) 80 { return (hc_t*)fun->driver_data; } 77 81 #endif 78 82 /**
Note:
See TracChangeset
for help on using the changeset viewer.