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)
343
343
344
344
int pwmout_read_period_us (pwmout_t * obj )
345
345
{
346
- return TIMER_TopGet (PWM_TIMER ) / ( REFERENCE_FREQUENCY * 1000000 );
346
+ return ( TIMER_TopGet (PWM_TIMER ) * 1000000 ) / REFERENCE_FREQUENCY ;
347
347
}
348
348
349
349
void pwmout_pulsewidth (pwmout_t * obj , float seconds )
@@ -366,7 +366,7 @@ void pwmout_pulsewidth_us(pwmout_t *obj, int us)
366
366
367
367
int pwmout_read_pulsewidth_us (pwmout_t * obj )
368
368
{
369
- return TIMER_CaptureGet (PWM_TIMER , obj -> channel ) / ( REFERENCE_FREQUENCY * 1000000 );
369
+ return ( TIMER_CaptureGet (PWM_TIMER , obj -> channel ) * 1000000 ) / REFERENCE_FREQUENCY ;
370
370
}
371
371
372
372
const PinMap * pwmout_pinmap ()
You can’t perform that action at this time.
0 commit comments