-
Notifications
You must be signed in to change notification settings - Fork 572
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
Adding UnixI2cDevice Implementations #51
Conversation
CC @stephentoub as he had a good feedback on other PR's. |
FYI @shaggygi |
src/System.Device.Gpio/System/Device/I2c/Drivers/UnixI2cDevice.Linux.cs
Outdated
Show resolved
Hide resolved
src/System.Device.Gpio/System/Device/I2c/Drivers/UnixI2cDevice.Linux.cs
Outdated
Show resolved
Hide resolved
src/System.Device.Gpio/System/Device/I2c/Drivers/UnixI2cDevice.Linux.cs
Outdated
Show resolved
Hide resolved
int result = Interop.ioctl(_deviceFileDescriptor, (uint)I2cSettings.I2C_RDWR, new IntPtr(&tr)); | ||
if (result < 0) | ||
{ | ||
throw new IOException("Error when attempting to perform the I2c data transfer."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Error when attempting to perform the I2c data transfer. [](start = 38, length = 56)
don't we support resource files in such libraries?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe we do, but we haven't been using resource files yet. I'll log an issue for this so that we move all of these strings to a resource file instead.
cc: @JohnTasler @tarekgh
This PR will fix the namespaces that were wrong in #50 , and will also add the implementation for the Unix I2c device.