diff options
| author | Ha Thach <[email protected]> | 2020-04-11 15:49:34 +0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-04-11 15:49:34 +0700 |
| commit | 04a06ec40147f1f44cfee0567667cc97bbe900ee (patch) | |
| tree | e1efa890fa3ceb93e15244ba6e6df3e61c701910 /src/device/usbd.h | |
| parent | 4748b349a2812fb2e08f7dfd04866afd50acb98f (diff) | |
| parent | 13a3081d308828ae6e4b9a40bb8ac7bf5b0e424c (diff) | |
Merge branch 'master' into refactor-irqhandler
Diffstat (limited to 'src/device/usbd.h')
| -rw-r--r-- | src/device/usbd.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/device/usbd.h b/src/device/usbd.h index 2bb9821ed..6b31d8113 100644 --- a/src/device/usbd.h +++ b/src/device/usbd.h @@ -65,6 +65,20 @@ static inline bool tud_ready(void) // Remote wake up host, only if suspended and enabled by host bool tud_remote_wakeup(void); +static inline bool tud_disconnect(void) +{ + TU_VERIFY(dcd_disconnect); + dcd_disconnect(TUD_OPT_RHPORT); + return true; +} + +static inline bool tud_connect(void) +{ + TU_VERIFY(dcd_connect); + dcd_connect(TUD_OPT_RHPORT); + return true; +} + // Carry out Data and Status stage of control transfer // - If len = 0, it is equivalent to sending status only // - If len > wLength : it will be truncated |
