- struct devices *address - Address of the register.
- number_bytes - number of byte of data to be written.
- int8_t wdata - data to be written to the register address.
- unsigned char *result_buffer - pointer to a buffer of 256 bytes.
- var is defined as *var, which can be used to store the i2c_write(address,1,wdata, the_buffer) to it.
- returns a value instead of 0 or 1.
- For example - (0x2,1, 02, ?).
int i2c_buffer_write(struct devices *address, int number_bytes, int8_t wdata, unsigned char *result_buffer)
{
char *var;
char the_buffer[256];
var = i2c_write(address,1,wdata, the_buffer);
return var;
}
int i2c_new_write()
{
//How can I write from the buffer to the function i2c_new_write() ?
}
How can I put the result_buffer such that I can write from the buffer in i2c_buffer_Write to i2c_new_Write??