Skip to content

新增 sean_ws2812b 软件包 #1886

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions peripherals/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ source "$PKGS_DIR/packages/peripherals/bt_mx02/Kconfig"
source "$PKGS_DIR/packages/peripherals/gc9a01/Kconfig"
source "$PKGS_DIR/packages/peripherals/ikun-485/Kconfig"
source "$PKGS_DIR/packages/peripherals/Servo_sg90/Kconfig"
source "$PKGS_DIR/packages/peripherals/sean_ws2812b/Kconfig"

if RT_VER_NUM > 0x40101
source "$PKGS_DIR/packages/peripherals/spi-tools/Kconfig"
Expand Down
62 changes: 62 additions & 0 deletions peripherals/sean_ws2812b/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Kconfig file for package sean_ws2812b
menuconfig PKG_USING_SEAN_WS2812B
bool "Sean's WS2812B LED Driver Package"
default n

if PKG_USING_SEAN_WS2812B

config PKG_SEAN_WS2812B_PATH
string
default "/packages/peripherals/sean_ws2812b"

choice
prompt "Version"
help
Select the version of sean_ws2812b

config PKG_USING_SEAN_WS2812B_LATEST
bool "latest version (master branch)"

endchoice

config PKG_SEAN_WS2812B_VER
string
default "latest" if PKG_USING_SEAN_WS2812B_LATEST

config SEAN_WS2812B_SPI_BUS_NAME
string "SPI bus name (master)"
default "spi1"
help
SPI bus (controller) name for WS2812B, e.g., 'spi1'.

config SEAN_WS2812B_SPI_DEV_NAME
string "SPI device name (slave)"
default "spi10"
help
SPI device name for WS2812B, e.g., 'spi10'.

config SEAN_WS2812B_SPI_CS_PORT
string "SPI CS GPIO port"
default "GPIOB"
help
SPI CS GPIO port for WS2812B, e.g., 'GPIOB'.

config SEAN_WS2812B_SPI_CS_PIN
int "SPI CS GPIO pin number"
default 12
help
SPI CS GPIO pin number for WS2812B, e.g., 12.

config SEAN_WS2812B_LED_NUMS
int "Number of LEDs"
default 5
help
Set the number of LEDs on the WS2812B strip.

config SEAN_WS2812B_USING_DEMO
bool "Enable demo examples"
default n
help
Enable demo examples for WS2812B.

endif
29 changes: 29 additions & 0 deletions peripherals/sean_ws2812b/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"name": "sean_ws2812b",
"description": "Complete WS2812B LED Strip Driver based on SPI for RT-Thread 4.1.0",
"description_zh": "基于SPI接口的WS2812B灯带驱动软件包,适用于RT-Thread 4.1.0系统。",
"enable": "PKG_USING_SEAN_WS2812B",
"keywords": [
"ws2812b",
"rgb"
],
"category": "peripherals",
"author": {
"name": "godmial",
"email": "[email protected]",
"github": "godmial"
},
"license": "Apache-2.0",
"repository": "https://github.com/godmial/sean_ws2812b.git",
"icon": "https://raw.githubusercontent.com/godmial/sean_ws2812b/main/icon.png",
"homepage": "https://github.com/godmial/sean_ws2812b#readme",
"doc": "https://github.com/godmial/sean_ws2812b#readme",
"site": [
{
"version": "latest",
"URL": "https://github.com/godmial/sean_ws2812b.git",
"filename": "sean_ws2812b.zip",
"VER_SHA": "main"
}
]
}
Loading