Merge branch 'bugfix/i2c_warning_always_true' into 'master'

i2c: fix 'comparision is always true' warning

See merge request espressif/esp-idf!18202
pull/9062/head
morris 2022-05-24 02:21:34 +08:00
commit 1385d1b2f6
1 zmienionych plików z 2 dodań i 3 usunięć

Wyświetl plik

@ -131,10 +131,9 @@ static inline void i2c_ll_set_bus_timing(i2c_dev_t *hw, i2c_clk_cal_t *bus_cfg)
if (hw->scl_filter_cfg.en) {
if (hw->scl_filter_cfg.thres <= 2) {
scl_high -= 8;
} else if (hw->scl_filter_cfg.thres <= 7) {
scl_high -= hw->scl_filter_cfg.thres + 6;
} else {
assert(false);
assert(hw->scl_filter_cfg.thres <= 7);
scl_high -= hw->scl_filter_cfg.thres + 6;
}
} else {
scl_high -= 7;