summaryrefslogtreecommitdiff
path: root/include/pin.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/pin.h')
-rw-r--r--include/pin.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/pin.h b/include/pin.h
new file mode 100644
index 0000000..5b37587
--- /dev/null
+++ b/include/pin.h
@@ -0,0 +1,17 @@
+#ifndef PIN_H
+#define PIN_H
+
+/* Number of user configurable I/O pins */
+#define PIN_MAX 11
+
+typedef enum {NONE, INPUT, INPUT_PULLUP, OUTPUT, OUTPUT_TIMER} pinmode_t;
+
+int pin_config(int pin, pinmode_t mode);
+pinmode_t pin_config_get(int pin);
+int pin_read(int pin);
+void pin_write(int pin, uint8_t val);
+int pin_clockdiv_set(int pin, unsigned long divider);
+long pin_clockdiv_get(int pin);
+
+#endif /* PIN_H */
+