Skip to content
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

- fix for #244, byte-order wrong for LSBFIRST buffer transfers #246

Merged
merged 1 commit into from
Jan 22, 2024

Conversation

RudolphRiedel
Copy link
Contributor

See #244, when using buffer transfers with LSBFIRST the byte-order was wrong.

@per1234 per1234 added type: imperfection Perceived defect in any part of project topic: code Related to content of the project itself labels Jan 20, 2024
@aentinger
Copy link
Contributor

Hi @RudolphRiedel ☕ 👋

I've verified your changes w/ this test sketch:

#include <SPI.h>

uint8_t TEST_DATA[16] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};

void setup()
{
  SPI.begin();
  SPI.beginTransaction(SPISettings(1*1000*1000, LSBFIRST, SPI_MODE0));
  SPI.transfer((void *)TEST_DATA, sizeof(TEST_DATA));
}

void loop()
{

}

Before
image

After
image

Copy link
Contributor

@aentinger aentinger left a comment

Choose a reason for hiding this comment

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

Tested and verified.

@aentinger
Copy link
Contributor

Thank you for the fix @RudolphRiedel ☕ 👋 🚀

@aentinger aentinger merged commit 5020fd4 into arduino:main Jan 22, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect transfer of SPI packets with BitOrder LSBFIRST when count is >= 4
3 participants