Selecting Product-ID for new device

mborgerson

Well-known member
I'm at the point of writing a Claim() function for my USBTMC device driver. A starting point for most Claim() functions is a check of the USB VID and PID. The VID will be the Teensy VID, 0x16C0, as is the case for all existing Teensy USB devices. I feel I should pick a PID that is unique in the list of PIDs used by Teensy devices. Here is a list of the existing PIDs that I found in usb_desc.h and in an online database at: Teensy PIDs

Code:
 In order of appearance in usb_desc.h       
    USB FUNCTION        PID
    USB_SERIAL        0x0483
    USB_DUAL_SERIAL        0x048B
    USB_TRIPLE_SERIAL    0x0486
    USB_MIDI        0x0485
    USB_KEYBOARDONLY    0x04D0
    USB_HID            0x0482
    USB_SERIAL_HID        0x0487
    USB_TOUCHSCREEN        0x04D3
    USB_HID_TOUCHSCREEN    0x04D4
    USB_MIDI4        0x0485
    USB_MID16        0x0485
    USB_MIDI_SERIAL        0x0489
    USB_MIDI4_SERIAL    0x0489
    USB_MIDI16_SERIAL    0x0489
    USB_RAWHID        0x0486
    USB_FLIGHTSIM        0x0488
    USB_FLIGHTSIM_JOYSTICK    0x0488
    USB_MTPDISK        0x04D1
    USB_MTPDISK_SERIAL    0x04D5
    USB_AUDIO        0x04D2
    USB_MIDI_AUDIO_SERIAL    0x048A
    USB_MIDI16_AUDIO_SERIAL    0x048A
    USB_EVERYTHING        0x0476    !Not available on T4.x
            
    Sorted in order of PID       
    USB FUNCTION        PID
    USB_EVERYTHING        0x0476  !Not available on T4.x
    USB_HID            0x0482
    USB_SERIAL        0x0483
    USB_MID            0x0485
    USB_MIDI4        0x0485
    USB_MIDI6        0x0485
    USB_RAWHID        0x0486
    USB_TRIPLE_SERIAL    0x0486
    USB_SERIAL_HID        0x0487
    USB_FLIGHTSIM        0x0488
    USB_FLIGHTSIM_JOYSTICK    0x0488
    USB_MIDI_SERIAL        0x0489
    USB_MIDI16_SERIAL    0x0489
    USB_MIDI4_SERIAL    0x0489
    USB_MIDI_AUDIO_SERIAL    0x048A
    USB_MIDI16_AUDIO_SERIAL    0x048A
    USB_DUAL_SERIAL        0x048B
    USB_KEYBOARDONLY    0x04D0
    USB_MTPDISK        0x04D1
    USB_AUDIO        0x04D2
    USB_TOUCHSCREEN        0x04D3
    USB_HID_TOUCHSCREEN    0x04D4
    USB_MTPDISK_SERIAL    0x04D5
            
    From Online Data Base         USB\VID_16C0 = Van Ooijen Technische Informatica - USB ID Database - 
                                                  Vendor ID and Product ID list - the sz development (the-sz.com)
    Teensy Rebooter        0x0477
    Teensy Halfkay Bootloader 0x0478
    Teensy Debug        0x0479
    Teensy Serial        0x047A
    Teensy Serial+Debug    0x047B
    Teensy Keyboard        0x047C
    Teensy Keyboard+Debug    0X047D
    Teensy Mouse        0x047E
    Teensy Mouse+Debug    0x047F
    Teensy RawHID        0x0480
    Teensy RawHID+Debug    0x0481
    Teensy Keyboard+Mouse+Joystick    0X0482
    Teensyduino Serial    0x0483
    Teensyduino Disk    0X0484
    TeensyDuino Midi    0X0485
    TeensyDuino RawHID    0X0486
    Teensyduino Serial+Mouse+Keyboard+Joystick 0X0487
    Teensyduino Flight Sim Controls    0X0488

I apologize for the appearance of the list. It seems that none of the font choices available in the display options are monospaced fonts--such as Consolas--that could be used to get the name and numbers columns to line up nicely. If you want a pretty list, copy the text into an editor that allows the selection of a monospace font.

As you can see in the list, several PIDs are used for small variations of a device. For example, three MIDI devices with different numbers of jacks all use 0x0489. The online list doesn't include all the PIDs in usb_desc .h but does include a number that are not in the current usb_desc.h. There are gaps in the list, in particular, there are no PID's between 0x048B and 0x4D0. I think I'll leave that gap in place and choose 0x04D8. The 0x04Dx numbers include newer devices, such as MTP, so a number in that range seems OK.

The database PIDs may be a reflection of some older Teensy developments. The most interesting part is the prevalence of "+Debug" in the list. That may indicate that earlier development systems had a functional debug interface that is not now available (but often requested) on the T3.x and T4.x boards. IMHO, the"+Debug" part may be a good reason for reserving endpoint 1 in all current Teensy devices. Of course, there's really only one opinion that matters in that case! ;-)
 
Back
Top