Working on usb_desc.h. I have hijacked the TRIPLE_SERIAL entry. I had to comment out a few lines of code in yield.cpp that wanted that third serial port keying off #ifdef USB_TRIPLE_SERIAL.
Unfortunately, it doesn't work. The serial ports don't work, the audio doesn't work, Windows says "This device cannot start. (Code 10)" in Device Manager.
--------------- snip --------------------
#elif defined(USB_TRIPLE_SERIAL)
#define VENDOR_ID 0x16C0
#define PRODUCT_ID 0x048C
#define MANUFACTURER_NAME {'T','e','e','n','s','y','d','u','i','n','o'}
#define MANUFACTURER_NAME_LEN 11
#define PRODUCT_NAME {'T','r','i','p','l','e',' ','S','e','r','i','a','l'}
#define PRODUCT_NAME_LEN 13
#define EP0_SIZE 64\
// Two serial ports plus one audio
#define NUM_ENDPOINTS 8
#define NUM_INTERFACE 5
#define CDC_IAD_DESCRIPTOR 1 // Serial
#define CDC_STATUS_INTERFACE 0
#define CDC_DATA_INTERFACE 1
#define CDC_ACM_ENDPOINT 2
#define CDC_RX_ENDPOINT 3
#define CDC_TX_ENDPOINT 3
#define CDC_ACM_SIZE 16
#define CDC_RX_SIZE_480 512
#define CDC_TX_SIZE_480 512
#define CDC_RX_SIZE_12 64
#define CDC_TX_SIZE_12 64
#define CDC2_STATUS_INTERFACE 2 // second Serial
#define CDC2_DATA_INTERFACE 3
#define CDC2_ACM_ENDPOINT 4
#define CDC2_RX_ENDPOINT 5
#define CDC2_TX_ENDPOINT 5
// Audio
#define AUDIO_INTERFACE 4 // Audio (uses 3 consecutive interfaces)
#define AUDIO_TX_ENDPOINT 6
#define AUDIO_TX_SIZE 180
#define AUDIO_RX_ENDPOINT 6
#define AUDIO_RX_SIZE 180
#define AUDIO_SYNC_ENDPOINT 7
// #define CDC3_STATUS_INTERFACE 4 // SerialUSB2
// #define CDC3_DATA_INTERFACE 5
// #define CDC3_ACM_ENDPOINT 6
// #define CDC3_RX_ENDPOINT 7
// #define CDC3_TX_ENDPOINT 7
// first serial port
#define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_UNUSED + ENDPOINT_TRANSMIT_INTERRUPT
#define ENDPOINT3_CONFIG ENDPOINT_RECEIVE_BULK + ENDPOINT_TRANSMIT_BULK
//second serial port
#define ENDPOINT4_CONFIG ENDPOINT_RECEIVE_UNUSED + ENDPOINT_TRANSMIT_INTERRUPT
#define ENDPOINT5_CONFIG ENDPOINT_RECEIVE_BULK + ENDPOINT_TRANSMIT_BULK
// Audio Endpoints
#define ENDPOINT6_CONFIG ENDPOINT_RECEIVE_ISOCHRONOUS + ENDPOINT_TRANSMIT_ISOCHRONOUS
#define ENDPOINT7_CONFIG ENDPOINT_RECEIVE_UNUSED + ENDPOINT_TRANSMIT_ISOCHRONOUS
//Audio endpoints
---------------- endsnip ---------------
I note that other audio sections have a thing called "SEREMU" - Serial emulator? Is that somehow connected to the audio?
Or is it just a spare emulated serial port for whatever?
Is there something magical about the product ID? Does Windows "know" that it's supposed to be three serial ports?
- Jerryk