zeroflag / punyforth

Forth inspired programming language for the ESP8266

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

I2C

BLavery opened this issue · comments

I am trying to port the SPI example of oled SSD1306 to use i2c instead. I haven't succeeded yet. I am suspicious that this call:
defprimitive "i2c-write-slave"
at line 550 in ext.S of punyforth
is missing one of the 4 parameters of the corresponding C call
int i2c_slave_write()
at line 120 in i2c.h at https://github.com/SuperHouse/esp-open-rtos/blob/master/extras/i2c/i2c.h

Am I missing something?
I do hope I don't have to set up to recompile punyforth, just for a 1-line change to ext.S

Brian

Earlier i2c_slave_write had 3 parameters, see: SuperHouse/esp-open-rtos@fd1081a#diff-938bcf30e93ecd659b5e0be1995b2c3d

The punyforth binary should be compiled against the earlier version of esp-open-rtos, so it shouldn't be the problem, but I'll double check it.

Yes it has 3 parameters in that build, so this shouldn't be the problem. What kind of error do you get?

I've just tested the i2c with a wemos oled shield and it worked fine. Closing this.