Skip to content

Commit a88148f

Browse files
authored
feat:添加ikunLed软件包 #1940
1 parent bc4de27 commit a88148f

3 files changed

Lines changed: 101 additions & 0 deletions

File tree

peripherals/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ source "$PKGS_DIR/packages/peripherals/ic74hc165/Kconfig"
8585
source "$PKGS_DIR/packages/peripherals/ist8310/Kconfig"
8686
source "$PKGS_DIR/packages/peripherals/ST7789_SPI/Kconfig"
8787
source "$PKGS_DIR/packages/peripherals/rtt_isotp-c/Kconfig"
88+
source "$PKGS_DIR/packages/peripherals/ikunLed/Kconfig"
8889

8990
if RT_VER_NUM > 0x40101
9091
source "$PKGS_DIR/packages/peripherals/spi-tools/Kconfig"

peripherals/ikunLed/Kconfig

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
2+
# Kconfig file for package ikunLed
3+
menuconfig PKG_USING_IKUNLED
4+
bool "ikunLed: A Led driver based on char device"
5+
select RT_USING_PIN
6+
default n
7+
help
8+
Enable this option to use the IKUNLED package.
9+
10+
if PKG_USING_IKUNLED
11+
config PKG_IKUNLED_PATH
12+
string
13+
default "/packages/peripherals/ikunLed"
14+
15+
choice
16+
prompt "Version"
17+
default PKG_USING_IKUNLED_LATEST_VERSION
18+
help
19+
Select the package version
20+
21+
config PKG_USING_IKUNLED_110_VERSION
22+
bool "v1.1.0"
23+
config PKG_USING_IKUNLED_LATEST_VERSION
24+
bool "latest"
25+
endchoice
26+
27+
config PKG_IKUNLED_VER
28+
string
29+
default "v1.1.0" if PKG_USING_IKUNLED_110_VERSION
30+
default "latest" if PKG_USING_IKUNLED_LATEST_VERSION
31+
32+
config USING_IKUNLED_DEMO
33+
bool "Enable IKUNLED Demo (example folder)"
34+
default n
35+
help
36+
Enable this option to compile the example code in the "example" folder.
37+
38+
if USING_IKUNLED_DEMO
39+
config IKUNLED_DEMO_NAME
40+
string "IKUNLED Demo Name"
41+
default "ledX"
42+
help
43+
Configure the name identifier for the IKUNLED demo.
44+
45+
config IKUNLED_DEMO_PIN
46+
string "IKUNLED Demo Control Pin"
47+
default "PB.12"
48+
help
49+
Configure the GPIO pin (format: Port.Pin, e.g., PB.12).
50+
51+
choice
52+
prompt "IKUNLED Demo Active Level"
53+
default IKUNLED_DEMO_ACTIVE_HIGH
54+
55+
config IKUNLED_DEMO_ACTIVE_LOW
56+
bool "Low level active (0)"
57+
58+
config IKUNLED_DEMO_ACTIVE_HIGH
59+
bool "High level active (1)"
60+
endchoice
61+
62+
config IKUNLED_DEMO_ACTIVE_LEVEL
63+
int
64+
default 1 if IKUNLED_DEMO_ACTIVE_HIGH
65+
default 0 if IKUNLED_DEMO_ACTIVE_LOW
66+
default 1
67+
endif
68+
endif

peripherals/ikunLed/package.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"name": "ikunLed",
3+
"description": "led driver based on pin&timer device",
4+
"description_zh": "基于PIN和软定时器的LED驱动",
5+
"enable": "PKG_USING_IKUNLED",
6+
"keywords": [
7+
"ikunled",
8+
"ikled"
9+
],
10+
"category": "peripherals",
11+
"author": {
12+
"name": "龚金华",
13+
"email": "[email protected]",
14+
"github": "GKoSon"
15+
},
16+
"license": "MIT",
17+
"repository": "https://github.com/GKoSon/ikunLed",
18+
"homepage": "https://github.com/GKoSon/ikunLed#readme",
19+
"site": [
20+
{
21+
"version": "v1.1.0",
22+
"URL": "https://github.com/GKoSon/ikunLed/archive/refs/tags/v1.1.0.zip",
23+
"filename": "ikunLed-1.1.0.zip"
24+
},
25+
{
26+
"version": "latest",
27+
"URL": "https://github.com/GKoSon/ikunLed.git",
28+
"filename": "ikunLed.zip",
29+
"VER_SHA": "main"
30+
}
31+
]
32+
}

0 commit comments

Comments
 (0)