summaryrefslogtreecommitdiff
path: root/docs/source/api/api_host.rst
diff options
context:
space:
mode:
authorEgahp <[email protected]>2025-08-30 19:24:02 +0800
committerGitHub <[email protected]>2025-08-30 19:24:02 +0800
commit5d5b61a606b1d2ba5512ef3c71fb11975eed5e40 (patch)
tree8f593c4a65226036b17b75d9d35c94718b5e431e /docs/source/api/api_host.rst
parent257b1d4d20d2ddc77de33dad041088ba7500400d (diff)
feat: host add event callback mechanism similar to device
* fix: fix warning for speed_table * fix(port/dwc2/usb_hc_dwc2): add roothub.speed init * feat(usbh_core): add event_callback * fix(usbh_hub): fix event device reset port * fix(usbh_hub): remove event init when init failed * feat(usbh_core): add default dummy_event_callback * fix(usbh_hub): emit reset event only on successful reset * fix(usbh_core): emit interface start only on successful connect class driver * feat(usbh_core): change event_callback to typedef * feat(port): update port usbh init params * doc: update usbh_initialize desc * fix(usbh_core): check result from ret == 0 change to ret >= 0 --------- Signed-off-by: egahp <[email protected]>
Diffstat (limited to 'docs/source/api/api_host.rst')
-rw-r--r--docs/source/api/api_host.rst3
1 files changed, 2 insertions, 1 deletions
diff --git a/docs/source/api/api_host.rst b/docs/source/api/api_host.rst
index 3368f47f..28287a0b 100644
--- a/docs/source/api/api_host.rst
+++ b/docs/source/api/api_host.rst
@@ -126,10 +126,11 @@ usbh_initialize
.. code-block:: C
- int usbh_initialize(uint8_t busid, uint32_t reg_base);
+ int usbh_initialize(uint8_t busid, uint32_t reg_base, usbh_event_handler_t event_handler);
- **busid** bus id,从 0开始,不能超过 `CONFIG_USBHOST_MAX_BUS`
- **reg_base** hcd 寄存器基地址
+- **event_handler** host 事件回调函数,可以为NULL
- **return** 0 表示正常其他表示错误
usbh_find_class_instance