summaryrefslogtreecommitdiff
path: root/docs/source/api/api_host.rst
diff options
context:
space:
mode:
authorsakumisu <[email protected]>2024-07-23 20:13:28 +0800
committersakumisu <[email protected]>2024-07-23 20:13:28 +0800
commit4c4ee7f0031ffbffb9e684d72d03bdda3c824b99 (patch)
tree2caafad57d20a15f9f328e1991b36870b5f23dc0 /docs/source/api/api_host.rst
parent1c2fd3407a826de56d230508bf4ad3f64f69d7a2 (diff)
chore(docs): update rst
Diffstat (limited to 'docs/source/api/api_host.rst')
-rw-r--r--docs/source/api/api_host.rst20
1 files changed, 16 insertions, 4 deletions
diff --git a/docs/source/api/api_host.rst b/docs/source/api/api_host.rst
index 4fb12f20..9d77441c 100644
--- a/docs/source/api/api_host.rst
+++ b/docs/source/api/api_host.rst
@@ -49,11 +49,11 @@ CLASS 驱动信息结构体
.. code-block:: C
struct usbh_interface {
- struct usbh_interface_altsetting altsetting[CONFIG_USBHOST_MAX_INTF_ALTSETTINGS];
- uint8_t altsetting_num;
char devname[CONFIG_USBHOST_DEV_NAMELEN];
struct usbh_class_driver *class_driver;
void *priv;
+ struct usbh_interface_altsetting altsetting[CONFIG_USBHOST_MAX_INTF_ALTSETTINGS];
+ uint8_t altsetting_num;
};
配置结构体
@@ -76,6 +76,9 @@ hubport 结构体
uint8_t port; /* Hub port index */
uint8_t dev_addr; /* device address */
uint8_t speed; /* device speed */
+ uint8_t depth; /* distance from root hub */
+ uint8_t route; /* route string */
+ uint8_t slot_id; /* slot id */
struct usb_device_descriptor device_desc;
struct usbh_configuration config;
const char *iManufacturer;
@@ -84,6 +87,8 @@ hubport 结构体
uint8_t *raw_config_desc;
struct usb_setup_packet *setup;
struct usbh_hub *parent;
+ struct usbh_hub *self; /* if this hubport is a hub */
+ struct usbh_bus *bus;
struct usb_endpoint_descriptor ep0;
struct usbh_urb ep0_urb;
usb_osal_mutex_t mutex;
@@ -95,17 +100,24 @@ hub 结构体
.. code-block:: C
struct usbh_hub {
- usb_slist_t list;
bool connected;
bool is_roothub;
uint8_t index;
uint8_t hub_addr;
- struct usb_hub_descriptor hub_desc;
+ uint8_t speed;
+ uint8_t nports;
+ uint8_t powerdelay;
+ uint8_t tt_think;
+ bool ismtt;
+ struct usb_hub_descriptor hub_desc; /* USB 2.0 only */
+ struct usb_hub_ss_descriptor hub_ss_desc; /* USB 3.0 only */
struct usbh_hubport child[CONFIG_USBHOST_MAX_EHPORTS];
struct usbh_hubport *parent;
+ struct usbh_bus *bus;
struct usb_endpoint_descriptor *intin;
struct usbh_urb intin_urb;
uint8_t *int_buffer;
+ struct usb_osal_timer *int_timer;
};
usbh_initialize