mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-02 20:24:32 +02:00
i2c: fix 'comparision is always true' warning
This commit is contained in:
committed by
Omar Chebib
parent
8ac3d392a2
commit
279ec3eb35
@@ -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.en) {
|
||||||
if (hw->scl_filter_cfg.thres <= 2) {
|
if (hw->scl_filter_cfg.thres <= 2) {
|
||||||
scl_high -= 8;
|
scl_high -= 8;
|
||||||
} else if (hw->scl_filter_cfg.thres <= 7) {
|
|
||||||
scl_high -= hw->scl_filter_cfg.thres + 6;
|
|
||||||
} else {
|
} else {
|
||||||
assert(false);
|
assert(hw->scl_filter_cfg.thres <= 7);
|
||||||
|
scl_high -= hw->scl_filter_cfg.thres + 6;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
scl_high -= 7;
|
scl_high -= 7;
|
||||||
|
Reference in New Issue
Block a user