This article aims to help the developer in using Toradex GPIO library in VC++. GPIO library is used to access general purpose input/output (GPIO) available on Toradex Computer Modules.
Use cases for GPIOs as output:
Use cases for GPIOs as input:
This application demonstrates the use of GPIO pin (SODIMM pin 101) as output to produce a 0.5Hz pulse.
Follow this tutorial up to step 9 to create a new VC++ project. Edit the code as follows:
To include GPIO library into project refer this article.
Demo in Output configuration.
The following figure shows the output waveform.
Alternatively, you can use the GPIOConfig Tool.
On the Toradex GPIO Config window, click on Pin to sort the list by pin number. Scroll down to SFront.101.
The Level will change between 0 and 1 at the interval of 1 second.
Demo in Input configuration.
When Level changes from 0 to 1, it print message on console.