-
Notifications
You must be signed in to change notification settings - Fork 2k
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
cpu/msp430: rework MSP430 x1xx periph drivers #19835
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
github-actions
bot
added
Platform: MSP
Platform: This PR/issue effects MSP-based platforms
Area: boards
Area: Board ports
Area: cpu
Area: CPU/MCU ports
labels
Jul 18, 2023
maribu
added
Type: cleanup
The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation
CI: ready for build
If set, CI server will compile all applications for all available boards for the labeled PR
labels
Jul 18, 2023
maribu
added
the
State: WIP
State: The PR is still work-in-progress and its code is not in its final presentable form yet
label
Jul 18, 2023
maribu
requested review from
leandrolanzieri,
jia200x and
MrKevinWeiss
as code owners
December 5, 2023 21:45
maribu
removed
the
CI: ready for build
If set, CI server will compile all applications for all available boards for the labeled PR
label
Dec 6, 2023
maribu
requested review from
smlng,
aabadie,
MichelRottleuthner and
fjmolinas
as code owners
December 6, 2023 19:59
maribu
changed the title
cpu/msp430: major cleanup
cpu/msp430: rework MSP430 x1xx periph drivers
Dec 6, 2023
maribu
added
State: waiting for other PR
State: The PR requires another PR to be merged first
CI: ready for build
If set, CI server will compile all applications for all available boards for the labeled PR
and removed
State: WIP
State: The PR is still work-in-progress and its code is not in its final presentable form yet
labels
Dec 6, 2023
github-actions
bot
removed
Area: tests
Area: tests and testing framework
Area: Kconfig
Area: Kconfig integration
labels
Dec 10, 2023
maribu
removed
the
State: waiting for other PR
State: The PR requires another PR to be merged first
label
Dec 10, 2023
benpicco
approved these changes
Jan 22, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, static-tests
has some nits though
github-merge-queue
bot
removed this pull request from the merge queue due to failed status checks
Jan 22, 2024
- Move common code for USART (shared SPI / UART peripheral) to its own file and allow sharing the USART peripheral to provide both UART and SPI in round-robin fashion. - Configure both UART and SPI bus via a `struct` in the board's `periph_conf.h` - this allows allocating the two UARTs as needed by the use case - since both USARTs signals have a fixed connection to a single GPIO, most configuration is moved to the CPU - the board now only needs to decide which bus is provided by which USART Note: Sharing an USART used as UART requires cooperation from the app: - If the UART is used in TX-only mode (no RX callback), the driver will release the USART while not sending - If the UART is used to also receive, the application needs to power the UART down while not expecting something to send. An `spi_acquire()` will be blocked while the UART is powered up.
Thx :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Area: boards
Area: Board ports
Area: cpu
Area: CPU/MCU ports
Area: tests
Area: tests and testing framework
CI: ready for build
If set, CI server will compile all applications for all available boards for the labeled PR
Platform: MSP
Platform: This PR/issue effects MSP-based platforms
Type: cleanup
The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Contribution description
struct
in the board'speriph_conf.h
Note: Sharing an USART used as UART requires cooperation from the app:
spi_acquire()
will be blocked while the UART is powered up.Testing procedure
UART and SPI should still work
tests/periph/spi
Issues/PRs references
Depends on and includes: