Changeset b4b534ac in mainline for uspace/lib/usbhost/include/usb/host/ddf_helpers.h
- Timestamp:
- 2016-07-22T08:24:47Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f76d2c2
- Parents:
- 5b18137 (diff), 8351f9a4 (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/lib/usbhost/include/usb/host/ddf_helpers.h
r5b18137 rb4b534ac 1 1 /* 2 * Copyright (c) 201 1 Vojtech Horky2 * Copyright (c) 2012 Jan Vesely 3 3 * All rights reserved. 4 4 * … … 26 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 27 */ 28 /** @addtogroup drvusbohci 28 29 /** @addtogroup libusbhost 29 30 * @{ 30 31 */ 31 32 /** @file 32 * PCI related functions needed by OHCI driver.33 * 33 34 */ 34 #ifndef DRV_OHCI_RES_H 35 #define DRV_OHCI_RES_H 35 36 #ifndef LIBUSBHOST_HOST_DDF_HELPERS_H 37 #define LIBUSBHOST_HOST_DDF_HELPERS_H 38 39 #include <usb/host/hcd.h> 40 #include <usb/host/usb_bus.h> 41 #include <usb/usb.h> 36 42 37 43 #include <ddf/driver.h> 44 #include <ddf/interrupt.h> 38 45 #include <device/hw_res_parsed.h> 39 46 40 int get_my_registers(ddf_dev_t *, addr_range_t *, int *); 41 int enable_interrupts(ddf_dev_t *); 47 typedef int (*driver_init_t)(hcd_t *, const hw_res_list_parsed_t *, bool); 48 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 52 typedef struct { 53 hcd_ops_t ops; 54 claim_t claim; 55 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 const char *name; 61 } ddf_hc_driver_t; 62 63 int hcd_ddf_add_hc(ddf_dev_t *device, const ddf_hc_driver_t *driver); 64 65 int hcd_ddf_setup_hc(ddf_dev_t *device, usb_speed_t max_speed, 66 size_t bw, bw_count_func_t bw_count); 67 void hcd_ddf_clean_hc(ddf_dev_t *device); 68 int hcd_ddf_setup_root_hub(ddf_dev_t *device); 69 70 hcd_t *dev_to_hcd(ddf_dev_t *dev); 71 72 int hcd_ddf_enable_interrupts(ddf_dev_t *device); 73 int hcd_ddf_get_registers(ddf_dev_t *device, hw_res_list_parsed_t *hw_res); 74 int hcd_ddf_setup_interrupts(ddf_dev_t *device, 75 const hw_res_list_parsed_t *hw_res, 76 interrupt_handler_t handler, 77 int (*gen_irq_code)(irq_code_t *, const hw_res_list_parsed_t *)); 78 void ddf_hcd_gen_irq_handler(ipc_callid_t iid, ipc_call_t *call, ddf_dev_t *dev); 42 79 43 80 #endif 81 44 82 /** 45 83 * @} 46 84 */ 47
Note:
See TracChangeset
for help on using the changeset viewer.