From 2146c868fa7b0a9cb3be7c49ddc51fa382232e66 Mon Sep 17 00:00:00 2001 From: shamiao Date: Thu, 29 Nov 2012 06:30:38 +0800 Subject: [PATCH] Update wiringPi/wiringPi.c Line 529,530: An obvious writing mistake, code don't match comment. --- wiringPi/wiringPi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wiringPi/wiringPi.c b/wiringPi/wiringPi.c index 9fe3ab1..c37de84 100644 --- a/wiringPi/wiringPi.c +++ b/wiringPi/wiringPi.c @@ -526,8 +526,8 @@ void pinModeGpio (int pin, int mode) *(clk + PWMCLK_CNTL) = BCM_PASSWORD | 0x01 ; // Stop PWM Clock delayMicroseconds (110) ; // See comments in pwmSetClockWPi - (void)*(pwm + PWM_CONTROL) ; - while ((*(pwm + PWM_CONTROL) & 0x80) != 0) // Wait for clock to be !BUSY + (void)*(clk + PWMCLK_CNTL) ; + while ((*(clk + PWMCLK_CNTL) & 0x80) != 0) // Wait for clock to be !BUSY delayMicroseconds (1) ; *(clk + PWMCLK_DIV) = BCM_PASSWORD | (32 << 12) ; // set pwm div to 32 (19.2/32 = 600KHz)