diff --git a/src/boards/electronut_labs_papyr/board.h b/src/boards/electronut_labs_papyr/board.h index 738dd50..2dd931c 100644 --- a/src/boards/electronut_labs_papyr/board.h +++ b/src/boards/electronut_labs_papyr/board.h @@ -60,7 +60,8 @@ #define UF2_BOARD_ID "nRF52840-Papyr-v1" #define UF2_INDEX_URL "https://docs.electronut.in/papyr" -#define USB_DESC_VID 0x239A -#define USB_DESC_UF2_PID 0x003B +#define USB_DESC_VID 0x239A +#define USB_DESC_UF2_PID 0x003B +#define USB_DESC_CDC_ONLY_PID 0x003B #endif // PPAPYR_H diff --git a/src/usb/usb_desc.c b/src/usb/usb_desc.c index effc252..a0a4d3a 100644 --- a/src/usb/usb_desc.c +++ b/src/usb/usb_desc.c @@ -87,7 +87,7 @@ enum { uint8_t const desc_configuration_cdc_msc[] = { // Interface count, string index, total length, attribute, power in mA - TUD_CONFIG_DESCRIPTOR(1, ITF_NUM_TOTAL, 0, TUD_CONFIG_DESC_LEN + TUD_CDC_DESC_LEN + TUD_MSC_DESC_LEN, TUSB_DESC_CONFIG_ATT_REMOTE_WAKEUP, 100), + TUD_CONFIG_DESCRIPTOR(1, ITF_NUM_TOTAL, 0, TUD_CONFIG_DESC_LEN + TUD_CDC_DESC_LEN + TUD_MSC_DESC_LEN, 0, 100), // Interface number, string index, EP notification address and size, EP data address (out, in) and size. TUD_CDC_DESCRIPTOR(ITF_NUM_CDC, ITF_STR_CDC, 0x81, 8, 0x02, 0x82, 64), @@ -99,7 +99,7 @@ uint8_t const desc_configuration_cdc_msc[] = uint8_t const desc_configuration_cdc_only[] = { // Interface count, string index, total length, attribute, power in mA - TUD_CONFIG_DESCRIPTOR(1, ITF_NUM_TOTAL-1, 0, TUD_CONFIG_DESC_LEN + TUD_CDC_DESC_LEN, TUSB_DESC_CONFIG_ATT_REMOTE_WAKEUP, 100), + TUD_CONFIG_DESCRIPTOR(1, ITF_NUM_TOTAL-1, 0, TUD_CONFIG_DESC_LEN + TUD_CDC_DESC_LEN, 0, 100), // Interface number, string index, EP notification address and size, EP data address (out, in) and size. TUD_CDC_DESCRIPTOR(ITF_NUM_CDC, ITF_STR_CDC, 0x81, 8, 0x02, 0x82, 64), diff --git a/src/usb/usb_desc.h b/src/usb/usb_desc.h index 7553794..3b318c2 100644 --- a/src/usb/usb_desc.h +++ b/src/usb/usb_desc.h @@ -30,16 +30,4 @@ void usb_desc_init(bool cdc_only); -#ifndef USB_DESC_VID -#define USB_DESC_VID 0x239A -#endif - -#ifndef USB_DESC_UF2_PID -#define USB_DESC_UF2_PID 0x0029 -#endif - -#ifndef USB_DESC_CDC_ONLY_PID -#define USB_DESC_CDC_ONLY_PID 0x002A -#endif - #endif /* USB_DESC_H_ */