Ignore:
Timestamp:
2011-08-24T13:32:47Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5fe0a69
Parents:
31bc40e
Message:

Fix: only reset ep if the control transfer was sucessful.

File:
1 edited

Legend:

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

    r31bc40e rdf8f3fa  
    4141#include <usb/host/batch.h>
    4242#include <usbhc_iface.h>
    43 //#include <driver.h>
    4443
    4544typedef struct hcd hcd_t;
     
    5453        void (*batch_private_dtor)(void *);
    5554};
    56 
     55/*----------------------------------------------------------------------------*/
    5756static inline int hcd_init(hcd_t *hcd, size_t bandwidth)
    5857{
     
    6160        return usb_endpoint_manager_init(&hcd->ep_manager, bandwidth);
    6261}
    63 
     62/*----------------------------------------------------------------------------*/
     63static inline void reset_ep_if_need(
     64    hcd_t *hcd, usb_target_t target, const char* setup_data)
     65{
     66        assert(hcd);
     67        usb_endpoint_manager_reset_if_need(
     68            &hcd->ep_manager, target, (const uint8_t *)setup_data);
     69}
     70/*----------------------------------------------------------------------------*/
    6471static inline hcd_t * fun_to_hcd(ddf_fun_t *fun)
    6572{
     
    6774        return fun->driver_data;
    6875}
    69 
     76/*----------------------------------------------------------------------------*/
    7077extern usbhc_iface_t hcd_iface;
    7178
Note: See TracChangeset for help on using the changeset viewer.