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