Skip to content

Commit

Permalink
add max7219
Browse files Browse the repository at this point in the history
  • Loading branch information
redocCheng committed Mar 16, 2020
1 parent 502b1e5 commit c84f65b
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 0 deletions.
1 change: 1 addition & 0 deletions peripherals/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
46 changes: 46 additions & 0 deletions peripherals/max7219/Kconfig
Original file line number Diff line number Diff line change
@@ -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

32 changes: 32 additions & 0 deletions peripherals/max7219/package.json
Original file line number Diff line number Diff line change
@@ -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": "[email protected]",
"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"
}
]
}

0 comments on commit c84f65b

Please sign in to comment.