debian: update package version 3.13.8

ODROID-M1: troubleshooting 2x pwm freq.

Signed-off-by: steve.jeong <jkhpro1003@gmail.com>
Change-Id: Idd13e496ef864986bd8c9c79a6ea6ae680b7e9ba
This commit is contained in:
steve.jeong
2022-10-19 09:27:28 +09:00
parent 4a5476d1cf
commit d8e0b25c9d
2 changed files with 13 additions and 1 deletions

6
debian/changelog vendored
View File

@@ -1,3 +1,9 @@
odroid-wiringpi (3.13.8) stable; urgency=medium
* ODROID-M1: pwmSetClock: Troubleshooting (2x) frequencies
-- steve <jkhpro1003@gmail.com> Wed, 19 Oct 2022 09:25:29 +0900
odroid-wiringpi (3.13.7) stable; urgency=medium
* ODROID-M1: support PWM OUTPUT. (PWM1. PWM2)

View File

@@ -1346,8 +1346,14 @@ static void _pwmSetClock (int divisor)
{
uint8_t scale;
uint32_t pwmScale, target;
scale = (uint8_t)(divisor & 0xFF);
if ((divisor % 2 != 0)) {
printf("clk divisor must be set to an even number.\n");
return;
}
divisor = divisor / 2;
scale = (uint8_t)(divisor & 0xFF);
pwmScale = (scale << 16);
target = pwmScale; // if scale == 0, It changes to the maximum value(256).