Personal tools

Log in

Changes

From IGEP - ISEE Wiki

Jump to: navigation, search

How to use GPIOs

5 bytes removed, 14:08, 11 January 2012
no edit summary
signals: sdmmc2_dat5 | sdmmc2_dir_dat1 | cam_global_reset | sdmmc3_dat1 | gpio_137 | hsusb3_tll_stp | mm3_rxdp | safe_mode
</pre>
Note: OMAP_PIN_INPUT=Input/Output pin and OMAP_PIN_OUTPUT=Output pin, for Read/Write test you need the first one. GPIO is configured in mode 4.<br>
=== Read/Write test ===
Link GPIO_136 and GPIO_137 with a wire, these pins are located in J990 connector with numbers 7 and 9. I use a connector to join them:   Now type next code:
<pre>root@localhost:~/gpio-driver/app# ./gpio input 136
root@localhost:~/gpio-driver/app# ./gpio output 137 0
The code above shows that driver works properly, GPIO_136 is configured like input and GPIO_137 is configured like output with value 0, when read GPIO_136 the result is 0. To make sure that works well, configure GPIO_137 with value 1, now GPIO_136 reads 1. <br> This driver have more options like IRQ, but is not explained here.
<br> Other examples:[[What can I do with IGEP0020#How_to_handle_the_gpio-LED.27s]][[Category:Communications|Communications]]
[[Category:Communications]]
4,199
edits