18.8.2.4.1 Workflow

  • Read request callback:
    1. Length of buffer and buffer to be sent to master is initialized.
      packet.data_length = DATA_LENGTH;
      packet.data        = write_buffer;
      
    2. Write packet to master.
      i2c_slave_write_packet_job(module, &packet);
      
  • Write request callback:
    1. Length of buffer and buffer to be read from master is initialized.
      packet.data_length = DATA_LENGTH;
      packet.data        = read_buffer;
      
    2. Read packet from master.
      if (i2c_slave_read_packet_job(module, &packet) != STATUS_OK) {
      }