From: asterix Date: Wed, 11 Jun 2008 17:05:58 +0000 (+0000) Subject: Use correct type for duty. X-Git-Tag: 2.0.0~491 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=a6c1b3f9068ae95ec1ee5ba206227f793ab6727c;p=bertos.git Use correct type for duty. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@1443 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/bertos/drv/pwm_test.c b/bertos/drv/pwm_test.c index beb765e5..39b18b36 100644 --- a/bertos/drv/pwm_test.c +++ b/bertos/drv/pwm_test.c @@ -135,7 +135,7 @@ int pwm_testSetUp(void) */ int pwm_testRun(void) { - int duty = 0; + pwm_duty_t duty = 0; int delay = 0; pwm_testSetUp(); @@ -187,7 +187,7 @@ int pwm_testRun(void) } //Reset duty cycle overflow - if (duty >= 0xFFFF) + if (duty >= (pwm_duty_t)0xFFFF) { duty = 0; for (int i = 0; i < PWM_CNT; i++) @@ -205,7 +205,7 @@ int pwm_testRun(void) delay++; } - return 0; + return 0; } /**