adafruit / adafruit/Adafruit_TinyUSB_Arduino
PR 493 Submitted: Add support for DSR, DCD, and RI to Adafruit_TinyUSB_Arduino CDC profile
- Dominant language
- C
- Stars
- 654
- Forks
- 183
- PR merge metrics
- No merged PRs in 30d
Description
**Is your feature request related to a problem? Please describe.**
I need to emulate an FT231 serial chip, the hardware control signals. I use CTS, DSR, and DCD to trigger events on the Host. (Ham Radio software, decades old, triggers PTT, and morse code paddles, based on these flow control signals.)
**Describe the solution you'd like**
I need a way to trigger these signals up-stream to the USB Host. We have `Serial.dtr()` and `Serial.rts()` for reading control signals from the Host. I want `Serial.cts()`, `Serial.dsr()`, and `Serial.dcd()` too, to send those signals to the host. Similarly to how the Python `serial` library works. (And probably `Serial.ri()` since I'm there, might as well complete the whole set.)
**Describe alternatives you've considered**
Some Ham Radio software is moving towards MIDI for triggering these events instead, which I have already implemented. But I want to remain backward compatible with old/existing software.
I could continue to use an FT231 chip, but I can't add MIDI to the FT231. I would need a USB Hub, and both my microcontroller (RP2040, but I don't think that's relevant here) and the FT231 chip. I'd rather have both CDC and MIDI endpoints on the same USB device.
**Additional context**
Changing the host software that's consuming these signals is a non-starter. Or rather, it's already happening (moving to MIDI), but it's happening VERY SLOWLY. I want to remain backward compatible where possible.
I intend to attempt this code change myself. See [SmittyHalibut/Adafruit_TinyUSB_Arduino](https://github.com/SmittyHalibut/Adafruit_TinyUSB_Arduino)
Update: See #493
Update: USB CDC ACM spec doesn't include CTS. :-( But I've implemented all the rest.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reviewing the referenced PR #493 and the Adafruit_TinyUSB_Arduino CDC profile described in this issue. Done means the requested host-facing control-signal support is represented consistently, while accounting for the USB CDC ACM limitation on CTS.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- arduino, c
- Domain
- embedded-iot
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 20/100