Skip to content

Commit 2b6662e

Browse files
author
PeakRacing
committed
add:添加lcd spi 通用驱动 软件包 lcd_spi_driver
1 parent d0e04a9 commit 2b6662e

3 files changed

Lines changed: 182 additions & 0 deletions

File tree

peripherals/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ menu "peripheral libraries and drivers"
33
source "$PKGS_DIR/packages/peripherals/hal-sdk/Kconfig"
44
source "$PKGS_DIR/packages/peripherals/sensors/Kconfig"
55
source "$PKGS_DIR/packages/peripherals/touch/Kconfig"
6+
source "$PKGS_DIR/packages/peripherals/lcd_spi_driver/Kconfig"
67
source "$PKGS_DIR/packages/peripherals/realtek_ameba/Kconfig"
78
source "$PKGS_DIR/packages/peripherals/button/Kconfig"
89
source "$PKGS_DIR/packages/peripherals/pcf8574/Kconfig"

peripherals/lcd_spi_driver/Kconfig

Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
2+
# Kconfig file for package lcd_spi_driver
3+
menuconfig PKG_USING_LCD_SPI_DRIVER
4+
bool "The lcd spi driver "
5+
default n
6+
7+
if PKG_USING_LCD_SPI_DRIVER
8+
9+
config PKG_LCD_SPI_DRIVER_PATH
10+
string
11+
default "/packages/peripherals/lcd_spi_driver"
12+
13+
choice
14+
prompt "Select LCD driver"
15+
default PKG_LCD_SPI_USING_LCD_ST7789V2
16+
config PKG_LCD_SPI_USING_LCD_ST7789V2
17+
bool "ST7789V2"
18+
config PKG_LCD_SPI_USING_LCD_ST7735S
19+
bool "ST7735S"
20+
config PKG_LCD_SPI_USING_LCD_ST7796S
21+
bool "ST7796S"
22+
config PKG_LCD_SPI_USING_LCD_ILI9341
23+
bool "ILI9341"
24+
config PKG_LCD_SPI_USING_LCD_ILI9486
25+
bool "ILI9486"
26+
config PKG_LCD_SPI_USING_LCD_GC9A01
27+
bool "GC9A01"
28+
config PKG_LCD_SPI_USING_LCD_NV3030B
29+
bool "NV3030B"
30+
endchoice
31+
32+
menu "LCD Configuration"
33+
34+
choice
35+
prompt "LCD Orientation"
36+
default PKG_LCD_SPI_DIRECTION_0
37+
config PKG_LCD_SPI_DIRECTION_0
38+
bool "0 Degree"
39+
config PKG_LCD_SPI_DIRECTION_90
40+
bool "90 Degree"
41+
config PKG_LCD_SPI_DIRECTION_180
42+
bool "180 Degree"
43+
config PKG_LCD_SPI_DIRECTION_270
44+
bool "270 Degree"
45+
endchoice
46+
47+
config PKG_LCD_SPI_PIXEL_WIDTH
48+
int "LCD Pixel Width"
49+
range 0 1024
50+
default 0
51+
52+
config PKG_LCD_SPI_PIXEL_HEIGHT
53+
int "LCD Pixel Height"
54+
range 0 1024
55+
default 0
56+
57+
config PKG_LCD_SPI_X_OFFSET
58+
int "LCD Pixel X Offset"
59+
range -128 128
60+
default 0
61+
62+
config PKG_LCD_SPI_Y_OFFSET
63+
int "LCD Pixel Y Offset"
64+
range -128 128
65+
default 0
66+
67+
config PKG_LCD_SPI_FRAME_BUFF
68+
bool "LCD Use Frame Buff"
69+
default n
70+
71+
config PKG_LCD_SPI_SWAP_ENDIAN
72+
bool "LCD Swap Data Endian"
73+
default n
74+
75+
config PKG_LCD_SPI_COLOR_BGR
76+
bool "LCD Use BGR Color Format"
77+
default n
78+
79+
config PKG_LCD_SPI_DISPLAY_INVERSION
80+
bool "LCD Enable Display Inversion"
81+
default n
82+
83+
endmenu
84+
85+
config PKG_LCD_SPI_BUS_NAME
86+
string "LCD SPI Bus Name"
87+
default "spi0"
88+
89+
config PKG_LCD_SPI_DEVICE_NAME
90+
string "LCD SPI Device Name"
91+
default "spi00"
92+
93+
config PKG_LCD_SPI_FREQ
94+
int "SPI Frequency"
95+
range 0 100000000
96+
default 25000000
97+
98+
config PKG_LCD_SPI_CS_PIN
99+
int "CS Pin"
100+
range -1 255
101+
default -1
102+
103+
config PKG_LCD_SPI_DC_PIN
104+
int "DC Pin"
105+
range -1 255
106+
default -1
107+
108+
config PKG_LCD_SPI_RES_PIN
109+
int "RES Pin"
110+
range -1 255
111+
default -1
112+
113+
choice
114+
prompt "LCD Backlight Control Method"
115+
default PKG_LCD_SPI_BLK_PIN
116+
config PKG_LCD_SPI_BLK_PIN
117+
bool "Control Backlight via GPIO Pin"
118+
config PKG_LCD_SPI_BLK_PWM
119+
bool "Control Backlight via PWM"
120+
endchoice
121+
122+
if PKG_LCD_SPI_BLK_PIN
123+
config PKG_LCD_SPI_BLK_PIN_NUM
124+
int "Backlight Control Pin Number"
125+
range -1 255
126+
default -1
127+
endif
128+
129+
if PKG_LCD_SPI_BLK_PWM
130+
config PKG_LCD_SPI_BLK_PWM_NUM
131+
int "Backlight Control PWM Number"
132+
range -1 255
133+
default -1
134+
endif
135+
136+
choice
137+
prompt "Version"
138+
default PKG_USING_LCD_SPI_DRIVER_LATEST_VERSION
139+
help
140+
Select the package version
141+
142+
config PKG_USING_LCD_SPI_DRIVER_LATEST_VERSION
143+
bool "latest"
144+
endchoice
145+
146+
config PKG_LCD_SPI_DRIVER_VER
147+
string
148+
default "latest" if PKG_USING_LCD_SPI_DRIVER_LATEST_VERSION
149+
150+
endif
151+
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"name": "lcd_spi_driver",
3+
"description": "The lcd spi driver ",
4+
"description_zh": "lcd spi驱动",
5+
"enable": "PKG_USING_LCD_SPI_DRIVER",
6+
"keywords": [
7+
"lcd",
8+
"spi",
9+
"driver"
10+
],
11+
"category": "peripherals",
12+
"author": {
13+
"name": "PeakRacing",
14+
"email": "1473454180@qq.com",
15+
"github": "PeakRacing"
16+
},
17+
"license": "Apache-2.0",
18+
"repository": "https://github.com/PeakRacing/lcd_spi_driver",
19+
"icon": "unknown",
20+
"homepage": "https://github.com/PeakRacing/lcd_spi_driver#readme",
21+
"doc": "unknown",
22+
"site": [
23+
{
24+
"version": "latest",
25+
"URL": "https://github.com/PeakRacing/lcd_spi_driver.git",
26+
"filename": "",
27+
"VER_SHA": "main"
28+
}
29+
]
30+
}

0 commit comments

Comments
 (0)