From c84f65b8beb825eb9e2b63ffb7f1291aa1f33c13 Mon Sep 17 00:00:00 2001 From: redoccheng <619675912@qq.com> Date: Mon, 16 Mar 2020 17:14:29 +0800 Subject: [PATCH] add max7219 --- peripherals/Kconfig | 1 + peripherals/max7219/Kconfig | 46 ++++++++++++++++++++++++++++++++ peripherals/max7219/package.json | 32 ++++++++++++++++++++++ 3 files changed, 79 insertions(+) create mode 100644 peripherals/max7219/Kconfig create mode 100644 peripherals/max7219/package.json diff --git a/peripherals/Kconfig b/peripherals/Kconfig index 240fa24d66..ba2d8b69a7 100644 --- a/peripherals/Kconfig +++ b/peripherals/Kconfig @@ -34,5 +34,6 @@ source "$PKGS_DIR/packages/peripherals/as608/Kconfig" source "$PKGS_DIR/packages/peripherals/rc522/Kconfig" source "$PKGS_DIR/packages/peripherals/embARC_bsp/Kconfig" source "$PKGS_DIR/packages/peripherals/rtc/Kconfig" +source "$PKGS_DIR/packages/peripherals/max7219/Kconfig" endmenu diff --git a/peripherals/max7219/Kconfig b/peripherals/max7219/Kconfig new file mode 100644 index 0000000000..bb89a1ae65 --- /dev/null +++ b/peripherals/max7219/Kconfig @@ -0,0 +1,46 @@ + +# Kconfig file for package max7219 +menuconfig PKG_USING_MAX7219 + bool "MAX7219: for the digital tube" + select RT_USING_PIN + select RT_USING_SPI + default n + +if PKG_USING_MAX7219 + + config PKG_MAX7219_CHIPS_NUMBER + int "the chips of digital tubes" + default 1 + + config PKG_MAX7219_SPI_BUS_NAME + string "spi bus name" + default "spi1" + + config PKG_MAX7219_SPI_DEVICE_NAME + string "spi device name" + default "spi10" + + config PKG_MAX7219_PATH + string + default "/packages/peripherals/max7219" + + choice + prompt "Version" + default PKG_USING_MAX7219_V100 + help + Select the package version + + config PKG_USING_MAX7219_V100 + bool "v1.0.0" + + config PKG_USING_MAX7219_LATEST_VERSION + bool "latest" + endchoice + + config PKG_MAX7219_VER + string + default "v1.0.0" if PKG_USING_MAX7219_V100 + default "latest" if PKG_USING_MAX7219_LATEST_VERSION + +endif + diff --git a/peripherals/max7219/package.json b/peripherals/max7219/package.json new file mode 100644 index 0000000000..98441f1d04 --- /dev/null +++ b/peripherals/max7219/package.json @@ -0,0 +1,32 @@ +{ + "name": "max7219", + "description": "a MAX7219 package for the digital tube", + "description_zh": "本软件包是在数码管上应用 MAX7219 的驱动包", + "enable": "PKG_USING_MAX7219", + "keywords": [ + "max7219" + ], + "category": "peripherals", + "author": { + "name": "redocCheng", + "email": "619675912@qq.com", + "github": "https://github.com/redocCheng" + }, + "license": "Apache-2.0", + "repository": "https://github.com/redocCheng/max7219", + "homepage": "https://github.com/redocCheng/max7219", + "site": [ + { + "version": "v1.0.0", + "URL": "https://github.com/redocCheng/max7219/archive/1.0.0.zip", + "filename": "max7219-1.0.0.zip", + "VER_SHA": " " + }, + { + "version": "latest", + "URL": "https://github.com/redocCheng/max7219.git", + "filename": "max7219-master.zip", + "VER_SHA": "master" + } + ] +}