这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions peripherals/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ source "$PKGS_DIR/packages/peripherals/RgPower/Kconfig"
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"

if RT_VER_NUM > 0x40101
source "$PKGS_DIR/packages/peripherals/spi-tools/Kconfig"
Expand Down
66 changes: 66 additions & 0 deletions peripherals/Servo_sg90/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@

# Kconfig file for package Servo_sg90
menuconfig PKG_USING_SERVO
bool "Servo : you can use it to control servo,such as sg90"
default n

if PKG_USING_SERVO

config PKG_SERVO_SG90_PATH
string
default "/packages/peripherals/Servo_sg90"

menuconfig PKG_USING_SG90
bool "Enable SG90"
default n

if PKG_USING_SG90
config PKG_USING_SG90_DEMO
bool "Enable sg90 demo"
default n
config PKG_USING_PWM_DEV_NAME
string "pwm device name,example: pwm2"
default "pwm2"
config PKG_USING_PWM_DEV_CHANNEL
int "the channel of PKG_USING_PWM_DEV_NAME"
range 1 10
default 1
config PKG_USING_MAX_ANGLE
int "the max pulse ns"
range 0 999999999
default 2500000
config PKG_USING_MIN_ANGLE
int "the min pulse ns"
range 0 999999999
default 500000
config PKG_USING_SG90_MAX_ANGLE
int "the max angle of your servo"
range 0 360
default 180
config PKG_USING_SG90_PERIOD
int "the period of sg90"
range 0 999999999
default 20000000

endif


choice
prompt "Version"
help
Select the package version

config PKG_USING_SERVO_V100
bool "v1.0.0"

config PKG_USING_SERVO_LATEST_VERSION
bool "latest"
endchoice

config PKG_SERVO_SG90_VER
string
default "v1.0.0" if PKG_USING_SERVO_V100
default "latest" if PKG_USING_SERVO_LATEST_VERSION

endif

33 changes: 33 additions & 0 deletions peripherals/Servo_sg90/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"name": "Servo_sg90",
"description": "use a package to control Servo",
"description_zh": "使用一款软件包进行控制舵机",
"enable": "PKG_USING_SERVO_SG90",
"keywords": [
"Servo_sg90"
],
"category": "peripherals",
"author": {
"name": "CXSforHPU",
"email": "19511928573@163.com",
"github": "CXSforHPU"
},
"license": "MIT",
"repository": "https://github.com/CXSforHPU/Servo_sg90",
"icon": "unknown",
"homepage": "https://github.com/CXSforHPU/Servo_sg90#readme",
"doc": "unknown",
"site": [
{
"version": "v1.0.0",
"URL": "https://github.com/CXSforHPU/Servo_sg90/archive/refs/tags/Servo_sg90-1.0.0.zip",
"filename": "Servo_sg90-1.0.0.zip"
},
{
"version": "latest",
"URL": "https://github.com/CXSforHPU/Servo_sg90.git",
"filename": "",
"VER_SHA": "master"
}
]
}