Personal tools

Log in

Changes

From IGEP - ISEE Wiki

Jump to: navigation, search

How to use GPIOs

214 bytes added, 14:29, 11 January 2012
no edit summary
=== 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 the next connector to join them:  <br>
{| cellspacing="1" cellpadding="1" border="1" align="center" width="200"
|}
 
<br>
Now type next code:
root@localhost:~/gpio-driver/app#
</pre>
The results:  {| cellspacing="1" cellpadding="1" border="1" align="center" width="200"|-| [[Image:GPIO_value0_readwrite_test.JPG|center|350x230px]] | [[Image:GPIO_value1_readwrite_test.JPG|center|350x230px]]  |} <br> 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]]
4,199
edits