Skip to content

Commit aba8f42

Browse files
authored
Merge pull request #11776 from mprse/issue_11769_cypress_pwm_fix
Fix for issue #11769 (Cypress: PWM FPGA test wrong assert)
2 parents 4c7c7f8 + b35a679 commit aba8f42

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

targets/TARGET_Cypress/TARGET_PSOC6/cy_pwmout_api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ void pwmout_write(pwmout_t *obj, float percent)
5050

5151
float pwmout_read(pwmout_t *obj)
5252
{
53-
return 100.0f * obj->width_us / obj->period_us;
53+
return ((float)(obj->width_us) / obj->period_us);
5454
}
5555

5656
void pwmout_period(pwmout_t *obj, float seconds)

0 commit comments

Comments
 (0)