Support Orange Pi 5 Max

This commit is contained in:
baiywt
2024-01-19 17:29:30 +08:00
parent 2563495460
commit afe4ff8335
7 changed files with 8619 additions and 2 deletions

View 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