Fix i2c.setup() for pins >= 32
Which includes SDA and SCL on esp32s2.
This commit is contained in:
parent
7155d7197a
commit
4523bbb36d
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue