Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

libraries/SPI: Add support for peripheral mode. #200

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
facchinm merged 1 commit into arduino:main from iabdalkader:spi_controller_mode
Oct 2, 2025

Conversation

@iabdalkader
Copy link

@iabdalkader iabdalkader commented Sep 17, 2025
edited
Loading

Requires:

Example:

#include <SPI.h>
SPISettings mySettings(1000000, MSBFIRST, SPI_MODE0, SPI_PERIPHERAL);
void setup() {
 Serial.begin(115200);
 while (!Serial);
 SPI.begin();
}
void loop() {
 uint8_t buf[] = {0x01, 0x02, 0x03, 0x04};
 SPI.beginTransaction(mySettings);
 SPI.transfer(buf, sizeof(buf));
 SPI.endTransaction();
 
 Serial.println("Received:");
 for (int i=0; i<sizeof(buf); i++) {
 Serial.print("0x"); Serial.println(buf[0], HEX);
 }
 
 delay(100);
}

@iabdalkader iabdalkader force-pushed the spi_controller_mode branch 3 times, most recently from 80c2002 to 1e6e8bd Compare September 18, 2025 10:34
@iabdalkader iabdalkader changed the title (削除) libraries/SPI: Add support for controller mode. (削除ここまで) (追記) libraries/SPI: Add support for peripheral mode. (追記ここまで) Sep 18, 2025
@iabdalkader iabdalkader force-pushed the spi_controller_mode branch 2 times, most recently from 27e7766 to d403c4c Compare September 19, 2025 07:54
Copy link
Member

@facchinm facchinm left a comment

Choose a reason for hiding this comment

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

Let's just add SPI_HAS_PERIPHERAL_MODE define and we are good to go 🚀

Copy link
Author

Let's just add SPI_HAS_PERIPHERAL_MODE define and we are good to go 🚀

Added.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
@facchinm facchinm merged commit 560c4a5 into arduino:main Oct 2, 2025
18 checks passed
@iabdalkader iabdalkader deleted the spi_controller_mode branch October 2, 2025 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@facchinm facchinm facchinm approved these changes

@pennam pennam Awaiting requested review from pennam

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /