/* Read response on I2C from PC. 
return Status  */
enum status_code adp_interface_read_response(uint8_t *rx_buf, uint16_t length)
/* Read response on I2C from PC. 
return Status  */
enum status_code adp_interface_read_response(uint8_t *rx_buf, uint16_t length)
{
	enum status_code status = STATUS_ERR_IO;
	uint8_t data_len = 0;
	struct i2c_master_packet packet = {
		.address = TWI_EDBG_SLAVE_ADDR,
		.data_length = 1,
		.data = &data_len,
	};
	i2c_master_read_packet_wait(&i2c_master_instance, &packet);
	if (data_len != 0)
	{
		packet.data_length = data_len;
		packet.data = rx_buf;
		status = i2c_master_read_packet_wait(&i2c_master_instance, &packet);
	}
	return status;
}