I'm doing a project where I'm using a Teensy 4.0 with an INA238, and using platformio and the Arduino framework.
I ran into an issue that stemmed from the use of yield() at the end of the endTransmission and requestFrom methods. Specifically, I'm using this library on a platformio project that also uses the freertos-teensy library, which redefines the yield function to include a vTaskDelay(1) call.
This unfortunately stops the I2C transactions for 1 or 2 ms, and gives opportunity to have bus collisions.
I band-aided this by commenting out the two yield() calls, but that feels like it's defeating an intended operation. What is the intent of the two yield() calls and is there another way to accomplish this? Or at worst, what are the consequences of commenting out those two lines?
I ran into an issue that stemmed from the use of yield() at the end of the endTransmission and requestFrom methods. Specifically, I'm using this library on a platformio project that also uses the freertos-teensy library, which redefines the yield function to include a vTaskDelay(1) call.
This unfortunately stops the I2C transactions for 1 or 2 ms, and gives opportunity to have bus collisions.
I band-aided this by commenting out the two yield() calls, but that feels like it's defeating an intended operation. What is the intent of the two yield() calls and is there another way to accomplish this? Or at worst, what are the consequences of commenting out those two lines?