Skip to content

Integrate Arduino_ThreadsafeIO #28

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

Merged
merged 119 commits into from
Oct 13, 2021
Merged

Integrate Arduino_ThreadsafeIO #28

merged 119 commits into from
Oct 13, 2021

Conversation

aentinger
Copy link
Contributor

This PR will integrate https://github.com/bcmi-labs/Arduino_ThreadsafeIO into Arduino_Threads, providing a fully featured solution for multi-threading applications.

aentinger added 30 commits July 12, 2021 07:30
…ove the need for a separate class SpiIoRequest
… messages there before writing them to the actual serial interface.
Provide message to be written to prefix/suffix callbacks:
…it_BusIO.

* All data returned by spi.transfer() before the end of the write buffer are directly written into the write buffer.
* All data returned by spi.transer() after the end of the write buffer are written into the read buffer.
* After exhaustion of the write buffer only the fill_value is being sent.
Provide Adafruit_BusIO style interface for Wire/SPI
@aentinger aentinger added the type: enhancement Proposed improvement label Oct 13, 2021
@aentinger aentinger self-assigned this Oct 13, 2021
@github-actions
Copy link

Memory usage change @ 5a21e7f

Board flash % RAM for global variables %
arduino:mbed_nano:nano33ble 🔺 +10784 - +10848 +1.1 - +1.1 🔺 +2104 - +2104 +0.8 - +0.8
arduino:mbed_nano:nanorp2040connect 🔺 +100 - +100 0.0 - 0.0 🔺 +1048 - +1048 +0.39 - +0.39
arduino:mbed_portenta:envie_m4 🔺 +9248 - +9312 +0.88 - +0.89 🔺 +3688 - +3688 +1.25 - +1.25
arduino:mbed_portenta:envie_m7 🔺 +9248 - +9312 +1.18 - +1.18 🔺 +3696 - +3696 +0.71 - +0.71
Click for full report table
Board examples/Demo_Shared_Counter
flash
% examples/Demo_Shared_Counter
RAM for global variables
% examples/Demo_Source_Sink_Counter
flash
% examples/Demo_Source_Sink_Counter
RAM for global variables
% examples/Demo_Source_Sink_LED
flash
% examples/Demo_Source_Sink_LED
RAM for global variables
% examples/Threadsafe_SPI
flash
% examples/Threadsafe_SPI
RAM for global variables
% examples/Threadsafe_SPI_BusIO
flash
% examples/Threadsafe_SPI_BusIO
RAM for global variables
% examples/Threadsafe_Serial_GlobalPrefixSuffix
flash
% examples/Threadsafe_Serial_GlobalPrefixSuffix
RAM for global variables
% examples/Threadsafe_Serial_ProtocolWrapping
flash
% examples/Threadsafe_Serial_ProtocolWrapping
RAM for global variables
% examples/Threadsafe_Serial_Reader
flash
% examples/Threadsafe_Serial_Reader
RAM for global variables
% examples/Threadsafe_Serial_Writer
flash
% examples/Threadsafe_Serial_Writer
RAM for global variables
% examples/Threadsafe_Wire
flash
% examples/Threadsafe_Wire
RAM for global variables
% examples/Threadsafe_Wire_BusIO
flash
% examples/Threadsafe_Wire_BusIO
RAM for global variables
%
arduino:mbed_nano:nano33ble 10848 1.1 2104 0.8 10848 1.1 2104 0.8 10784 1.1 2104 0.8 N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A
arduino:mbed_nano:nanorp2040connect 100 0.0 1048 0.39 100 0.0 1048 0.39 100 0.0 1048 0.39 N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A
arduino:mbed_portenta:envie_m4 9248 0.88 3688 1.25 9312 0.89 3688 1.25 9248 0.88 3688 1.25 N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A
arduino:mbed_portenta:envie_m7 9312 1.18 3696 0.71 9312 1.18 3696 0.71 9248 1.18 3696 0.71 N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A
Click for full report CSV
Board,examples/Demo_Shared_Counter<br>flash,%,examples/Demo_Shared_Counter<br>RAM for global variables,%,examples/Demo_Source_Sink_Counter<br>flash,%,examples/Demo_Source_Sink_Counter<br>RAM for global variables,%,examples/Demo_Source_Sink_LED<br>flash,%,examples/Demo_Source_Sink_LED<br>RAM for global variables,%,examples/Threadsafe_SPI<br>flash,%,examples/Threadsafe_SPI<br>RAM for global variables,%,examples/Threadsafe_SPI_BusIO<br>flash,%,examples/Threadsafe_SPI_BusIO<br>RAM for global variables,%,examples/Threadsafe_Serial_GlobalPrefixSuffix<br>flash,%,examples/Threadsafe_Serial_GlobalPrefixSuffix<br>RAM for global variables,%,examples/Threadsafe_Serial_ProtocolWrapping<br>flash,%,examples/Threadsafe_Serial_ProtocolWrapping<br>RAM for global variables,%,examples/Threadsafe_Serial_Reader<br>flash,%,examples/Threadsafe_Serial_Reader<br>RAM for global variables,%,examples/Threadsafe_Serial_Writer<br>flash,%,examples/Threadsafe_Serial_Writer<br>RAM for global variables,%,examples/Threadsafe_Wire<br>flash,%,examples/Threadsafe_Wire<br>RAM for global variables,%,examples/Threadsafe_Wire_BusIO<br>flash,%,examples/Threadsafe_Wire_BusIO<br>RAM for global variables,%
arduino:mbed_nano:nano33ble,10848,1.1,2104,0.8,10848,1.1,2104,0.8,10784,1.1,2104,0.8,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A
arduino:mbed_nano:nanorp2040connect,100,0.0,1048,0.39,100,0.0,1048,0.39,100,0.0,1048,0.39,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A
arduino:mbed_portenta:envie_m4,9248,0.88,3688,1.25,9312,0.89,3688,1.25,9248,0.88,3688,1.25,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A
arduino:mbed_portenta:envie_m7,9312,1.18,3696,0.71,9312,1.18,3696,0.71,9248,1.18,3696,0.71,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A

@github-actions
Copy link

Memory usage change @ d7e9dfe

Board flash % RAM for global variables %
arduino:mbed_nano:nano33ble 🔺 +10784 - +10848 +1.1 - +1.1 🔺 +2104 - +2104 +0.8 - +0.8
arduino:mbed_nano:nanorp2040connect 🔺 +100 - +100 0.0 - 0.0 🔺 +1048 - +1048 +0.39 - +0.39
arduino:mbed_portenta:envie_m4 🔺 +9248 - +9312 +0.88 - +0.89 🔺 +3688 - +3688 +1.25 - +1.25
arduino:mbed_portenta:envie_m7 🔺 +9248 - +9312 +1.18 - +1.18 🔺 +3696 - +3696 +0.71 - +0.71
Click for full report table
Board examples/Demo_Shared_Counter
flash
% examples/Demo_Shared_Counter
RAM for global variables
% examples/Demo_Source_Sink_Counter
flash
% examples/Demo_Source_Sink_Counter
RAM for global variables
% examples/Demo_Source_Sink_LED
flash
% examples/Demo_Source_Sink_LED
RAM for global variables
% examples/Threadsafe_SPI
flash
% examples/Threadsafe_SPI
RAM for global variables
% examples/Threadsafe_SPI_BusIO
flash
% examples/Threadsafe_SPI_BusIO
RAM for global variables
% examples/Threadsafe_Serial_GlobalPrefixSuffix
flash
% examples/Threadsafe_Serial_GlobalPrefixSuffix
RAM for global variables
% examples/Threadsafe_Serial_ProtocolWrapping
flash
% examples/Threadsafe_Serial_ProtocolWrapping
RAM for global variables
% examples/Threadsafe_Serial_Reader
flash
% examples/Threadsafe_Serial_Reader
RAM for global variables
% examples/Threadsafe_Serial_Writer
flash
% examples/Threadsafe_Serial_Writer
RAM for global variables
% examples/Threadsafe_Wire
flash
% examples/Threadsafe_Wire
RAM for global variables
% examples/Threadsafe_Wire_BusIO
flash
% examples/Threadsafe_Wire_BusIO
RAM for global variables
%
arduino:mbed_nano:nano33ble 10848 1.1 2104 0.8 10848 1.1 2104 0.8 10784 1.1 2104 0.8 N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A
arduino:mbed_nano:nanorp2040connect 100 0.0 1048 0.39 100 0.0 1048 0.39 100 0.0 1048 0.39 N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A
arduino:mbed_portenta:envie_m4 9248 0.88 3688 1.25 9312 0.89 3688 1.25 9248 0.88 3688 1.25 N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A
arduino:mbed_portenta:envie_m7 9312 1.18 3696 0.71 9312 1.18 3696 0.71 9248 1.18 3696 0.71 N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A
Click for full report CSV
Board,examples/Demo_Shared_Counter<br>flash,%,examples/Demo_Shared_Counter<br>RAM for global variables,%,examples/Demo_Source_Sink_Counter<br>flash,%,examples/Demo_Source_Sink_Counter<br>RAM for global variables,%,examples/Demo_Source_Sink_LED<br>flash,%,examples/Demo_Source_Sink_LED<br>RAM for global variables,%,examples/Threadsafe_SPI<br>flash,%,examples/Threadsafe_SPI<br>RAM for global variables,%,examples/Threadsafe_SPI_BusIO<br>flash,%,examples/Threadsafe_SPI_BusIO<br>RAM for global variables,%,examples/Threadsafe_Serial_GlobalPrefixSuffix<br>flash,%,examples/Threadsafe_Serial_GlobalPrefixSuffix<br>RAM for global variables,%,examples/Threadsafe_Serial_ProtocolWrapping<br>flash,%,examples/Threadsafe_Serial_ProtocolWrapping<br>RAM for global variables,%,examples/Threadsafe_Serial_Reader<br>flash,%,examples/Threadsafe_Serial_Reader<br>RAM for global variables,%,examples/Threadsafe_Serial_Writer<br>flash,%,examples/Threadsafe_Serial_Writer<br>RAM for global variables,%,examples/Threadsafe_Wire<br>flash,%,examples/Threadsafe_Wire<br>RAM for global variables,%,examples/Threadsafe_Wire_BusIO<br>flash,%,examples/Threadsafe_Wire_BusIO<br>RAM for global variables,%
arduino:mbed_nano:nano33ble,10848,1.1,2104,0.8,10848,1.1,2104,0.8,10784,1.1,2104,0.8,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A
arduino:mbed_nano:nanorp2040connect,100,0.0,1048,0.39,100,0.0,1048,0.39,100,0.0,1048,0.39,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A
arduino:mbed_portenta:envie_m4,9248,0.88,3688,1.25,9312,0.89,3688,1.25,9248,0.88,3688,1.25,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A
arduino:mbed_portenta:envie_m7,9312,1.18,3696,0.71,9312,1.18,3696,0.71,9248,1.18,3696,0.71,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A

@aentinger aentinger merged commit 8469039 into master Oct 13, 2021
@aentinger aentinger deleted the integrate-io branch October 13, 2021 05:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants