|
21 | 21 | * 2. Define PICO_STDIO_USB_ENABLE_RESET_VIA_VENDOR_INTERFACE=1
|
22 | 22 | * 3. Add `TUD_RPI_RESET_DESCRIPTOR(<ITF_NUM>, <STR_IDX>)` to your USB descriptors (length is `TUD_RPI_RESET_DESC_LEN`)
|
23 | 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 |
| 24 | + * - If it does, you need to add the `pico_usb_reset_interface_driver` to the drivers returned |
25 | 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 | 26 | * 5. Check if your project has an existing Microsoft OS 2.0 Descriptor:
|
27 | 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`)
|
|
144 | 144 | #include "stdint.h"
|
145 | 145 | #include "device/usbd_pvt.h"
|
146 | 146 |
|
147 |
| -void resetd_init(void); |
148 |
| -void resetd_reset(uint8_t __unused rhport); |
149 |
| -uint16_t resetd_open(uint8_t __unused rhport, tusb_desc_interface_t const *itf_desc, uint16_t max_len); |
150 |
| -bool resetd_control_xfer_cb(uint8_t __unused rhport, uint8_t stage, tusb_control_request_t const * request); |
151 |
| -bool resetd_xfer_cb(uint8_t __unused rhport, uint8_t __unused ep_addr, xfer_result_t __unused result, uint32_t __unused xferred_bytes); |
| 147 | +void pico_usb_reset_interface_init(void); |
| 148 | +void pico_usb_reset_interface_reset(uint8_t __unused rhport); |
| 149 | +uint16_t pico_usb_reset_interface_open(uint8_t __unused rhport, tusb_desc_interface_t const *itf_desc, uint16_t max_len); |
| 150 | +bool pico_usb_reset_interface_control_xfer_cb(uint8_t __unused rhport, uint8_t stage, tusb_control_request_t const * request); |
| 151 | +bool pico_usb_reset_interface_xfer_cb(uint8_t __unused rhport, uint8_t __unused ep_addr, xfer_result_t __unused result, uint32_t __unused xferred_bytes); |
152 | 152 |
|
153 |
| -static usbd_class_driver_t const _resetd_driver = |
| 153 | +static usbd_class_driver_t const pico_usb_reset_interface_driver = |
154 | 154 | {
|
155 | 155 | #if CFG_TUSB_DEBUG >= 2
|
156 | 156 | .name = "RESET",
|
157 | 157 | #endif
|
158 |
| - .init = resetd_init, |
159 |
| - .reset = resetd_reset, |
160 |
| - .open = resetd_open, |
161 |
| - .control_xfer_cb = resetd_control_xfer_cb, |
162 |
| - .xfer_cb = resetd_xfer_cb, |
| 158 | + .init = pico_usb_reset_interface_init, |
| 159 | + .reset = pico_usb_reset_interface_reset, |
| 160 | + .open = pico_usb_reset_interface_open, |
| 161 | + .control_xfer_cb = pico_usb_reset_interface_control_xfer_cb, |
| 162 | + .xfer_cb = pico_usb_reset_interface_xfer_cb, |
163 | 163 | .sof = NULL
|
164 | 164 | };
|
165 | 165 |
|
|
0 commit comments