cpu/avr8_common: Prepare for rework ISR#19777
Merged
bors[bot] merged 6 commits intoRIOT-OS:masterfrom Jul 11, 2023
Merged
Conversation
Member
|
Code looks good to me, but the CI has some comments. Note: The vera++ annotations are completely unrelated to this PR and #19779 should fix them. |
3d08415 to
70c08be
Compare
The avr8_state store state information used to determine scheduling and uart irq. This move all uart irq states to avr8_state_uart variable. It introduce the use of General Purpose IO Register 0 (GPIOR0) when available and now all uarts from xmega can be used. This is a preparation for future scheduling and irq optimizations. Signed-off-by: Gerson Fernando Budke <[email protected]>
The avr8_state variable uses bit operation to set/clear the state. This rework avr8_state to use increment/decrement instead. It introduce the use of General Purpose IO Register 1 (GPIOR1) when available. This is a preparation for future scheduling and irq optimizations. Signed-off-by: Gerson Fernando Budke <[email protected]>
The thread_yield_higher is a normal functions. However it has a non regular return instruction which is useless. This remove the useless return on thread_yield_higher to save flash bytes. Signed-off-by: Gerson Fernando Budke <[email protected]>
70c08be to
9e40e39
Compare
The current ISR implementation for AVR8 requires use of avr8_[enter/exit]_isr pair which add some boilerplate on code. This add AVR8_ISR which clean-up the code and make it simpler and hides any schedule detail from the user perspective. This is a preparation for future scheduling and irq optimizations. Signed-off-by: Gerson Fernando Budke <[email protected]>
Signed-off-by: Gerson Fernando Budke <[email protected]>
Signed-off-by: Gerson Fernando Budke <[email protected]>
9e40e39 to
1e23730
Compare
Contributor
Author
|
This seems ready to go! |
bors bot
added a commit
that referenced
this pull request
Jul 11, 2023
19777: cpu/avr8_common: Prepare for rework ISR r=benpicco a=nandojve ### Contribution description This prepares for rework how ISR is handled for AVR-8 platform. It is not expected changes on the behavior but tests on other boards were welcome to avoid regressions. #### Improvements * Split UART state from ISR states. Now it is necessary two variables and GPIORx registers are automatically selected when available. * UART states now supports up to 8 UARTs. * Added AVR8_ISR macro do clean-up and hide internals related to ISR processing. This allows changes on ISR without any other changes on drivers. ### Testing procedure Tests were conducted using atmega328p-xplained-mini and atxmega-a1u-xpro and the zigduino board was only built. The example thread_duel was used to test regressions. 19798: cpu/nrf53: add I2C and SPI support r=benpicco a=dylad ### Contribution description This PR provides support for nRF53 SPI and I2C. It also moves common structs from each nRF CPU folder to `cpu/nrf5x_common` to avoid duplication. Moreover, since nRF9160 and nRF5340 have shared IRQ for UART/SPI/I2C. Both this families now use a common file to register and manage these interrupts. Note that nRF9160 have different name for its interrupts than nRF5340 but they have the same purpose. ### Testing procedure Since some structs were moved around, I think this PR should be carefully tested against nRF52, nRF53 and nRF9160 to avoid any issues. On nRF5340DK-APP, SPI can be tested with its onboard SPI flash. ### Issues/PRs references Co-authored-by: Gerson Fernando Budke <[email protected]> Co-authored-by: Dylan Laduranty <[email protected]>
Contributor
|
Build failed (retrying...): |
Contributor
|
Build succeeded! The publicly hosted instance of bors-ng is deprecated and will go away soon. If you want to self-host your own instance, instructions are here. If you want to switch to GitHub's built-in merge queue, visit their help page. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
This prepares for rework how ISR is handled for AVR-8 platform. It is not expected changes on the behavior but tests on other boards were welcome to avoid regressions.
Improvements
Testing procedure
Tests were conducted using atmega328p-xplained-mini and atxmega-a1u-xpro and the zigduino board was only built. The example thread_duel was used to test regressions.