File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 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)
546546 size_t channel = rmt -> channel ;
547547
548548#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 ;
551551 RMT .tx_conf [channel ].div_cnt = apb_div & 0xFF ;
552552 RMT .tx_conf [channel ].conf_update = 1 ;
553553 return apb_tick ;
554554#else
555- int apb_div = _LIMIT (tick /12.5 , 256 );
555+ int apb_div = _LIMIT (tick /12.5f , 256 );
556556 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 ;
559559 if (_ABS (apb_tick - tick ) < _ABS (ref_tick - tick )) {
560560 RMT .conf_ch [channel ].conf0 .div_cnt = apb_div & 0xFF ;
561561 RMT .conf_ch [channel ].conf1 .ref_always_on = 1 ;
You can’t perform that action at this time.
0 commit comments