Add support for Windows IoT for Raspbian #114
I had filed the issue but hadn't seriously investigated yet. I looked at bit more now.
So "C++" is supported but it is indeed the dotnet dialect, not real C++. I was likely a bit too optimist here. An option is to create a translation DLL that exposes the subset of the needed APIs as a C API, then import this directly without using cgo. This is in the realm of the possible but seems like fighting against the tide a lot with 3 layers of abstractions in the way. I was hoping more for a more direct approach like a Win32 inspired API.
 pending not passing afoul Universal App limitations
A good sign is that Win32 API is indeed leaking through the dotnet API, for example GpioChangeReader can raise
A good sign is that there is officially support for memory mapped GPIO but the performance page seems to imply it is somewhat slow, that said I need to write a proper gpioperf to have apples-to-apples numbers to compare on Raspbian.
I searched a bit on https://github.com/dotnet and https://github.com/Microsoft but failed to find anything relevant. But then I found https://github.com/ms-iot/lightning/blob/develop/source/DmapSupport.h and it seems to be what I wanted! So basically open the hardcoded paths, then leverage the code paths guarded with
Now we're talking! So the pseudo code would look like:
One thing that concerns me if we were able to leverage this is how to transfer this Win32 based executable to the device, I'd need to learn more to streamline this and hopefully integrate into Visual Studio Code or something that makes it user friendly.