mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-17 19:57:57 -06:00
linux: add support for Linux hardware PWM
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>
This commit is contained in:
parent
e6c3eeafd7
commit
aab89e7f85
6 changed files with 110 additions and 4 deletions
|
@ -21,9 +21,6 @@ static uint32_t last_read_time_counter;
|
|||
static struct timespec last_read_time, next_wake_time;
|
||||
static time_t start_sec;
|
||||
|
||||
#define NSECS 1000000000
|
||||
#define NSECS_PER_TICK (NSECS / CONFIG_CLOCK_FREQ)
|
||||
|
||||
// Compare two 'struct timespec' times
|
||||
static inline uint8_t
|
||||
timespec_is_before(struct timespec ts1, struct timespec ts2)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue