Commit 4523bbb3 authored by Tom Sutcliffe's avatar Tom Sutcliffe Committed by Johny Mattsson
Browse files

Fix i2c.setup() for pins >= 32

Which includes SDA and SCL on esp32s2.
parent 7155d719
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment