GPIO(General purpose Input/Output):
A "General Purpose Input/Output" (GPIO) is a flexible software-controlled digital signal. On a given board each GPIO is used for one specific purpose like driving a LED, sensing a switch and so-on.
Note: On Board GPIO_LEDS : PC13,PC17,PC19.
Let us try and test "GPIO" using a basic application.
Step 1: Create a gpio_test.c File
Step 2: Write a code to test a Basic GPIO Application:
Step 3: Open your Terminal and navigate to your Toolchain folder on your HOST PC
Step 4: Run the "env.sh" file to enable the Toolchain using . env.sh
To check if the Toolchain is running type in "arm" and hit the <TAB> key twice.
Step 5: Create a binary named "gpiotest" from gpio_test.c arm-linux-gnueabi-gcc gpio_test.c -o gpiotest
Step 6: Transfer the compiled binary to the board using TFTP or SD card.
Step 7: Run the binary file ./gpiotest 77
on the Board's Terminal.
Last updated