libraries: SPI & Wire Bump to 0.53.1#158
Closed
soburi wants to merge 15 commits intozephyrproject-rtos:nextfrom
Closed
libraries: SPI & Wire Bump to 0.53.1#158soburi wants to merge 15 commits intozephyrproject-rtos:nextfrom
soburi wants to merge 15 commits intozephyrproject-rtos:nextfrom
Conversation
On Giga, the system will complain loudly if the frequency selected is too low ```<err> spi_ll_stm32: Unsupported frequency 400000Hz, max 120000000Hz, min 937500Hz``` Let's try to keep this at minimum or change when we'll be able to grab the same infor from a macro/API provided by zephyr
…iables resolves #13 And: provides for c) option in #14 In particular, added another config option (config16) that is initialized at beginTransaction with same settings as config except word size set to 16 instead of 8. Also: updated begin() to call beginTransaction with default SPISettings, and the endTransaction, such that sketches that don't call beginTransaction output at the default settings. Changed the header file private: to protected
The ringbuffer backing storage and the read buffer were the same buffer... memcpy over the same location has some nasty implications TODO: move to more complex APIs (like i2c_transfer) to properly implement stop bit
- Add support for I2C target mode. - Fix buffer overflows, bad return values etc.. Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
Use the ARG_UNUSED macro provided by Zephyr to mark function parameters as intentionally unused to prevent compiler warnings. Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Constructors should initialize members in the order they are declared in the class definition. Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
- Arduino_LED_Matrix: fix packed attribute placement, add missing dependency - Camera: fix pixel format check (formats are uint32_t, not pointers) - Ethernet: fix float division literals - SocketWrapper: hide deprecated warnings, fix signed/unsigned compare - Wire: hide pedantic 'invalid offsetof' warning
fcc4e29 to
ba76a67
Compare
There was a problem hiding this comment.
Pull request overview
Updates the Zephyr-based Arduino SPI and Wire implementations to align with the stated library bump (0.53.1), adding new capabilities (notably I2C target-mode callbacks and SPI peripheral-mode configuration).
Changes:
- Reworks
Wirebuffering to use Zephyr ring buffers and adds I2C target-mode callback plumbing viai2c_target_*APIs. - Refactors
SPItransfers to usespi_transceive()and adds configuration for peripheral (slave) mode + 16-bit transfers. - Adjusts global definitions/exports and some compatibility macros.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 12 comments.
| File | Description |
|---|---|
| libraries/Wire/Wire.h | Adds ring-buffer structs, target callback declarations, and new member state for target mode. |
| libraries/Wire/Wire.cpp | Implements target-mode callbacks and switches RX/TX buffering to Zephyr ring buffers. |
| libraries/SPI/SPI.h | Adds peripheral-mode macro and min clock macro; extends class to support 16-bit config. |
| libraries/SPI/SPI.cpp | Switches to spi_transceive(), adds peripheral-mode handling in transactions, and refactors config setup. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.