vsergeev/c-periphery

PWM functions are hardware PWM ?

Closed this issue · 1 comments

Hi,

In this wonderful library, do pwm functions support only hardware pwm ?
I read the pwm.c source code. In the code, we can use pwm_open and that function opens /sys/class/pwm/pwmchipN/export.

So, I think that this library supports hardware pwm.
Is this correct understanding ?
In the Linux kernel, opening /sys/class/pwm/pwmchipN/ directory is default method to control pwm device ?

Yeah, the PWM module is just for kernel PWM drivers exposed through sysfs, which will likely be hardware. You might be able to find a PWM kernel module that emulates PWM with a GPIO, though.