Skip to content

Commit

Permalink
Merge pull request RT-Thread#795 from qiyongzhong0/master
Browse files Browse the repository at this point in the history
add rs485 package into peripherals
  • Loading branch information
armink authored Dec 1, 2020
2 parents 45804ae + cd50d1a commit f557a5a
Show file tree
Hide file tree
Showing 3 changed files with 91 additions and 0 deletions.
1 change: 1 addition & 0 deletions peripherals/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,6 @@ source "$PKGS_DIR/packages/peripherals/ly68l6400/Kconfig"
source "$PKGS_DIR/packages/peripherals/dm9051/Kconfig"
source "$PKGS_DIR/packages/peripherals/ssd1306/Kconfig"
source "$PKGS_DIR/packages/peripherals/qkey/Kconfig"
source "$PKGS_DIR/packages/peripherals/rs485/Kconfig"

endmenu
61 changes: 61 additions & 0 deletions peripherals/rs485/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@

# Kconfig file for package rs485

menuconfig PKG_USING_RS485
bool "rs485 driver package."
select RT_USING_SERIAL
select RT_USING_PIN
default n

if PKG_USING_RS485

config PKG_RS485_PATH
string
default "/packages/peripherals/rs485"

config RS485_USING_TEST
bool "using test"
default n

if RS485_USING_TEST

config RS485_TEST_SERIAL
string "serial device name"
default "uart1"

config RS485_TEST_BAUDRATE
int "baudrate"
default 9600

config RS485_TEST_PARITY
int "parity"
range 0 2
default 0

config RS485_TEST_PIN
int "mode control pin"
range 0 176
default 0

config RS485_TEST_LEVEL
int "send mode level"
range 0 1
default 0

endif

choice
prompt "Version"
default PKG_USING_RS485_LATEST_VERSION
help
Select the package version

config PKG_USING_RS485_LATEST_VERSION
bool "latest"
endchoice

config PKG_RS485_VER
string
default "latest" if PKG_USING_RS485_LATEST_VERSION

endif
29 changes: 29 additions & 0 deletions peripherals/rs485/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"name": "rs485",
"description": "rs485 driver package",
"description_zh": "rs485驱动包",
"enable": "PKG_USING_RS485",
"keywords": [
"rs485",
"driver",
"rt-thread"
],
"category": "peripherals",
"author": {
"name": "qiyongzhong0",
"email": "[email protected]",
"github": "qiyongzhong0"
},
"license": " LGPL-2.1",
"repository": "https://github.com/qiyongzhong0/rt-thread-rs485",
"icon": "https://www.rt-thread.org/qa/template/fxiaomi/style/image/logo.png",
"homepage": "https://github.com/qiyongzhong0/rt-thread-rs485#readme",
"site": [
{
"version": "latest",
"URL": "https://github.com/qiyongzhong0/rt-thread-rs485.git",
"filename": "",
"VER_SHA": "master"
}
]
}

0 comments on commit f557a5a

Please sign in to comment.