All driver files are from the Egel Project, from chapter 30ff. This code example works with all added driver versions of the noForth I2C implementation:
\ Example with clock & 24C32 EEPROM : {EEADDR ( a +n -- ) \ Address EEprom 50 device! {i2c-write b-b bus! bus! ; \ Read data b from 24C32 EEPROM byte-address addr. : EC@ ( addr -- b ) 2 {eeaddr i2c} 1 {i2c-read bus@ i2c} ; \ Write data b to 24C32 EEPROM byte-address addr. : EC! ( b addr -- ) 3 {eeaddr bus! i2c} {poll} ;
Files: