Fix i2c.setup() for pins >= 32

Which includes SDA and SCL on esp32s2.
This commit is contained in:
Tom Sutcliffe 2023-05-01 13:59:23 +01:00 committed by Johny Mattsson
parent 7155d7197a
commit 4523bbb36d
1 changed files with 1 additions and 1 deletions

View File

@ -112,7 +112,7 @@ void i2c_sw_master_gpio_init(uint8_t sda, uint8_t scl)
gpio_config_t cfg;
cfg.pin_bit_mask = 1 << sda | 1 << scl;
cfg.pin_bit_mask = 1ULL << sda | 1ULL << scl;
cfg.mode = GPIO_MODE_INPUT_OUTPUT_OD;
cfg.pull_up_en = GPIO_PULLUP_ENABLE;
cfg.pull_down_en = GPIO_PULLDOWN_DISABLE;