diff options
| author | Felix "xq" Queißner <[email protected]> | 2023-01-02 17:09:45 +0100 |
|---|---|---|
| committer | hathach <[email protected]> | 2024-04-08 19:00:35 +0700 |
| commit | 47c12a07f2edf927eaa685ee8c32b222271d770f (patch) | |
| tree | 5b7ad8bd791604f89d188416930baf8364fea459 /src/device | |
| parent | bc10394e66f9658a696fee11d15cdc8ff1d66432 (diff) | |
Implements tuh_deinit() and tud_deinit() to uninitialize host/device mode.
Diffstat (limited to 'src/device')
| -rw-r--r-- | src/device/dcd.h | 3 | ||||
| -rw-r--r-- | src/device/usbd.h | 5 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/device/dcd.h b/src/device/dcd.h index 69c26bcf4..21f404e4f 100644 --- a/src/device/dcd.h +++ b/src/device/dcd.h @@ -122,6 +122,9 @@ void dcd_dcache_clean_invalidate(void const* addr, uint32_t data_size) TU_ATTR_W // Initialize controller to device mode void dcd_init(uint8_t rhport); +// Deinitialize controller, unset device mode. +void dcd_deinit(uint8_t rhport); + // Interrupt Handler void dcd_int_handler(uint8_t rhport); diff --git a/src/device/usbd.h b/src/device/usbd.h index 2e3987b99..a9350192b 100644 --- a/src/device/usbd.h +++ b/src/device/usbd.h @@ -37,9 +37,12 @@ extern "C" { // Application API //--------------------------------------------------------------------+ -// Init device stack +// Init device stack on roothub port bool tud_init (uint8_t rhport); +// Deinit device stack on roothub port +void tud_deinit(uint8_t rhport); + // Check if device stack is already initialized bool tud_inited(void); |
