Content originally posted in LPCWare by bmentink on Wed Aug 18 17:43:24 MST 2010
Hi All,
Does anyone know of some "simple" I2C Slave code for this chip, or even the LPC17xx family.
The lpc1700cmsis examples have an I2C driver that does master and slave, but it is far too complicated and wasteful of code space for my needs.
Also, the Keil LPC17xx I2C example only is for master, but is simple.
All I want is two functions. First, a I2CInit() function which sets the peripheral up in slave mode etc, and second, an interrupt routine to handle slave mode.
Want I want to do is insert 3 call-back functions into the interrupt code that is called on:
a) Start/Restart condition received,
b) Rx byte received,
c) Tx byte sent
Many Thanks,
Bernie