Skip to content

mimxrt10xx: add one-directional UART #2934

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

Merged
merged 9 commits into from
May 27, 2020
Merged

mimxrt10xx: add one-directional UART #2934

merged 9 commits into from
May 27, 2020

Conversation

hierophect
Copy link
Collaborator

This PR enables one-directional UART to Busio, allowing for the definition of a UART line that has only the TX or RX pin.

Throws an error if you try to do this while also defining pins for flow control, since the two are basically incompatible as far as I'm aware. Also adds the reserved_uart table so the same peripheral instance can't be used twice, and fixes some bugs I found in the stm32 UART implementation while using it for reference (whoops).

resolves #2484

@hierophect hierophect requested review from arturo182 and tannewt May 20, 2020 16:55
@hierophect hierophect added the mimxrt10xx iMX RT based boards such as Teensy 4.x label May 20, 2020
@hierophect
Copy link
Collaborator Author

Going to follow this and #2898 up with a general Busio testing and cleanup PR that brings style in line across all three and enables proper pin resetting / never reset now that those functions are enabled.

Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

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

Just a few minor things. Thanks!

@arturo182
Copy link
Collaborator

I have nothing more to add on top of Scott's comments :)

@hierophect hierophect requested a review from tannewt May 21, 2020 15:20
@hierophect
Copy link
Collaborator Author

@tannewt ready for another look.

Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

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

A suggestion for the xor but good otherwise. Generally I find the implicit bool logic in C to be confusing because it's the inverse of bash (I think.) I much prefer always using == or != to produce a boolean value.

@hierophect
Copy link
Collaborator Author

@tannewt all set, thanks for the suggestion

@hierophect hierophect requested a review from tannewt May 22, 2020 16:13
arturo182
arturo182 previously approved these changes May 22, 2020
Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

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

This looks good! Just needs a translation update and the merge should bring in a fix for the esp build failure too.

@tannewt
Copy link
Member

tannewt commented May 26, 2020

Oh, and @arturo182's suggesting of raising ValueError is good too. Please do that as well.

@hierophect
Copy link
Collaborator Author

@tannewt should be all set

@hierophect hierophect requested review from tannewt and arturo182 May 27, 2020 16:08
Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

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

Looks good! Thank you!

@tannewt tannewt merged commit 0db8b88 into adafruit:master May 27, 2020
@hierophect hierophect deleted the mimxrt-uart-oneway branch June 9, 2020 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mimxrt10xx iMX RT based boards such as Teensy 4.x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

mimxrt10xx: Allow one-way UART
3 participants