Skip to content

Conversation

@soburi
Copy link
Member

@soburi soburi commented Feb 6, 2026

No description provided.

@soburi soburi changed the title Update spi wire libraries: SPI & Wire Bump to 0.53.1 Feb 6, 2026
facchinm and others added 15 commits February 7, 2026 13:53
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 zephyrproject-rtos#13

And: provides for c) option in zephyrproject-rtos#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
@soburi soburi marked this pull request as ready for review February 7, 2026 08:10
Copilot AI review requested due to automatic review settings February 7, 2026 08:10
@soburi soburi requested a review from DhruvaG2000 February 7, 2026 08:12
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 Wire buffering to use Zephyr ring buffers and adds I2C target-mode callback plumbing via i2c_target_* APIs.
  • Refactors SPI transfers to use spi_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.

@soburi soburi added the DNM This PR should not be merged (Do Not Merge) label Feb 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DNM This PR should not be merged (Do Not Merge)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants