-
Notifications
You must be signed in to change notification settings - Fork 5.3k
[bsp][k230]:add gnne driver #11092
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
base: master
Are you sure you want to change the base?
[bsp][k230]:add gnne driver #11092
Conversation
Requirement: The BSP for the k230 platform in the RT-Thread repository does not yet have a gnne driver. Solution: Provide gnne driver for the k230 platform in the RT-Thread repository. - Implements mutex lock mechanism for AI2D and GNNE modules. - Adds HARDLOCK_AI2D support in hardlock driver for mutual exclusion. - Implements poll operation for device status monitoring. - Updates documentation in bsp/README.md. Signed-off-by: ChuanN-sudo <[email protected]>
|
👋 感谢您对 RT-Thread 的贡献!Thank you for your contribution to RT-Thread! 为确保代码符合 RT-Thread 的编码规范,请在你的仓库中执行以下步骤运行代码格式化工作流(如果格式化CI运行失败)。 🛠 操作步骤 | Steps
完成后,提交将自动更新至 如有问题欢迎联系我们,再次感谢您的贡献!💐 |
📌 Code Review Assignment🏷️ Tag: bsp_k230Reviewers: @unicornx Changed Files (Click to expand)
📊 Current Review Status (Last Updated: 2025-12-25 21:49 CST)
📝 Review Instructions
|
| menu "Drivers Configuration" | ||
|
|
||
| config BSP_USING_GNNE | ||
| bool "Enable GNNE" |
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.
建议在标题中不要用 GNNE 的缩写,用全称比较好理解
| g_ai2d_lock = HARDLOCK_AI2D; | ||
| } | ||
|
|
||
| #ifndef RT_FASTBOOT |
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.
RT_FASTBOOT 这是一个新引入的宏,但是没有看到可以定义的地方,请确认是否需要?
| { | ||
| g_kpu_lock = HARDLOCK_KPU; | ||
| } | ||
| #ifndef RT_FASTBOOT |
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.
RT_FASTBOOT 这是一个新引入的宏,但是没有看到可以定义的地方,请确认是否需要?
| .poll = ai_2d_device_poll, | ||
| }; | ||
|
|
||
| #define IRQN_AI2D_INTERRUPT (16 + 175) |
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.
bsp/k230/board/irq_num.h 里已经统一定义了所有的 IRQ#,请使用统一的定义。
| .poll = gnne_device_poll, | ||
| }; | ||
|
|
||
| #define IRQN_GNNE_INTERRUPT (16 + 173) |
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.
bsp/k230/board/irq_num.h 里已经统一定义了所有的 IRQ#,请使用统一的定义。
| } | ||
|
|
||
| rt_wqueue_init(&ai_2d_device->wait_queue); | ||
| rt_hw_interrupt_install(IRQN_AI2D_INTERRUPT, irq_callback, &ai_2d_device->wait_queue, "ai_2d_irq"); |
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.
rt_hw_interrupt_install 该函数可能失败,需要判断返回值。
| } | ||
|
|
||
| rt_wqueue_init(&gnne_device->wait_queue); | ||
| rt_hw_interrupt_install(IRQN_GNNE_INTERRUPT, irq_callback, &gnne_device->wait_queue, "gnne_irq"); |
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.
rt_hw_interrupt_install 该函数可能失败,需要判断返回值。
Requirement: The BSP for the k230 platform in the RT-Thread repository does not yet have a gnne driver.
Solution: Provide gnne driver for the k230 platform in the RT-Thread repository.
Signed-off-by: ChuanN-sudo [email protected]
拉取/合并请求描述:(PR description)
[
为什么提交这份PR (why to submit this PR)
为K230添加gnne驱动
你的解决方案是什么 (what is your solution)
添加gnne驱动
请提供验证的bsp和config (provide the config and bsp)
BSP:/bsp/k230/drivers/interdrv/gnne
.config:
action:
]
当前拉取/合并请求的状态 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