summaryrefslogtreecommitdiff
path: root/src/device
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2026-02-13 23:46:36 +0700
committerGitHub <[email protected]>2026-02-13 23:46:36 +0700
commitda102806114f90e9fec99b875d6dcf0134d873f2 (patch)
treea19e77e93d1e9b690dd0ac27cf1f22682f142c86 /src/device
parentd13284d02da552c843e3ccbda4472083f25b0b16 (diff)
parentf0b44ec6154237a4bd65a5a9d8f8bf944669af64 (diff)
Merge pull request #3476 from hathach/dwc2_vbus
DWC2 Vbus sensing enhancement
Diffstat (limited to 'src/device')
-rw-r--r--src/device/usbd.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/device/usbd.h b/src/device/usbd.h
index 4016a45a4..825fdba90 100644
--- a/src/device/usbd.h
+++ b/src/device/usbd.h
@@ -41,8 +41,13 @@ enum {
typedef struct {
uint16_t bm_double_buffered; // bitmap of IN endpoints to be double buffered, only effective for bulk endpoints
+ bool vbus_sensing; // Vbus pin is used for device connection detection, mandatory for tud_umount_cb()
} tud_configure_dwc2_t;
+ #ifndef CFG_TUD_CONFIGURE_DWC2_DEFAULT
+ #define CFG_TUD_CONFIGURE_DWC2_DEFAULT {.bm_double_buffered = 0, .vbus_sensing = CFG_TUD_VBUS_DETECT_HW}
+ #endif
+
typedef union {
tud_configure_dwc2_t dwc2;
} tud_configure_param_t;