Skip to content

Conversation

@PeakRacing
Copy link
Contributor

添加lcd spi 通用驱动 软件包 lcd_spi_driver

Copy link
Contributor

Copilot AI left a 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 adds a new package lcd_spi_driver to the RT-Thread Packages repository under the peripherals category. The package provides a generic SPI driver for LCD displays, supporting multiple LCD controller types including ST7789V2, ST7735S, ST7796S, ILI9341, ILI9486, GC9A01, and NV3030B.

Note on PR Metadata:

  • PR Title: The current title "add:添加lcd spi 通用驱动 软件包 lcd_spi_driver" mixes English and Chinese and should follow repository conventions. Suggested format: add(lcd_spi_driver): add LCD SPI generic driver package or [peripherals/lcd_spi_driver] add LCD SPI generic driver package.
  • PR Description: The description is minimal and should be expanded to include What/Why/How, a list of modified files, and a reference to the upstream repository release/tag.

Changes:

  • Added package.json with package metadata including name, description, author, license, and repository information
  • Added comprehensive Kconfig with configuration options for LCD controller selection, orientation, dimensions, SPI settings, and pin configurations
  • Updated peripherals category Kconfig to source the new package

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

File Description
peripherals/lcd_spi_driver/package.json Defines package metadata and version information for the lcd_spi_driver package
peripherals/lcd_spi_driver/Kconfig Provides configuration options for LCD controller selection, display parameters, SPI settings, and backlight control
peripherals/Kconfig Adds source directive to include the new lcd_spi_driver package in peripherals menu

{
"version": "latest",
"URL": "https://github.com/PeakRacing/lcd_spi_driver.git",
"filename": "",
Copy link

Copilot AI Feb 2, 2026

Choose a reason for hiding this comment

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

The "filename" field should not be an empty string. For git-based "latest" versions, it should contain a descriptive filename.

English: Update the "filename" field to a descriptive name, such as "lcd_spi_driver-latest.zip" or "Null for git package" (as seen in other packages). An empty string is not an appropriate value.

中文:将 "filename" 字段更新为描述性名称,例如 "lcd_spi_driver-latest.zip" 或 "Null for git package"(如其他软件包所示)。空字符串不是合适的值。

Reference examples: peripherals/ili9341/package.json:28, peripherals/gc9a01/package.json:26

Copilot generated this review using guidance from repository custom instructions.
Comment on lines +16 to +37
config PKG_LCD_SPI_USING_LCD_ST7789V2
bool "ST7789V2"
config PKG_LCD_SPI_USING_LCD_ST7735S
bool "ST7735S"
config PKG_LCD_SPI_USING_LCD_ST7796S
bool "ST7796S"
config PKG_LCD_SPI_USING_LCD_ILI9341
bool "ILI9341"
config PKG_LCD_SPI_USING_LCD_ILI9486
bool "ILI9486"
config PKG_LCD_SPI_USING_LCD_GC9A01
bool "GC9A01"
config PKG_LCD_SPI_USING_LCD_NV3030B
bool "NV3030B"
endchoice

menu "LCD Configuration"

choice
prompt "LCD Orientation"
default PKG_LCD_SPI_DIRECTION_0
config PKG_LCD_SPI_DIRECTION_0
Copy link

Copilot AI Feb 2, 2026

Choose a reason for hiding this comment

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

Kconfig option naming is inconsistent. The package uses "PKG_LCD_SPI_DRIVER" as the base, but feature options use "PKG_LCD_SPI_" prefix instead of the full package name prefix.

English: For consistency with RT-Thread Packages conventions, feature options should use a consistent prefix. Consider:

  • Option 1: Use "LCD_SPI_DRIVER_" prefix for all feature options (e.g., "LCD_SPI_DRIVER_USING_LCD_ST7789V2", "LCD_SPI_DRIVER_DIRECTION_0")
  • Option 2: Keep "PKG_LCD_SPI_" but ensure it's consistently applied

Current mixing of "PKG_LCD_SPI_DRIVER_" (main option) with "PKG_LCD_SPI_" (feature options) can cause confusion.

中文:Kconfig 选项命名不一致。软件包使用 "PKG_LCD_SPI_DRIVER" 作为基础,但功能选项使用 "PKG_LCD_SPI_" 前缀而非完整的包名前缀。

为了与 RT-Thread Packages 规范保持一致,功能选项应使用一致的前缀。建议:

  • 方案 1:所有功能选项使用 "LCD_SPI_DRIVER_" 前缀(例如 "LCD_SPI_DRIVER_USING_LCD_ST7789V2"、"LCD_SPI_DRIVER_DIRECTION_0")
  • 方案 2:保持 "PKG_LCD_SPI_" 但确保一致应用

当前混用 "PKG_LCD_SPI_DRIVER_"(主选项)和 "PKG_LCD_SPI_"(功能选项)可能造成混淆。

Reference example: peripherals/st7789/Kconfig uses consistent "PKG_ST_7789_" prefix for all options.

Copilot generated this review using guidance from repository custom instructions.
Comment on lines +1 to +30
{
"name": "lcd_spi_driver",
"description": "The lcd spi driver ",
"description_zh": "lcd spi驱动",
"enable": "PKG_USING_LCD_SPI_DRIVER",
"keywords": [
"lcd",
"spi",
"driver"
],
"category": "peripherals",
"author": {
"name": "PeakRacing",
"email": "1473454180@qq.com",
"github": "PeakRacing"
},
"license": "Apache-2.0",
"repository": "https://github.com/PeakRacing/lcd_spi_driver",
"icon": "unknown",
"homepage": "https://github.com/PeakRacing/lcd_spi_driver#readme",
"doc": "unknown",
"site": [
{
"version": "latest",
"URL": "https://github.com/PeakRacing/lcd_spi_driver.git",
"filename": "",
"VER_SHA": "main"
}
]
}
Copy link

Copilot AI Feb 2, 2026

Choose a reason for hiding this comment

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

The package.json file uses 2-space indentation instead of the required 4-space indentation. RT-Thread Packages repository requires all package.json files to use 4-space indentation.

English: Update the indentation in package.json to use 4 spaces instead of 2 spaces. All nested content should be indented with 4 spaces per level.

中文:将 package.json 的缩进更新为 4 个空格而非 2 个空格。所有嵌套内容应使用每级 4 个空格的缩进。

Reference examples: peripherals/ili9341/package.json, peripherals/st7789/package.json use 4-space indentation.

Copilot generated this review using guidance from repository custom instructions.

# Kconfig file for package lcd_spi_driver
menuconfig PKG_USING_LCD_SPI_DRIVER
bool "The lcd spi driver "
Copy link

Copilot AI Feb 2, 2026

Choose a reason for hiding this comment

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

The description has a trailing space which should be removed for cleaner formatting.

English: Remove the trailing space after "driver" in the description on line 4.

中文:删除第 4 行描述中 "driver" 后的尾随空格。

Suggested change
bool "The lcd spi driver "
bool "The lcd spi driver"

Copilot uses AI. Check for mistakes.
Comment on lines +22 to +28
"site": [
{
"version": "latest",
"URL": "https://github.com/PeakRacing/lcd_spi_driver.git",
"filename": "",
"VER_SHA": "main"
}
Copy link

Copilot AI Feb 2, 2026

Choose a reason for hiding this comment

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

The package is missing a fixed version entry. According to RT-Thread Packages repository policy, packages should provide at least one fixed version (e.g., v1.0.0) in addition to "latest".

English: Add at least one fixed version entry before the "latest" entry in the "site" array. Use a tag from the upstream repository. Example:

Having fixed versions allows users to pin to stable releases and ensures reproducible builds.

中文:在 "site" 数组中的 "latest" 条目之前添加至少一个固定版本条目。使用上游仓库的标签。示例:

固定版本允许用户锁定稳定版本,确保可重现的构建。

Copilot generated this review using guidance from repository custom instructions.
{
"version": "latest",
"URL": "https://github.com/PeakRacing/lcd_spi_driver.git",
"filename": "",
Copy link
Member

Choose a reason for hiding this comment

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

@PeakRacing 这个字段填写下吧

Copy link
Contributor Author

Choose a reason for hiding this comment

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

主线git的并没有文件名,要填成什么?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants