Skip to content

Added support for block reading and writing#3

Closed
Satharus wants to merge 1 commit intomilkv-duo:mainfrom
Satharus:main
Closed

Added support for block reading and writing#3
Satharus wants to merge 1 commit intomilkv-duo:mainfrom
Satharus:main

Conversation

@Satharus
Copy link
Contributor

@Satharus Satharus commented Aug 15, 2024

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.so on the Milk-V with the new binary and include it in the sdk toolchain as well.

I also replaced __time_t and __suseconds_t with time_t and suseconds_t, respectively. This allows it to be cross-compiled for rv64 with musl.

Thanks!

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.
@carbonfix
Copy link
Contributor

I saw that this change has been merged upstream in wiringX, so I closed it. Thank you!

@carbonfix carbonfix closed this Sep 24, 2024
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.

2 participants