Wire.onRequest

Name
Wire.onRequest - - to indicate inside the slave the function that transmits the I2C data output to the master.

Description
void Wire.onRequest(void (* func) ) It allows to the slave application to indicate the function from where the I2C data requesteded by the master are going to be transmitted.

The slave works on interrupt.

Syntax
Wire.onRequest(requestEvent)
 * P8


 * Parameters:
 * requestEvent - pointer on the function here named requestEvent(void) and defined in the slave application (see example)


 * Return
 * None

Example

 * Slave_transmitter_I2C