Changeset 7191992 in mainline for uspace/lib/usbhost/include/usb/host


Ignore:
Timestamp:
2014-01-02T19:49:35Z (12 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
1a0fa29c
Parents:
7813516
Message:

libusbhost: Add more helper functions.

Location:
uspace/lib/usbhost/include/usb/host
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbhost/include/usb/host/ddf_helpers.h

    r7813516 r7191992  
    5858    interrupt_handler_t handler,
    5959    int (*gen_irq_code)(irq_code_t *, const hw_res_list_parsed_t *));
     60void ddf_hcd_gen_irq_handler(ddf_dev_t *dev, ipc_callid_t iid, ipc_call_t *call);
     61int ddf_hcd_device_setup_all(ddf_dev_t *device, usb_speed_t speed, size_t bw,
     62    bw_count_func_t bw_count,
     63    interrupt_handler_t irq_handler,
     64    int (*gen_irq_code)(irq_code_t *, const hw_res_list_parsed_t *hw_res),
     65    int (*driver_init)(hcd_t *, const hw_res_list_parsed_t *, bool),
     66    void (*driver_fini)(hcd_t *));
    6067
    6168#endif
  • uspace/lib/usbhost/include/usb/host/hcd.h

    r7813516 r7191992  
    5151typedef int (*ep_add_hook_t)(hcd_t *, endpoint_t *);
    5252typedef void (*ep_remove_hook_t)(hcd_t *, endpoint_t *);
     53typedef void (*interrupt_hook_t)(hcd_t *, uint32_t);
    5354
    5455typedef struct {
     
    6162        /** Hook called upon removing of an endpoint. */
    6263        ep_remove_hook_t ep_remove_hook;
     64        /** Hook to be called on device interrupt, passes ARG1 */
     65        interrupt_hook_t irq_hook;
    6366} hc_driver_t;
    6467
     
    7679
    7780static inline void hcd_set_implementation(hcd_t *hcd, void *data,
    78     schedule_hook_t schedule, ep_add_hook_t add_hook, ep_remove_hook_t rem_hook)
     81    schedule_hook_t schedule, ep_add_hook_t add_hook, ep_remove_hook_t rem_hook,
     82    interrupt_hook_t irq_hook)
    7983{
    8084        assert(hcd);
     
    8387        hcd->driver.ep_add_hook = add_hook;
    8488        hcd->driver.ep_remove_hook = rem_hook;
     89        hcd->driver.irq_hook = irq_hook;
    8590}
    8691
Note: See TracChangeset for help on using the changeset viewer.