Hello,
I need to send (repeatedly) a pack of 512 bytes using I2C in a non blocking manner...
Something along the lines of:
```
void myLoop()
{
while (true)
{
do stuff
if (done sending through I2C)
start_sendig_I2c(512 bytes buffer)
do more stuff
}
}
```
I have had a look at the I2C driver, and all I can find is the i2c_master_write_to_device function which seems to be blocking..
Is there a i2c_master_write_to_device_async function that will let me start a sending and then return imediately?
I am mostly working in the arduino IDE if it maters...
Thanks,
Cyrille
Asyncrhonous I2C transfert
-
- Posts: 1734
- Joined: Mon Oct 17, 2022 7:38 pm
- Location: Europe, Germany
Re: Asyncrhonous I2C transfert
Looks like your typical state machine to simulate multi-tasking. Try using the actual multi-tasking provided by FreeRTOS.Code: Select all
do stuff if (done sending through I2C) start_sendig_I2c(512 bytes buffer) do more stuff
Who is online
Users browsing this forum: No registered users and 251 guests