Added support for block reading and writing#3
Closed
Satharus wants to merge 1 commit intomilkv-duo:mainfrom
Closed
Added support for block reading and writing#3Satharus wants to merge 1 commit intomilkv-duo:mainfrom
Satharus wants to merge 1 commit intomilkv-duo:mainfrom
Conversation
Added three functions to support reading and writing blocks with a specified size to the I2C device. For writing, I added two versions, one that implicitly sends the size as the first byte to the slave device and one that doesn't.
Contributor
|
I saw that this change has been merged upstream in wiringX, so I closed it. Thank you! |
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.
Hello there,
Thanks for all the great work with the Milk-V boards. It's been very fun working with them :)
I added three functions to support reading and writing blocks with a specified size to the I2C device. This can particularly be useful if a slave device replies back with a
DWORD(e.g., one of its registers is 32-bit). For writing, I added two versions, one that implicitly sends the size as the first byte to the slave device and one that doesn't.I tested these changes on the Milk-V Duo S running the latest image and it works fine. All I need to do is replace
/usr/lib/libwiringx.soon the Milk-V with the new binary and include it in the sdk toolchain as well.I also replaced
__time_tand__suseconds_twithtime_tandsuseconds_t, respectively. This allows it to be cross-compiled for rv64 with musl.Thanks!