Use correct type for duty.
authorasterix <asterix@38d2e660-2303-0410-9eaa-f027e97ec537>
Wed, 11 Jun 2008 17:05:58 +0000 (17:05 +0000)
committerasterix <asterix@38d2e660-2303-0410-9eaa-f027e97ec537>
Wed, 11 Jun 2008 17:05:58 +0000 (17:05 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@1443 38d2e660-2303-0410-9eaa-f027e97ec537

bertos/drv/pwm_test.c

index beb765e5035e0394aa02dac5d245c3f9da9f4c7e..39b18b365a4dc77a1ba92e1cdbcde6b6919ec135 100644 (file)
@@ -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;
 }
 
 /**