Post topics, source code that relate to the Arduino Platform

User avatar
By s100
#95530 I am trying to dive into the guts of Arduino/8266 I2C communication and I have found the 8266 specific versions of:
Wire.h
Wire.ccp
twi.h

but have been unable to find the twi.cpp that goes with twi.h. Normally it is in the same directory as the .h file.
Any clues where to look or what to look for?
User avatar
By s100
#95533 Update. I assumed the file would be a .cpp, but it is actually a plain vanilla .c and I found twi.c.

I have two sets of librarys, one for "avr" and one for "ESP8266". There is a twi.c in the avr library, but not in the esp8622 version.

When my program complies, does the IDE pull in the avr twi.c? I assume it must as that is the only copy of the file I can find. Seems odd that the ESP8622 duplicates everything except that one file.

Any info?
User avatar
By s100
#95537 Found the answer. For the 8622 architecture, there is no twi.c. The equivalent is in the core library section for the 8622 platform and is "core-esp8266.si2c.ccp". "si2c" is "Serial I2C".