Forums » Software Development »
How to configure the GPIOs as outputs?
Added by Hector Bojorquez over 8 years ago
Hi, it's me again,
I'm knowing the Profibus Development Kit (and embedded systems) and for that I'm trying to do simple codes in C++ in Eclipse,
I was checking the datasheet about the connector pin assignments and the signals names for trying to configure them, but I don't get how to put in code
I need to set the software configurable GPIOs, make them work like an output and then set them state in High or Low
I don't know if is this the right place to ask for, but if is not please guide me to the right place. I will appreciate that a lot.
Héctor
Replies (2)
RE: How to configure the GPIOs as outputs? - Added by Bob Duke over 8 years ago
Héctor,
Please check the last section of this page for information on how to review and set the pinmux for the development board:
https://support.criticallink.com/redmine/projects/armc8-platforms/wiki/Creating_a_custom_baseboard
This will allow you to configure specific pins as GPIOs.
Once the pin is configured, you can control the pin as described in the "Driver Usage" section of the TI GPIO documentation:
http://processors.wiki.ti.com/index.php/Linux_PSP_GPIO_Driver_Guide
RE: How to configure the GPIOs as outputs? - Added by Jonathan Cormier over 8 years ago
Do note that the custom baseboard instructions were written for the 335x family. So some things will be slightly different. For example:
Instead of arch/arm/mach-omap2/
you should look in arch/arm/mach-davinci
for the board (board-mityomapl138.c) and baseboard (board-mityomapl138.c) files.