-
-
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
Rework SPI to detach it allowing reuse by several devices #1637
Conversation
Going through this! |
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.
Looks good. But would like to test it. Can you please start the PR to the SPI C# library to be able to do it?
A few questions: why do we need to have the option for the SPI operation to be async or not? Unless there is a good reason for not having it, I believe it should be async. Plus is seems that this mixes with CLR events for long running operations...
targets/FreeRTOS_ESP32/ESP32_WROOM_32/common/WireProtocol_HAL_Interface.c
Outdated
Show resolved
Hide resolved
src/Windows.Devices.Spi/win_dev_spi_native_Windows_Devices_Spi_SpiDevice.cpp
Outdated
Show resolved
Hide resolved
src/Windows.Devices.Spi/win_dev_spi_native_Windows_Devices_Spi_SpiDevice.cpp
Outdated
Show resolved
Hide resolved
b714673
to
b7023a7
Compare
d5f7bc6
to
e56d843
Compare
Merge changes to default Spi update
@AdrianSoundy there are issues with the code style on the source files. Make sure you are using the project code style. Check the details here. |
…d29-e110-44f9-9144-3b7b09f7a8a5 Code style fixes for nanoframework/nf-interpreter PR#1637
@AdrianSoundy there are issues with the code style on the source files. Make sure you are using the project code style. Check the details here. |
Automated fixes for code style.
@AdrianSoundy there are issues with the code style on the source files. Make sure you are using the project code style. Check the details here. |
Think i am there now. Managed code is also committed. I have one issue that i would like your thoughts on. |
…2-cb05-431a-b839-3e2550a032a2' into NewSpi
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.
LGTM
Tested with an SPI LCD display on both STM32F769 + ESP32 |
@AdrianSoundy there are issues with the code style on the source files. Make sure you are using the project code style. Check the details here. |
Automated fixes for code style.
@AdrianSoundy there are issues with the code style on the source files. Make sure you are using the project code style. Check the details here. |
…1-2ffa-4a10-8965-c06ca090ceb1' into NewSpi
Description, Motivation and Context
Changes to split out the SPI device layer to separate files to allow for shared use from multiple internal devices like Display, Spi Ethernet
This code needs to be reviewed before before any other changes are made in case things need to be changed.
The Windows.device.Spi is now common to all devices and moved to /src tree
The device layer has been split into the PAL & HAL files where the HAL only needs to ported to new devices.
PAL - nanoSpi.cpp / .h
HAL - CPU_SPI.cpp / CPU_SPI_decl.h
TI-SimpleLink - Changes done but noticed the SPI is a slave implementation and doesn't have any support for chip select. Not sure if it was working before.
Following nanoframework/Windows.Devices.Spi#77.
Other things to do
Modify the cmake config so you can enable the SPI without including the Windows.device.Spi
So that other devices can enable it.
How Has This Been Tested?
Some testing done with ESP32 but other platform untested, not sure if they even build
Types of changes
Checklist:
Signed-off-by: adriansoundy adriansoundy@gmail.com