Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support asynchronous mode for I2C and SPI #1

Open
davetcc opened this issue Feb 21, 2021 · 0 comments
Open

Support asynchronous mode for I2C and SPI #1

davetcc opened this issue Feb 21, 2021 · 0 comments

Comments

@davetcc
Copy link
Collaborator

davetcc commented Feb 21, 2021

The two defines indicate if async mode is available, and when it is we should switch to use it:

  • DEVICE_I2C_ASYNCH indicates that I2C can operate asynchronously
  • DEVICE_SPI_ASYNCH indicates that SPI can operate asynchronously

In the event that the bus was busy, which is detected by the return value from transfer indicating the bus was already locked, we would provide a function pointer that should be executed when the bus is busy, by default it would be taskManager.yieldForMicros(0);, but in the event the graphics library was not running in the main thread, another suitable yield function could be used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant