Since OS 19.11 I am having some trouble with I2CMaster_Write function which fails with with "Resource busy" error a lot when trying to do multiple writes in a row.
For now I managed to create a workaround by using tiny delays before writes:
struct timespec sleepTime; sleepTime.tv_sec = 0; sleepTime.tv_nsec = 800000; nanosleep(&sleepTime, NULL); result = I2CMaster_Write(i2c_fd, p_ccs->i2c_addr, p_arg_data, arg_int);
Are there any better solutions to this problem?
I cannot send all data in one write transaction as there is limited buffer size in target device.
I have the same problem with multiple different I2C targets.