-->
Page 1 of 1

twi.cpp for 8266?

PostPosted: Sat Nov 12, 2022 8:09 pm
by s100
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?

Re: twi.cpp for 8266?

PostPosted: Mon Nov 14, 2022 12:23 am
by s100
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?

Re: twi.cpp for 8266?

PostPosted: Wed Nov 16, 2022 12:06 am
by s100
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".