[bsp/qemu-vexpress-a9] Adapter driver for serial port v2 ([#10176](h…#10198
Merged
Rbb666 merged 1 commit intoRT-Thread:masterfrom Apr 22, 2025
Merged
[bsp/qemu-vexpress-a9] Adapter driver for serial port v2 ([#10176](h…#10198Rbb666 merged 1 commit intoRT-Thread:masterfrom
Rbb666 merged 1 commit intoRT-Thread:masterfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR updates the QEMU vexpress-a9 UART v2 driver by adding new macros for UART registers, enhancing interrupt handling in the ISR, and refactoring UART configuration into a dedicated function.
- Added new register macros (e.g., UART_LCR_H, UART_TCR, etc.) for better hardware abstraction.
- Improved ISR to correctly read received characters and handle TX interrupt events.
- Refactored the UART initialization code to use a dedicated configuration function for setting buffer sizes.
Files not reviewed (1)
- bsp/qemu-vexpress-a9/drivers/Kconfig: Language not supported
4f9beb5 to
816a549
Compare
Rbb666
reviewed
Apr 18, 2025
816a549 to
64ecdb4
Compare
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR updates the QEMU vexpress-a9 UART v2 driver to add new macro definitions, improve interrupt handling, and centralize UART configuration while updating the CI configuration for UARTv2 support.
- Added new macros for UART register access and bit definitions.
- Modified ISR and transmit functions to optimize interrupt handling and serial configuration.
- Updated the CI configuration to include the new peripheral settings for UARTv2.
Reviewed Changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| bsp/qemu-vexpress-a9/drivers/drv_uart_v2.c | New macro definitions and modifications to ISR, UART configuration, and transmit logic to support UART v2. |
| bsp/qemu-vexpress-a9/.ci/attachconfig/ci.attachconfig.yml | Added UARTv2 kconfig entries to enable new UART functionality. |
Files not reviewed (1)
- bsp/qemu-vexpress-a9/drivers/Kconfig: Language not supported
Comments suppressed due to low confidence (1)
bsp/qemu-vexpress-a9/drivers/drv_uart_v2.c:344
- [nitpick] Consider replacing the literal (1 << 4) with the defined macro UARTLCR_H_FEN to improve code clarity and consistency.
UART_LCR_H(_uart_device[i].hw_base) =(1 << 4);
Rbb666
reviewed
Apr 21, 2025
64ecdb4 to
1581202
Compare
Rbb666
approved these changes
Apr 22, 2025
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.
…ttps://github.com/hydevcode/rt-thread/issues/10176))
拉取/合并请求描述:(PR description)
[
为什么提交这份PR (why to submit this PR)
修改qemu串口v2驱动,添加宏定义,发送中断,优化接收
你的解决方案是什么 (what is your solution)
请提供验证的bsp和config (provide the config and bsp)
]
当前拉取/合并请求的状态 Intent for your PR
必须选择一项 Choose one (Mandatory):
代码质量 Code Quality:
我在这个拉取/合并请求中已经考虑了 As part of this pull request, I've considered the following:
#if 0代码,不包含已经被注释了的代码 All redundant code is removed and cleaned up