forked from RT-Thread/packages
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request RT-Thread#795 from qiyongzhong0/master
add rs485 package into peripherals
- Loading branch information
Showing
3 changed files
with
91 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} | ||
] | ||
} |