Attention: this is a legacy library and thus not supported by Toradex anymore. We recommend that you use the new libraries for all Toradex modules. Please see the Toradex CE Libraries and Code Samples for up-to-date information.
This article aims to help the developer in using Toradex GPIO library in Visual C#. The following steps illustrate how to build a complete project which requires calling Toradex Win32 DLLs in Visual C#.
1. Follow this tutorial up to step 7 to create a new project in Visual C#.
2. The sequential process for this demo:
8. Download and Install .NET Compact Framework directly to the FlashDisk of the device from here.
9. Navigate to Solution Explorer in visual studio > Right Click on Solution > Properties > Devices.
10. Uncheck "Deploy the Latest version of the .NET Compact Framework (including Service Packs)".
11. If using Toradex old library Add GpioLib.dll into project by choosing Add > Existing item.. from solution properties. If using Toradex new library ** Add TdxAllLibraries.cs and TdxAllLibraries.dll into project by choosing Add > Existing item..
12. To deploy dll alongwith project executable, right click on dll > Properties and set Copy to Output Directory to Copy always. Alternatively, you can manually copy the dll to the project folder in which .exe will be deployed after step 13.
13. To build and deploy the project, follow steps 12 to 16 from here.
For more information, please refer to the MSDN document on Calling Win32 DLLs in C#
Enter sodimm number to be used as Input or Output.
Gpio demo output configuration
Gpio demo input configuration