vsergeev / python-periphery

A pure Python 2/3 library for peripheral I/O (GPIO, LED, PWM, SPI, I2C, MMIO, Serial) in Linux.
MIT License
529 stars 139 forks source link

Add PWM support #6

Closed jakogut closed 7 years ago

jakogut commented 8 years ago

I've added support to the library. I tested this on a BeagleBone Black with a patched Linux 4.7.2 kernel, and it works great.

I also tested it on Amlogic S905 and S805 boards with linux-meson 3.14 and 3.10 kernels respectively. Disappointingly, it seems that the pwm-meson driver doesn't properly implement the sysfs pwm interface, and the output is garbage, and inconsistent.

I wrote another module for meson8 support using the Amlogic pwm-ctrl module, but it uses a non-standard interface, and makes me feel dirty. I'm not sure if you want that one.