modifly to use multi usb(not tested)

This commit is contained in:
LeeChunHei
2021-02-13 18:50:47 +08:00
committed by LeeChunHei
parent 75a4efc406
commit fa5c8e1502
5 changed files with 34 additions and 25 deletions
@@ -136,7 +136,8 @@ struct uhcd
struct rt_device parent;
uhcd_ops_t ops;
rt_uint8_t num_ports;
uhub_t roothub;
uhub_t roothub;
struct rt_messagequeue *usb_mq;
};
typedef struct uhcd* uhcd_t;
@@ -163,7 +164,7 @@ struct uhost_msg
typedef struct uhost_msg* uhost_msg_t;
/* usb host system interface */
rt_err_t rt_usb_host_init(void);
rt_err_t rt_usb_host_init(const char *name);
void rt_usbh_hub_init(struct uhcd *hcd);
/* usb host core interface */
@@ -203,7 +204,7 @@ rt_err_t rt_usbh_hub_clear_port_feature(uhub_t uhub, rt_uint16_t port,
rt_err_t rt_usbh_hub_set_port_feature(uhub_t uhub, rt_uint16_t port,
rt_uint16_t feature);
rt_err_t rt_usbh_hub_reset_port(uhub_t uhub, rt_uint16_t port);
rt_err_t rt_usbh_event_signal(struct uhost_msg* msg);
rt_err_t rt_usbh_event_signal(uhcd_t uhcd, struct uhost_msg* msg);
void rt_usbh_root_hub_connect_handler(struct uhcd *hcd, rt_uint8_t port, rt_bool_t isHS);