hello,
I'm writing a simple code on RPI0W to write a registry and then read its value (the slave is an I2C to CAN module).
bcm2835_i2c_begin ();
bcm2835_i2c_setSlaveAddress (0x25);
bcm2835_i2c_write (buf,1);
bcm2835_i2c_read (buf,1);
printf("User Register = %X \r\n",buf[0]);
bcm2835_i2c_end ();
Above code is not working unless I put a delay (i.e. usleep) between the read and write. Is it expected? Is there a wait to know if/when the write is really completed instead of just waiting and try?
Thanks a lot!!
Alex