Wire.onReceive

Name
Wire.onReceive - to indicate inside the slave the function that processes the I2C data input.

Description
It allows to the slave application to indicate the function where the I2C data transmitted by the master are going to be processed. Side slave, it sets the rx buffer index to zero. The slave works on interrupt.
 * void Wire.onReceive(void (*func) (u8))

Syntax
Wire.onReceive(receiveEvent)
 * P8


 * Parameters:
 * receiveEvent - pointer on the function here named receiveEvent(u8 count) and defined in the slave application (see example)


 * Return
 * None

Example

 * Slave_reader_I2C
 * Slave_transmitter_I2C