Skip to content

Commit c5615f1

Browse files
committed
Add documentation to usb_reset_interface.h
1 parent 0410fa6 commit c5615f1

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

src/common/pico_usb_reset_interface_headers/include/pico/usb_reset_interface.h

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,24 @@
88
#define _PICO_USB_RESET_INTERFACE_H
99

1010
/** \file usb_reset_interface.h
11-
* \defgroup pico_usb_reset_interface_headers pico_usb_reset_interface_headers
11+
* \defgroup pico_usb_reset_interface pico_usb_reset_interface
1212
*
13-
* \brief Definition for the reset interface that may be exposed by the pico_usb_reset_interface library
13+
* \brief Functionality to enable the RP-series microcontroller to be reset over the USB interface.
14+
*
15+
* This library can be used to enable the RP-series microcontroller to be reset over the USB interface.
16+
*
17+
* This functionality is included by default when using the `pico_stdio_usb` library and not using TinyUSB directly.
18+
*
19+
* To add this functionality to a project using TinyUSB directly, you need to:
20+
* 1. Link the pico_usb_reset_interface library, and include the `pico/usb_reset_interface.h` header file where needed.
21+
* 2. Define PICO_STDIO_USB_ENABLE_RESET_VIA_VENDOR_INTERFACE=1
22+
* 3. Add `TUD_RPI_RESET_DESCRIPTOR(<ITF_NUM>, <STR_IDX>)` to your USB descriptors (length is `TUD_RPI_RESET_DESC_LEN`)
23+
* 4. Check if your project has an existing `usbd_app_driver_get_cb` function:
24+
* - If it does, you need to add the `_resetd_driver` to the drivers returned
25+
* - If it does not, and you aren't using the `pico_stdio_usb` library, you need to define `PICO_STDIO_USB_RESET_INCLUDE_APP_DRIVER_CB=1`
26+
* 5. Check if your project has an existing Microsoft OS 2.0 Descriptor:
27+
* - If it does, you need to add the Function Subset header `RPI_RESET_MS_OS_20_DESCRIPTOR(<ITF_NUM>)` to your Microsoft OS 2.0 Descriptor (length is `RPI_RESET_MS_OS_20_DESC_LEN`)
28+
* - If it does not, you need to define `PICO_STDIO_USB_RESET_INTERFACE_SUPPORT_MS_OS_20_DESCRIPTOR=1` and `PICO_STDIO_USB_RESET_INTERFACE_MS_OS_20_DESCRIPTOR_ITF=<ITF_NUM>`
1429
*/
1530

1631
// These defines are used by picotool

0 commit comments

Comments
 (0)