mirror of
https://github.com/DrHo1y/orangepi-build.git
synced 2026-11-10 09:47:20 +07:00
Support Orange Pi 5 Max
This commit is contained in:
14
external/packages/bsp/common/usr/local/bin/test_pwm.sh
vendored
Executable file
14
external/packages/bsp/common/usr/local/bin/test_pwm.sh
vendored
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
base_dir="/sys/devices/platform"
|
||||
pwm_base="$1"
|
||||
[[ ! -d "$base_dir"/"$pwm_base".pwm ]] && echo "pwm not found !" && exit
|
||||
|
||||
cd "$base_dir"/"$pwm_base".pwm/pwm/pwmchip*
|
||||
|
||||
echo 0 > export
|
||||
echo 20000000 > pwm0/period
|
||||
echo 10000000 > pwm0/duty_cycle
|
||||
echo 1 > pwm0/enable
|
||||
echo 0 > unexport
|
||||
cd - 2>&1 > /dev/null
|
||||
Reference in New Issue
Block a user