ESP8266-I2C-Driver icon indicating copy to clipboard operation
ESP8266-I2C-Driver copied to clipboard

error in compilation with twi_setClockStretchLimit(uint32_t limit = TWI_I2C_SCL_STRCH_LIMIT);

Open gusmakous opened this issue 5 years ago • 1 comments

hi! I Try compile sketch with you library.
(with standart libraries sketch was normal compile) I'm replaced four files. but on compiling i have som error:

In file included from C:\Users\mr.Director\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.3\cores\esp8266/Arduino.h:39:0,

             from C:\Users\mr.Director\Documents\Arduino\libraries\Adafruit_NeoPixel\esp8266.c:7:

C:\Users\mr.Director\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.3\cores\esp8266/twi.h:61:49: error: expected ';', ',' or ')' before '=' token

void twi_setClockStretchLimit(uint32_t limit = TWI_I2C_SCL_STRCH_LIMIT); ^

I have: Arduino IDE 1.8.10 ESP8266 core ver 2.6.3 compiling for NodeMCU 1.0 (ESP12E module)

maybe you can tell in which direction to dig?

gusmakous avatar Oct 19 '20 21:10 gusmakous

replace this line in new file twi.h:

void twi_setClockStretchLimit(uint32_t limit = TWI_I2C_SCL_STRCH_LIMIT);

to:

void twi_setClockStretchLimit(uint32_t limit);

and replace this line in new file core_esp8266_si2c.cpp:

twi_setClockStretchLimit(); //set stretch SCL limit, in μsec

to

twi_setClockStretchLimit(TWI_I2C_SCL_STRCH_LIMIT); //set stretch SCL limit, in μsec

mikesmith-ge avatar Dec 07 '20 08:12 mikesmith-ge