Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
gusmakous opened this issue Oct 19, 2020 · 1 comment

Comments

@gusmakous
Copy link

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?

@mikesmith-ge
Copy link

mikesmith-ge commented Dec 7, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants