17.8.2.3.1 Code

Add to user application main():
while (true) {
    /* Infinite loop */
    if (!port_pin_get_input_level(BUTTON_0_PIN)) {
        while (!port_pin_get_input_level(BUTTON_0_PIN)) {
            /* Waiting for button steady */ 
        }
        /* Send every other packet with reversed data */
        if (wr_packet.data[0] == 0x00) {
            wr_packet.data = &wr_buffer_reversed[0];
        } else {
            wr_packet.data = &wr_buffer[0];
        }
        i2c_master_write_packet_job(&i2c_master_instance, &wr_packet);
    }
}