aboutsummaryrefslogtreecommitdiffstats
path: root/src/linux/hard_pwm.c
Commit message (Collapse)AuthorAgeFilesLines
* linux: Disable hardware pwm when it is set to zeroKevin O'Connor2020-07-201-12/+11
| | | | | | | | | | | Only write "1" to the "enable" file when a non-zero pwm width is requested. Write "0" to the "enable" file when a zero pwm width is requested. This fixes a problem on the replicape servo lines that prevented them from being fully disabled. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* linux: userspace GPIO controlandryblack2020-05-171-1/+1
| | | | | | Allow use host GPIO pins for non-realtime purposes. Signed-off-by: Andrey Kunitsyn <blackicebox@gmail.com>
* linux: Adapt servo0 channels for beagleboard kernel 4.14.108-ti (#2746)Janne Grunau2020-05-031-12/+29
| | | | | | | | | | | | | | The beagleboard TI kernel 4.14 and 4.19 contain a commit which change the device names ("pwm: Create device class for pwm channels") from pwmN to pwm-${chip}:N. This commit was never merged into the upstream kernel. Decrease the number of pwm channels to a more reasonable 16. Increase the number of pwm chips to 8 since the replicape servo pwm outputs are on pwmchip4. Update replicape code to detect appropriate channel. Signed-off-by: Janne Grunau <janne-gh@jannau.net>
* linux: add support for Linux hardware PWMJanne Grunau2019-04-051-0/+97
The replicape servo pins (P9_14/P9_16) are muxed to the SOCs hardware PWM unit driven by a 13MHz GP timer. They have to be driven by the linux host mcu. This commits adds hardware PWM support using the linux sysfs user space interface. Signed-off-by: Janne Grunau <janne-3d@jannau.net> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>