RPi-Distro / raspi-gpio

Dump the state of the BCM270x GPIOs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot attenuate PWM

pyr0ball opened this issue · comments

There appears to be no function for pwm apart from setting the GPIO pin mode. There should be an option to set PWM frequency and duty cycle. Example:

raspi-gpio set 18 a5 <duty cycle %>
raspi-gpio set 18 a5 1500 75

Hi pyr0ball it would be nice but this tool is not meant for that - it's a debug tool for setting and reading GPIO modes only and does so by sneakily setting registers behind the Linux Kernel's back which really is not what you should do (and hence it is a 'debug' / use at your own risk tool). If we pollute it with extra functionality it encourages people to do things in the wrong way.