I2C bit and byte waiting using Interrupt

Hi,

I am trying to validate if my Master device (a linux platform) able to wait for the slave device to process an interrupt and proceed with the next byte as described below:

CLOCK SYNCHRONIZATION AND HANDSHAKING
Slave devices that need some time to process received byte or are not ready yet to send the next byte, can pull the clock low to signal to the master that it should wait. Once the clock is released the master can proceed with the next byte.

I am kind of new to interrupt. I wonder if there is a way whereby I can make arduino to perform an interrupt when it receives a special character via I2C and then proceed receiving rest of the bytes.

Eg:

  1. Master Sends to Arduino: 11 22 33 AF 44 55 66
  2. Arduino 1st receive bytes : 11 22 33
  3. Arduino performs 0.5 second interrupt upon receiving “AF”.
  4. Arduino then continue receiving bytes 44 55 66.

I have attempted this using timer interrupt but I am not successful. I wonder if there is a I2C interrupt in arduino to do this. Please help to provide an example code as I am new to interrupt.

Thanks. My attempt using timer interrupt is a below:

#include <TimerOne.h>
#include <Wire.h>
//https://www.youtube.com/watch?v=FGjyUSrfx-k
void setup() {
  Wire.begin(5);
  Wire.onReceive(receiveEvent);
  Serial.begin(9600);
  Serial.print("Program Starts... \n");
  Timer1.initialize(20400); //2 million microsec = 1 sec - increase from 10000
  Timer1.attachInterrupt(function_ISR);
}

void loop() {
  // put your main code here, to run repeatedly:
}

void receiveEvent(int howMany)
{
  while(Wire.available())
  {
    //char c = Wire.read();
    int x = Wire.read();    // receive byte as an integer
    Serial.print("Read Values are = ");
    //Serial.println(c);
    Serial.println(x,HEX);         // print the integer
  }
}

void function_ISR(){
    Serial.println("This is Interrupt\n");
}
  1. Arduino performs 0.5 second interrupt upon receiving "AF".

What the heck does that mean? An interrupt is like the phone ringing. There is NO duration related to the event.