aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorUwe Hermann2009-07-16 03:20:12 +0200
committerUwe Hermann2009-07-16 03:20:12 +0200
commit1b2f6456bf032d10be4420f35384a528eb766581 (patch)
tree296f57e0bdc5ac11f89ac3ca04cd511108c61701 /include
parent75bb51fadfbc10993630203a1ef5bd76154a2d69 (diff)
Add some initial gpio.h #defines.
Diffstat (limited to 'include')
-rw-r--r--include/libopenstm32/gpio.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/include/libopenstm32/gpio.h b/include/libopenstm32/gpio.h
new file mode 100644
index 0000000..850a698
--- /dev/null
+++ b/include/libopenstm32/gpio.h
@@ -0,0 +1,38 @@
+/*
+ * This file is part of the libopenstm32 project.
+ *
+ * Copyright (C) 2009 Uwe Hermann <uwe@hermann-uwe.de>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef LIBOPENSTM32_GPIO_H
+#define LIBOPENSTM32_GPIO_H
+
+#define GPIO_CTRL_LO 0x00
+#define GPIO_CTRL_HI 0x04
+#define GPIO_INPUT_DATA 0x08
+#define GPIO_OUTPUT_DATA 0x0c
+#define GPIO_BIT_SET_RESET 0x10
+#define GPIO_BIT_RESET 0x14
+#define GPIO_LOCK 0x18
+
+/* TODO */
+
+void gpio_set(int gpio);
+void gpio_clear(int gpio);
+void gpio_toggle(int gpio);
+
+#endif