]> git.sur5r.net Git - u-boot/blobdiff - doc/README.omap3
at91: Introduction of at91sam9g10 SOC.
[u-boot] / doc / README.omap3
index 9ab09793ec8026229c43019003ab1b036c924ded..6227151f8e974878459ea05ad92ce1ba0c2415a7 100644 (file)
@@ -84,6 +84,38 @@ For all other commands see
 
 help
 
+Interfaces
+==========
+
+gpio
+
+To set a bit :
+
+       if (!omap_request_gpio(N)) {
+               omap_set_gpio_direction(N, 0);
+               omap_set_gpio_dataout(N, 1);
+       }
+
+To clear a bit :
+
+       if (!omap_request_gpio(N)) {
+               omap_set_gpio_direction(N, 0);
+               omap_set_gpio_dataout(N, 0);
+       }
+
+To read a bit :
+
+       if (!omap_request_gpio(N)) {
+               omap_set_gpio_direction(N, 1);
+               val = omap_get_gpio_datain(N);
+               omap_free_gpio(N);
+       }
+       if (val)
+               printf("GPIO N is set\n");
+       else
+               printf("GPIO N is clear\n");
+
+
 Acknowledgements
 ================
 
@@ -124,4 +156,3 @@ http://www.logicpd.com/sites/default/files/1012659A_Zoom_OMAP34x-II_MDP_Brief.pd
 [8] TI OMAP3 U-Boot:
 
 http://beagleboard.googlecode.com/files/u-boot_beagle_revb.tar.gz
-