File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -546,16 +546,16 @@ float rmtSetTick(rmt_obj_t* rmt, float tick)
546
546
size_t channel = rmt -> channel ;
547
547
548
548
#if CONFIG_IDF_TARGET_ESP32C3
549
- int apb_div = _LIMIT (tick /25.0 , 256 );
550
- float apb_tick = 25.0 * apb_div ;
549
+ int apb_div = _LIMIT (tick /25.0f , 256 );
550
+ float apb_tick = 25.0f * apb_div ;
551
551
RMT .tx_conf [channel ].div_cnt = apb_div & 0xFF ;
552
552
RMT .tx_conf [channel ].conf_update = 1 ;
553
553
return apb_tick ;
554
554
#else
555
- int apb_div = _LIMIT (tick /12.5 , 256 );
555
+ int apb_div = _LIMIT (tick /12.5f , 256 );
556
556
int ref_div = _LIMIT (tick /1000 , 256 );
557
- float apb_tick = 12.5 * apb_div ;
558
- float ref_tick = 1000.0 * ref_div ;
557
+ float apb_tick = 12.5f * apb_div ;
558
+ float ref_tick = 1000.0f * ref_div ;
559
559
if (_ABS (apb_tick - tick ) < _ABS (ref_tick - tick )) {
560
560
RMT .conf_ch [channel ].conf0 .div_cnt = apb_div & 0xFF ;
561
561
RMT .conf_ch [channel ].conf1 .ref_always_on = 1 ;
You can’t perform that action at this time.
0 commit comments