change inferface handler parameter
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2565 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
parent
aa49ca9db3
commit
6374d20fad
|
@ -61,7 +61,6 @@ struct uendpoint
|
||||||
uep_desc_t ep_desc;
|
uep_desc_t ep_desc;
|
||||||
udep_handler_t handler;
|
udep_handler_t handler;
|
||||||
rt_bool_t is_stall;
|
rt_bool_t is_stall;
|
||||||
void* user_data;
|
|
||||||
};
|
};
|
||||||
typedef struct uendpoint* uep_t;
|
typedef struct uendpoint* uep_t;
|
||||||
|
|
||||||
|
@ -75,13 +74,15 @@ struct ualtsetting
|
||||||
};
|
};
|
||||||
typedef struct ualtsetting* ualtsetting_t;
|
typedef struct ualtsetting* ualtsetting_t;
|
||||||
|
|
||||||
|
typedef rt_err_t (*uintf_handler_t)(struct udevice* device, struct uclass* cls, ureq_t setup);
|
||||||
|
|
||||||
struct uinterface
|
struct uinterface
|
||||||
{
|
{
|
||||||
rt_list_t list;
|
rt_list_t list;
|
||||||
rt_uint8_t intf_num;
|
rt_uint8_t intf_num;
|
||||||
ualtsetting_t curr_setting;
|
ualtsetting_t curr_setting;
|
||||||
rt_list_t setting_list;
|
rt_list_t setting_list;
|
||||||
rt_err_t (*handler)(struct udevice* device, ureq_t setup);
|
uintf_handler_t handler;
|
||||||
};
|
};
|
||||||
typedef struct uinterface* uintf_t;
|
typedef struct uinterface* uintf_t;
|
||||||
|
|
||||||
|
@ -100,7 +101,8 @@ struct uclass
|
||||||
void* eps;
|
void* eps;
|
||||||
struct udevice* device;
|
struct udevice* device;
|
||||||
udev_desc_t dev_desc;
|
udev_desc_t dev_desc;
|
||||||
|
void* user_data;
|
||||||
|
|
||||||
rt_list_t intf_list;
|
rt_list_t intf_list;
|
||||||
};
|
};
|
||||||
typedef struct uclass* uclass_t;
|
typedef struct uclass* uclass_t;
|
||||||
|
@ -158,8 +160,7 @@ udevice_t rt_usbd_device_create(const char** str);
|
||||||
uconfig_t rt_usbd_config_create(void);
|
uconfig_t rt_usbd_config_create(void);
|
||||||
uclass_t rt_usbd_class_create(udevice_t device, udev_desc_t dev_desc,
|
uclass_t rt_usbd_class_create(udevice_t device, udev_desc_t dev_desc,
|
||||||
uclass_ops_t ops);
|
uclass_ops_t ops);
|
||||||
uintf_t rt_usbd_interface_create(udevice_t device,
|
uintf_t rt_usbd_interface_create(udevice_t device, uintf_handler_t handler);
|
||||||
rt_err_t (*handler)(struct udevice*, ureq_t setup));
|
|
||||||
uep_t rt_usbd_endpoint_create(uep_desc_t ep_desc, udep_handler_t handler);
|
uep_t rt_usbd_endpoint_create(uep_desc_t ep_desc, udep_handler_t handler);
|
||||||
ualtsetting_t rt_usbd_altsetting_create(rt_size_t desc_size);
|
ualtsetting_t rt_usbd_altsetting_create(rt_size_t desc_size);
|
||||||
|
|
||||||
|
@ -180,7 +181,7 @@ rt_err_t rt_usbd_set_altsetting(uintf_t intf, rt_uint8_t value);
|
||||||
|
|
||||||
udevice_t rt_usbd_find_device(udcd_t dcd);
|
udevice_t rt_usbd_find_device(udcd_t dcd);
|
||||||
uconfig_t rt_usbd_find_config(udevice_t device, rt_uint8_t value);
|
uconfig_t rt_usbd_find_config(udevice_t device, rt_uint8_t value);
|
||||||
uintf_t rt_usbd_find_interface(udevice_t device, rt_uint8_t value);
|
uintf_t rt_usbd_find_interface(udevice_t device, rt_uint8_t value, uclass_t *pcls);
|
||||||
uep_t rt_usbd_find_endpoint(udevice_t device, uclass_t* pcls, rt_uint8_t ep_addr);
|
uep_t rt_usbd_find_endpoint(udevice_t device, uclass_t* pcls, rt_uint8_t ep_addr);
|
||||||
|
|
||||||
uclass_t rt_usbd_class_mstorage_create(udevice_t device);
|
uclass_t rt_usbd_class_mstorage_create(udevice_t device);
|
||||||
|
|
Loading…
Reference in New Issue