summaryrefslogtreecommitdiff
path: root/doc/README.omap3
diff options
context:
space:
mode:
Diffstat (limited to 'doc/README.omap3')
-rw-r--r--doc/README.omap332
1 files changed, 32 insertions, 0 deletions
diff --git a/doc/README.omap3 b/doc/README.omap3
index 9ab09793e..e05e816df 100644
--- a/doc/README.omap3
+++ b/doc/README.omap3
@@ -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(NULL, 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
================