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

arch: serial: fix all TCGETS retrieving zero baud rate #2040

Merged

Conversation

juniskane
Copy link
Contributor

cfsetispeed() now stores baud rate to c_cflag member of
struct termios, so it must not be overridden later on.

Summary

Impact

Testing

cfsetispeed() now stores baud rate to c_cflag member of
struct termios, so it must not be overridden later on.

Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
@juniskane
Copy link
Contributor Author

sigh I really don't have time to pacify nxstyle for all these serial.c files. The guy from Xiaomi who broke this in 03c795 should really do the cleanup.... :)

@davids5
Copy link
Contributor

davids5 commented Oct 19, 2020

See #1767 (comment)

@xiaoxiang781216
Copy link
Contributor

sigh I really don't have time to pacify nxstyle for all these serial.c files. The guy from Xiaomi who broke this in 03c795 should really do the cleanup.... :)

I will fix the rest warning.

Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
@btashton
Copy link
Contributor

@juniskane @xiaoxiang781216 I just pushed the rather large nxstyle fixes to this PR.

@xiaoxiang781216
Copy link
Contributor

Thanks @btashton!

Copy link
Contributor

@xiaoxiang781216 xiaoxiang781216 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@xiaoxiang781216 xiaoxiang781216 merged commit 5e8bcaa into apache:master Oct 20, 2020
@davids5
Copy link
Contributor

davids5 commented Oct 20, 2020

@xiaoxiang781216 @btashton - thank you for fixing this.

Unfortunately I do not think we are done, it is not enough, There is a bigger problem with the #1767 change. With that change NuttX can not support any baud rate. This will break many real world radio protocols! #1767 needs to be changed to allow any baud rate again.

@juniskane juniskane deleted the arch_serial_cfsetspeed_broken_usage_pr branch November 30, 2020 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants