Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

Niederb
Copy link
Contributor

@Niederb Niederb commented Oct 25, 2023

Pull Request Overview

This PR makes the registers of the UART implementation for the Nrf52840 configurable by passing them into the constructor. This allows boards to re-configure the UART or to support additional UARTs.
Also see the related issue #3720

Testing Strategy

Only changes that can be tested by compilation.

TODO or Help Wanted

No help required.

Documentation Updated

  • Updated the relevant files in /docs, or no updates are required.

Formatting

  • Ran make prepush.

@github-actions github-actions bot added the chips/nrf Change pertains to the nRF5x family of MCUs. label Oct 25, 2023
@lschuermann lschuermann added the P-Upkeep This a relatively minor change, or one that is limited in scope, and requires less scrutiny. label Oct 25, 2023
Copy link
Contributor

@bradjc bradjc left a comment

Choose a reason for hiding this comment

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

I don't think we want to expose UARTE0_BASE to boards. Instead we have a model for multiple peripherals (see the SPI driver for the nrf52).

@Niederb
Copy link
Contributor Author

Niederb commented Oct 30, 2023

@bradjc Just for clarification:
You mean having an INSTANCES array of UarteRegisters and passing an index (basically the UART number) for that array into the constructor?

Copy link
Contributor

@bradjc bradjc left a comment

Choose a reason for hiding this comment

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

On a closer look actually this is fine. I was mixing up io.rs and main.rs and all together got myself confused.

I don't really have a preference between passing in the static ref directly or using an index (and different chips/peripherals do different things) so that is fine.

@bradjc bradjc added this pull request to the merge queue Nov 1, 2023
Merged via the queue into tock:master with commit 28ff1ce Nov 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chips/nrf Change pertains to the nRF5x family of MCUs. P-Upkeep This a relatively minor change, or one that is limited in scope, and requires less scrutiny.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants