diff options
| author | sakumisu <[email protected]> | 2025-07-01 21:21:53 +0800 |
|---|---|---|
| committer | sakumisu <[email protected]> | 2025-07-01 21:21:59 +0800 |
| commit | 832e4c45fb659214d9ab9f8edee71e248f8aa96b (patch) | |
| tree | a185d2734e95bb5becf85f9004da6016e5c6977a /docs/source/api | |
| parent | 52ea7e8dcfb96d01a1fade18ea29a15685eda5ca (diff) | |
fix(class/hub): change urb interval unit to us
Signed-off-by: sakumisu <[email protected]>
Diffstat (limited to 'docs/source/api')
| -rw-r--r-- | docs/source/api/api_port.rst | 47 |
1 files changed, 25 insertions, 22 deletions
diff --git a/docs/source/api/api_port.rst b/docs/source/api/api_port.rst index daed52e7..c214daa7 100644 --- a/docs/source/api/api_port.rst +++ b/docs/source/api/api_port.rst @@ -186,33 +186,36 @@ usbh_submit_urb .. code-block:: C - struct usbh_urb { - void *hcpriv; - struct usbh_hubport *hport; - struct usb_endpoint_descriptor *ep; - uint8_t data_toggle; - struct usb_setup_packet *setup; - uint8_t *transfer_buffer; - uint32_t transfer_buffer_length; - int transfer_flags; - uint32_t actual_length; - uint32_t timeout; - int errorcode; - uint32_t num_of_iso_packets; - uint32_t start_frame; - usbh_complete_callback_t complete; - void *arg; - #if defined(__ICCARM__) || defined(__ICCRISCV__) || defined(__ICCRX__) - struct usbh_iso_frame_packet *iso_packet; - #else - struct usbh_iso_frame_packet iso_packet[0]; - #endif - }; + struct usbh_urb { + usb_slist_t list; + void *hcpriv; + struct usbh_hubport *hport; + struct usb_endpoint_descriptor *ep; + uint8_t data_toggle; + uint8_t interval; + struct usb_setup_packet *setup; + uint8_t *transfer_buffer; + uint32_t transfer_buffer_length; + int transfer_flags; + uint32_t actual_length; + uint32_t timeout; + int errorcode; + uint32_t num_of_iso_packets; + uint32_t start_frame; + usbh_complete_callback_t complete; + void *arg; + #if defined(__ICCARM__) || defined(__ICCRISCV__) || defined(__ICCRX__) + struct usbh_iso_frame_packet *iso_packet; + #else + struct usbh_iso_frame_packet iso_packet[0]; + #endif + }; - **hcpriv** 主机控制器驱动私有成员 - **hport** 当前 urb 使用的 hport - **ep** 当前 urb 使用的 ep - **data_toggle** 当前 data toggle +- **interval** urb 传输间隔,单位 us,如果 interval 大于 1000us,则需要使用软件定时器来维护 - **setup** setup 请求缓冲区,端点0使用 - **transfer_buffer** 传输的数据缓冲区 - **transfer_buffer_length** 传输长度 |
