lexus2k / ssd1306

Driver for SSD1306, SSD1331, SSD1351, IL9163, ILI9341, ST7735, PCD8544, Nokia 5110 displays running on Arduino/ESP32/Linux (Rasperry) platforms
MIT License
662 stars 127 forks source link

esp: Initialise i2c_config_t struct to 0 #133

Closed IsaacJT closed 2 years ago

IsaacJT commented 2 years ago

Recent versions of the ESP SDK (>=4.3) have added extra fields to the i2c_config_t struct which need to be set to zero, otherwise the following errors are printed out:

E (322) i2c: i2c_param_config(644): i2c clock choice is invalid, please check flag and frequency
E (1344) i2c: i2c_set_pin(825): scl and sda gpio numbers are the same

Initialising the struct to zero resolves these issues.

See https://github.com/espressif/esp-idf/issues/6293 for more information on this.