Using EasyTransferI2C to work with Wire.onrequest()

I am attempting to use an I2C bus with the EasyTransfer library. I am using the master read and slave write configuration using the Wire.onRequest function on the slave side. All that has happened so far is the processors froze up, they got stuck when it seemed they were transferring the data.

The code for the slave:

#include <Wire.h>
#include <EasyTransferI2C.h>

//create object
EasyTransferI2C ET; 

struct RECEIVE_DATA_STRUCTURE{
  int blinks;
  int pause;
};

RECEIVE_DATA_STRUCTURE mydata;

void setup(){
  Wire.begin(2);
  ET.begin(details(mydata), &Wire);
  Wire.onRequest(request);
}

void loop() {
}

void request() {
  ET.sendData();
}

Code for the master:

#include <Wire.h>
#include <EasyTransferI2C.h>

EasyTransferI2C ET; 

struct RECEIVE_DATA_STRUCTURE{
  int blinks;
  int pause;
};

Thankyou for any reply in advance!!
RECEIVE_DATA_STRUCTURE mydata;

void setup(){
  Wire.begin(2);
  ET.begin(details(mydata), &Wire);
  Wire.onRequest(request);
}

void loop() {
}

void request() {
  ET.sendData();
}

Code for the master:

void setup(){

Wire.begin(2);
  ET.begin(details(mydata), &Wire);
  Wire.onRequest(request);
}

void loop() {
}

void request() {
  ET.sendData();
}

The master isn't doing anything. In fact it looks very similar to the slave.

Check out the EasyTransfer master slave example sketch.

Check out this thread:

I made a templated library that lets you send and receive stuff easily with I2C.

Thankyou very much. The template library for sending and receiving solved my problem.