-
Notifications
You must be signed in to change notification settings - Fork 5.1k
[bsp/qemu-vexpress-a9] Adapter driver for serial port v2 ([#10176](h… #10198
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
Conversation
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.
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
816a549
to
64ecdb4
Compare
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.
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);
64ecdb4
to
1581202
Compare
…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