-
-
Notifications
You must be signed in to change notification settings - Fork 178
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
Improvements in STM32 I2C native implementation #671
Improvements in STM32 I2C native implementation #671
Conversation
Hi @josesimoes, I'm nanoFramework bot. A human will be reviewing it shortly. 😉 |
af1b6ae
to
d90cc8d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review for ESP32 changes only. Left as synchronous returned result. Looks ok but won't be able to tell until tested. Extra work required to make asynchronous. Will look to doing this once this change is committed.
Needs the STM32 specific defines removed from DevKitC/nanoCLR/Windows.Devices.I2c/win_dev_i2c_native_Windows_Devices_I2C_I2cDevice.cpp at line 46
- I2C buffers are now static because of DMA requirements and are configurable at target level - Add I2C configuration files to all I2C enabled targets - I2C transactions are now performed on a working thread to allow CLR execution to move on as the I2C is doing it's thing in background using DMA - Update native declarations of I2C class lib - I2C NativeTransmit now returns an I2cTransferResult object - Update I2C NativeTransmit for ESP32 - Add CLR event for I2C master - Rework CLR events declaration and flags to make it coherent and remove unused one - Add extra comment to CLR_RT_StackFrame::SetupTimeoutFromTicks in order to clarify the need to use a CLR_INT64 argument Signed-off-by: josesimoes <jose.simoes@eclo.solutions>
d90cc8d
to
89b72e9
Compare
@AdrianSoundy I've just remove the STM32 specific stuff from ESP32 code. For small buffer sizes, there is no big deal with keeping the implementation blocking the CLR. The thing gets complicated when the buffer increases... Does the ESP32 offers an "async" API for the peripherals such I2C? Is it using DMA internally? (just being curious 😃 ) |
The Esp32 has a 32 byte memory mapped buffer which it fills from an ISR. for each I2C segment. |
Description
Motivation and Context
How Has This Been Tested?
Screenshots
Types of changes
Checklist:
Signed-off-by: josesimoes jose.simoes@eclo.solutions