From b1a7892c96a13a0a46ab0ae4f538030b80e356d4 Mon Sep 17 00:00:00 2001 From: obtronyt Date: Mon, 3 Apr 2023 21:54:02 +0530 Subject: [PATCH] Replacing PWM pulse delay's hardcoded value from 100 to macro PULSE_TIME --- wiringPi/softPwm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wiringPi/softPwm.c b/wiringPi/softPwm.c index 6dccb05..86383bf 100644 --- a/wiringPi/softPwm.c +++ b/wiringPi/softPwm.c @@ -87,11 +87,11 @@ static void *softPwmThread (void *arg) if (mark != 0) digitalWrite (pin, HIGH) ; - delayMicroseconds (mark * 100) ; + delayMicroseconds (mark * PULSE_TIME) ; if (space != 0) digitalWrite (pin, LOW) ; - delayMicroseconds (space * 100) ; + delayMicroseconds (space * PULSE_TIME) ; } return NULL ;