部分rules文件内容
# 解决 /sys/class/pwm/pwmchip0/export 和/ sys/class/pwm/pwmchip0/unexport 读写问题
SUBSYSTEM=="pwm", KERNEL=="pwmchip*", RUN+="/usr/bin/chmod 0666 /sys%p/export", RUN+="/usr/bin/chmod 0666 /sys%p/unexport"
但执行PWM通道导出后
echo 0 > /sys/class/pwm/pwmchip0/export
新增的/sys/class/pwm/pwmchip0/pwm0还是没有写权限
ls -l /sys/class/pwm/pwmchip0/pwm0/
total 0
-r--r--r-- 1 root root 4096 Jul 5 01:54 capture
-rw-r--r-- 1 root root 4096 Jul 5 01:54 duty_cycle
-rw-r--r-- 1 root root 4096 Jul 5 01:54 enable
-rw-r--r-- 1 root root 4096 Jul 5 01:54 period
-rw-r--r-- 1 root root 4096 Jul 5 01:54 polarity
drwxr-xr-x 2 root root 0 Jul 5 01:54 power
-rw-r--r-- 1 root root 4096 Jul 5 01:54 uevent
万能的坑友,有没有办法用udev规则解决这个问题
离线