Skip to content
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

[bsp][stm32]lvgl creates adaptations of buffers in high or low versions #9462

Merged
merged 1 commit into from
Sep 27, 2024

Conversation

hydevcode
Copy link
Contributor

@hydevcode hydevcode commented Sep 24, 2024

拉取/合并请求描述:(PR description)

[

为什么提交这份PR (why to submit this PR)

这份pr主要是对星火一号开发板中最新的lvgl进行的适配,同时还可以兼容旧版本的lvgl

你的解决方案是什么 (what is your solution)

适配内容主要是对于新旧版本中创建内存的部分做的修改
具体到代码方面则是在原本使用lv_disp_drv_t创建内存的基础增加了使用lv_display_t创建内存
与此同时新版本还添加了对应的LV_FONT_MONTSERRAT_24h以及默认实例必要的宏定义不然编译不通过,同时兼容老版本

并确认并列出已经在什么情况或板卡上进行了测试。

该pr在星火一号中分别使用了lvgl的v8.3.11,v8.3-latest,v9.1.0,latest不同的版本进行测试并且通过

  • BSP:bsp/stm32/stm32f407-rt-spark

  • .config:

  • action:

]

当前拉取/合并请求的状态 Intent for your PR

必须选择一项 Choose one (Mandatory):

  • 本拉取/合并请求是一个草稿版本 This PR is for a code-review and is intended to get feedback
  • 本拉取/合并请求是一个成熟版本 This PR is mature, and ready to be integrated into the repo

代码质量 Code Quality:

我在这个拉取/合并请求中已经考虑了 As part of this pull request, I've considered the following:

  • 已经仔细查看过代码改动的对比 Already check the difference between PR and old code
  • 代码风格正确,包括缩进空格,命名及其他风格 Style guide is adhered to, including spacing, naming and other styles
  • 没有垃圾代码,代码尽量精简,不包含#if 0代码,不包含已经被注释了的代码 All redundant code is removed and cleaned up
  • 所有变更均有原因及合理的,并且不会影响到其他软件组件代码或BSP All modifications are justified and not affect other components or BSP
  • 对难懂代码均提供对应的注释 I've commented appropriately where code is tricky
  • 代码是高质量的 Code in this PR is of high quality
  • 已经使用formatting 等源码格式化工具确保格式符合RT-Thread代码规范 This PR complies with RT-Thread code specification

@CLAassistant
Copy link

CLAassistant commented Sep 24, 2024

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions bot added BSP: STM32 BSP related with ST/STM32 BSP labels Sep 24, 2024
@kurisaW
Copy link
Contributor

kurisaW commented Sep 24, 2024

CLA assistant check Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

此处请签署CLA

@@ -31,13 +30,13 @@

#endif


#define LV_USE_SYSMON 1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

注意下rtthread代码风格,缩进采用4个空格

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

后续版本已经修改好了,不知道是不是这样,然后这个文件其他地方的格式也调了一下

@@ -35,7 +45,7 @@
**********************/
static void disp_init(void);

static void disp_flush(lv_disp_drv_t * disp_drv, const lv_area_t * area, lv_color_t * color_p);
static void disp_flush(LV_DISP_TYPE * disp_drv, const lv_area_t * area, lv_COLOR_TYPE * color_p);
//static void gpu_fill(lv_disp_drv_t * disp_drv, lv_color_t * dest_buf, lv_coord_t dest_width,
// const lv_area_t * fill_area, lv_color_t color);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

注释的代码建议删除

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

注释的代码是原本拉下来就有的,我怕有影响就没删除,后续版本已经删除了

@@ -155,7 +180,7 @@ void disp_disable_update(void)
/*Flush the content of the internal buffer the specific area on the display
*You can use DMA or any hardware acceleration to do this operation in the background but
*'lv_disp_flush_ready()' has to be called when finished.*/
static void disp_flush(lv_disp_drv_t * disp_drv, const lv_area_t * area, lv_color_t * color_p)
void disp_flush(LV_DISP_TYPE * disp_drv, const lv_area_t * area, lv_COLOR_TYPE * color_p)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这块为什么要删除静态修饰?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

修改的时候没注意,已经在后来的版本添加上去了

@Rbb666
Copy link
Member

Rbb666 commented Sep 24, 2024

@hydevcode PR命名建议:[bsp][stm32]xxxx

@hydevcode hydevcode changed the title [BSP][LVGL]An adaptation that creates a buffer in high or low versions [bsp][stm32]lvgl creates adaptations of buffers in high or low versions Sep 25, 2024
@Rbb666
Copy link
Member

Rbb666 commented Sep 26, 2024

@hydevcode CI格式检查没有通过,请使用格式化脚本刷以下文件格式化下:https://github.com/mysterywolf/formatting

@kurisaW
Copy link
Contributor

kurisaW commented Sep 26, 2024

@hydevcode CI格式检查没有通过,请使用格式化脚本刷以下文件格式化下:https://github.com/mysterywolf/formatting

注意使用这个脚本只扫描CI报错出问题的那个文件,不要一整个全扫了昂

@kurisaW
Copy link
Contributor

kurisaW commented Sep 26, 2024

CI通过后压缩成一个提交

[bsp][stm32]lvgl creates adaptations of buffers in high or low versions

[BSP][LVGL]An adaptation that creates a buffer in high or low versions,code format modifications

[BSP][LVGL]An adaptation that creates a buffer in high or low versions,code format modifications

[bsp][stm32]lvgl creates adaptations of buffers in high or low versions,code format modifications

[bsp][stm32]lvgl creates adaptations of buffers in high or low versions
@hydevcode
Copy link
Contributor Author

@hydevcode CI格式检查没有通过,请使用格式化脚本刷以下文件格式化下:https://github.com/mysterywolf/formatting

@hydevcode CI格式检查没有通过,请使用格式化脚本刷以下文件格式化下:https://github.com/mysterywolf/formatting

注意使用这个脚本只扫描CI报错出问题的那个文件,不要一整个全扫了昂

已更正

@Rbb666 Rbb666 merged commit 5562779 into RT-Thread:master Sep 27, 2024
43 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BSP: STM32 BSP related with ST/STM32 BSP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants