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

resources: distinguish "dte"/"dce" roles of UARTResource #64

Closed
wants to merge 1 commit into from

Conversation

igrr
Copy link
Contributor

@igrr igrr commented Jun 8, 2020

This keeps the existing behavior, where pin directions default to DTE.

Most boards will have to override the role to be DCE, though, for correct operation.

Part of the fix for #63.

This keeps the existing behavior, where pin directions default to DTE.
Most boards will have to override the role to be DCE, though, for
correct operation.
@igrr
Copy link
Contributor Author

igrr commented Jun 8, 2020

Seeing that all existing boards use role="dce", and #65 introduces breaking changes anyway, perhaps it makes more sense to change default role to "dce"...

@whitequark
Copy link
Member

Should we even have a default role? I think FPGAs are equally often encountered as DCE and DTE depending on the board and what's connected to that UART.

@igrr
Copy link
Contributor Author

igrr commented Jun 9, 2020

I think I was looking at SPIResource, which has default role="host". I think SPI device role is also quite common, so by that logic SPIResource also shouldn't have a default role.

I can see the benefit of not having the default role, as it forces the user to think about the signal directions and the desired behavior.

@igrr
Copy link
Contributor Author

igrr commented Jun 9, 2020

If I make the role argument a required one, then it doesn't make sense to keep this change in a separate PR anymore — I would have to update the platform files to add the role argument, which is what I'm doing in #65. Closing this one, and will remove default value of role in #65.

@igrr igrr closed this Jun 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants