From 1551ff63255feea17f7f7adea64d5eedf734c614 Mon Sep 17 00:00:00 2001 From: awalol Date: Tue, 14 Apr 2026 22:39:50 +0800 Subject: [PATCH] DSE compile options --- CMakeLists.txt | 1 + src/usb_descriptors.c | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1a4abc3..cfeb9e5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -56,6 +56,7 @@ target_include_directories(wdl_resampler PUBLIC target_compile_options(wdl_resampler PRIVATE -fsigned-char) target_compile_options(ds5-bridge PRIVATE -fsigned-char) +#target_compile_options(ds5-bridge PRIVATE -DENABLE_DSE) # 将PID和产品名称设置为DSE target_compile_definitions(ds5-bridge PRIVATE CYW43_LWIP=0 PICO_FLASH_ASSUME_CORE1_SAFE=1 diff --git a/src/usb_descriptors.c b/src/usb_descriptors.c index 6910e2f..da95863 100644 --- a/src/usb_descriptors.c +++ b/src/usb_descriptors.c @@ -46,7 +46,11 @@ static tusb_desc_device_t const desc_device = .bMaxPacketSize0 = CFG_TUD_ENDPOINT0_SIZE, .idVendor = 0x054C, +#ifdef ENABLE_DSE + .idProduct = 0x0DF2, +#else .idProduct = 0x0CE6, +#endif .bcdDevice = 0x0100, .iManufacturer = 0x01, @@ -500,7 +504,11 @@ static char const *string_desc_arr[] = { (const char[]){0x09, 0x04}, // 0: is supported language is English (0x0409) "Sony Interactive Entertainment", // 1: Manufacturer +#ifdef ENABLE_DSE + "DualSense Edge Wireless Controller", +#else "DualSense Wireless Controller", // 2: Product +#endif NULL, // 3: Serials will use unique ID if possible };