Skip to content

Commit

Permalink
Switched to new VID:PID from https://pid.codes. Big thanks!
Browse files Browse the repository at this point in the history
  • Loading branch information
skuep committed Jan 15, 2023
1 parent b5d9859 commit 74cedb3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 23 deletions.
13 changes: 0 additions & 13 deletions stm32/aioc-fw/Src/usb_descriptors.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,6 @@
#include "usb_descriptors.h"
#include "stm32f3xx_hal.h"

/* A combination of interfaces must have a unique product id, since PC will save device driver after the first plug.
* Same VID/PID with different interface e.g MSC (first), then CDC (later) will possibly cause system error on PC.
*
* Auto ProductID layout's Bitmap:
* [MSB] MIDI | HID | MSC | CDC [LSB]
*/
#define _PID_MAP(itf, n) ( (CFG_TUD_##itf) << (n) )
#define USB_PID (0x4000 | _PID_MAP(CDC, 0) | _PID_MAP(MSC, 1) | _PID_MAP(HID, 2) | \
_PID_MAP(MIDI, 3) | _PID_MAP(VENDOR, 4) | _PID_MAP(AUDIO, 5))

#define USB_VID 0xCafe
#define USB_BCD 0x0200

//--------------------------------------------------------------------+
// Device Descriptors
//--------------------------------------------------------------------+
Expand Down
24 changes: 14 additions & 10 deletions stm32/aioc-fw/Src/usb_descriptors.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,20 @@ enum USB_STRING_IDX {
STR_IDX_AUDIOOUTCHAN,
};

#define USB_STRING_MANUFACTURER "TinyUSB"
#define USB_STRING_PRODUCT "TinyUSB Device"
#define USB_STRING_CDCITF "TinyUSB CDC"
#define USB_STRING_AUDIOITF "TinyUSB Audio"
#define USB_STRING_AUDIOIN "TinyUSB Audio In"
#define USB_STRING_AUDIOOUT "TinyUSB Audio Out"
#define USB_STRING_AUDIOINVOL "TinyUSB Audio In Volume"
#define USB_STRING_AUDIOOUTVOL "TinyUSB Audio Out Volume"
#define USB_STRING_AUDIOINCHAN "TinyUSB Audio In Channel"
#define USB_STRING_AUDIOOUTCHAN "TinyUSB Audio Out CHannel"
#define USB_VID 0x1209
#define USB_PID 0x7388
#define USB_BCD 0x0200

#define USB_STRING_MANUFACTURER "AIOC"
#define USB_STRING_PRODUCT "All-In-One-Cable"
#define USB_STRING_CDCITF "AIOC CDC"
#define USB_STRING_AUDIOITF "AIOC Audio"
#define USB_STRING_AUDIOIN "AIOC Audio In"
#define USB_STRING_AUDIOOUT "AIOC Audio Out"
#define USB_STRING_AUDIOINVOL "AIOC Audio In Volume"
#define USB_STRING_AUDIOOUTVOL "AIOC Audio Out Volume"
#define USB_STRING_AUDIOINCHAN "AIOC Audio In Channel"
#define USB_STRING_AUDIOOUTCHAN "AIOC Audio Out CHannel"

/* Endpoints */
#define EPNUM_AUDIO_IN 0x81
Expand Down

0 comments on commit 74cedb3

Please sign in to comment.