Closed DanielSSilva closed 4 years ago
@DanielSSilva have you seen such PlatformNotSupportedException
?
System.Device.I2c.*
operations seem to work fine when run from a simple C# test app on raspberry pi; but as soon as they are called from pwsh
they fail with this:
System.PlatformNotSupportedException: Operation is not supported on this platform.
at System.Device.I2c.I2cConnectionSettings..ctor(Int32 busId, Int32 deviceAddress)
at hello_netcore3.GetI2CDevice.ProcessRecord()
Yap I've seen it. IIRC you have to build with -r linux-arm. Let me search the issue
https://github.com/dotnet/iot/issues/863 Here. It's the same case?
Yes; with dotnet publish -r linux-arm
this works; thank you.
I think we need to merge this so that we can work on smaller items based on this major refactoring work.
Agreed. I2C is working as expected (as far as I could test). Last time I've picked this, I've opened a bug/question to the dotnet iot team. Haven't had the time to get back to this https://github.com/dotnet/iot/issues/939
This PR suggests a new file structure. Essentially what I did was to separate each interface in their own folder, where each folder has the interface object and subfolders with the Verbs of the cmdlets. e.g: In my opinion, this seems more organized and easier to understand/search for code, especially for newcomers. Also, this follows the file structure of the dotnet/iot repo
NOTE: I'm currently trying to understand the test setup and still have to test if everything is working, even though the project compiled. For that reason, this should not be merged yet.