Ignore:
Timestamp:
2014-01-18T17:14:42Z (10 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3e200736
Parents:
19b3cc6
Message:

libusbhost: Add status hook.

Implement in UHCI, OHCI

File:
1 edited

Legend:

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

    r19b3cc6 re26a9d95  
    5252typedef void (*ep_remove_hook_t)(hcd_t *, endpoint_t *);
    5353typedef void (*interrupt_hook_t)(hcd_t *, uint32_t);
     54typedef int (*status_hook_t)(hcd_t *, uint32_t *);
    5455
    5556typedef struct {
     
    6465        /** Hook to be called on device interrupt, passes ARG1 */
    6566        interrupt_hook_t irq_hook;
     67        /** Periodic polling hook */
     68        status_hook_t status_hook;
    6669} hc_driver_t;
    6770
     
    8083static inline void hcd_set_implementation(hcd_t *hcd, void *data,
    8184    schedule_hook_t schedule, ep_add_hook_t add_hook, ep_remove_hook_t rem_hook,
    82     interrupt_hook_t irq_hook)
     85    interrupt_hook_t irq_hook, status_hook_t status_hook)
    8386{
    8487        assert(hcd);
     
    8891        hcd->driver.ep_remove_hook = rem_hook;
    8992        hcd->driver.irq_hook = irq_hook;
     93        hcd->driver.status_hook = status_hook;
    9094}
    9195
Note: See TracChangeset for help on using the changeset viewer.