Skip to content

Fix native Chip Select#11

Open
fridtjof wants to merge 1 commit into
japaric:masterfrom
fridtjof:patch/fix-chipselect
Open

Fix native Chip Select#11
fridtjof wants to merge 1 commit into
japaric:masterfrom
fridtjof:patch/fix-chipselect

Conversation

@fridtjof

@fridtjof fridtjof commented Jul 9, 2020

Copy link
Copy Markdown

write_many sent the register and data in separate write calls, which triggered chip select twice, causing the first data byte to be interpreted as a register again.

I fixed this by sending each byte separately, which does introduce a slight overhead of (data_length - 1) bytes.
This could be reduced to 1 byte by transferring everything in one go, however this requires allocation to arrange the register byte and all data bytes for sending them in one go.
Of course, this being a no_std crate, introducing allocation seemed like a bit much for now.

This PR replaces #10 (I based it off a separate branch rather than master)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant