diff --git a/peripherals/Kconfig b/peripherals/Kconfig index 7b4fe5fa96..40db0f8e8d 100644 --- a/peripherals/Kconfig +++ b/peripherals/Kconfig @@ -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" diff --git a/peripherals/sean_ws2812b/Kconfig b/peripherals/sean_ws2812b/Kconfig new file mode 100644 index 0000000000..e61b2f7442 --- /dev/null +++ b/peripherals/sean_ws2812b/Kconfig @@ -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 diff --git a/peripherals/sean_ws2812b/package.json b/peripherals/sean_ws2812b/package.json new file mode 100644 index 0000000000..5b4e2b5246 --- /dev/null +++ b/peripherals/sean_ws2812b/package.json @@ -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": "2633967641@qq.com", + "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" + } + ] +}