adafruit / Adafruit_TinyUSB_Arduino

Arduino library for TinyUSB
MIT License
476 stars 127 forks source link

USBD_CDC: Allow setting the CDC string descriptor #430

Closed jepler closed 3 months ago

jepler commented 3 months ago

I'm having trouble figuring out why there are two separate implementations of "CDC", one in src/arduino and one in src/arduino/cdc @hathach

hathach commented 3 months ago

I'm having trouble figuring out why there are two separate implementations of "CDC", one in src/arduino and one in src/arduino/cdc @hathach

one is host, one is device, the naming is easy to miss. The cdc device reside in the 'arduino/' is for compatible(historical) reason with multiple bsp/core version.

jepler commented 3 months ago

I think part of the reason it's failing is it's mixing BSP headers with this library cpp files. This is not easy like I'd hoped

hathach commented 3 months ago

Yeah, it is a bit tricky since TinyUSB existed as (optional) library but providing implementation for "Serial" which is used as part of the core.

Are you trying to set string descriptor for the Serial ? I can definitely help with that. Out of curiosity, why would you need that ?

jepler commented 3 months ago

I opened this PR while investigating various ways to allow host software like greaseweazle and fluxengine to automatically detect when an Adafruit Floppsy is loaded with a compatible firmware. Otherwise, the port has to be specified each time the software is run.

the greaseweazle author incorporated a change to check the product string, and fluxengine right now uses a USB library that can't get either the product string or the CDC string so it's a moot point and I don't think this will be needed right now.