Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RTS only updates when DTR changes state #893

Open
dalbert2 opened this issue Jan 27, 2023 · 0 comments
Open

RTS only updates when DTR changes state #893

dalbert2 opened this issue Jan 27, 2023 · 0 comments

Comments

@dalbert2
Copy link

I wrote a simple sketch to show the state of RTS and it doesn't work as expected. The RTS state is only updated when DTR changes state. Tested on windows 11 using TeraTerm and RealTerm (RealTerm is easier for this)

#include <Arduino.h>

USBSerial serial;

void setup() {
  delay(5000);
  serial.begin();
}

void loop() {
  if (serial.getRTS()) {
      serial.write('R');
  } else {
      serial.write('r');
  }
  delay(1000);
}

Details: In usb_cdcacm.c the state variable line_dtr_rts is updated in usbNoDataSetup() and the line control state,
but it doesn't look like that callback is being called when RTS changes state. Any ideas?

If this is unavoidable, USBSerial::getRTS() should probably have a comment to the effect of "Note: RTS only update when DTR changes state"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant