File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
targets/TARGET_Silicon_Labs/TARGET_EFM32 Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -343,7 +343,7 @@ void pwmout_period_us(pwmout_t *obj, int us)
343343
344344int pwmout_read_period_us (pwmout_t * obj )
345345{
346- return TIMER_TopGet (PWM_TIMER ) / ( REFERENCE_FREQUENCY * 1000000 );
346+ return ( TIMER_TopGet (PWM_TIMER ) * 1000000 ) / REFERENCE_FREQUENCY ;
347347}
348348
349349void pwmout_pulsewidth (pwmout_t * obj , float seconds )
@@ -366,7 +366,7 @@ void pwmout_pulsewidth_us(pwmout_t *obj, int us)
366366
367367int pwmout_read_pulsewidth_us (pwmout_t * obj )
368368{
369- return TIMER_CaptureGet (PWM_TIMER , obj -> channel ) / ( REFERENCE_FREQUENCY * 1000000 );
369+ return ( TIMER_CaptureGet (PWM_TIMER , obj -> channel ) * 1000000 ) / REFERENCE_FREQUENCY ;
370370}
371371
372372const PinMap * pwmout_pinmap ()
You can’t perform that action at this time.
0 commit comments