summaryrefslogtreecommitdiff
path: root/src/interface/interface.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/interface/interface.h')
-rw-r--r--src/interface/interface.h52
1 files changed, 52 insertions, 0 deletions
diff --git a/src/interface/interface.h b/src/interface/interface.h
new file mode 100644
index 00000000..36fbe1dd
--- /dev/null
+++ b/src/interface/interface.h
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2011 Tomasz Boleslaw CEDRO <cederom@tlen.pl>
+ *
+ * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+
+
+// THIS FILE IS UNUSABLE AT THE MOMENT BUT WILL BE USED AS GENERIC OPENOCD DRIVER STRUCTURE
+
+#ifndef OOCD_INTERFACE_H
+#define OOCD_INTERFACE_H
+
+/** Some generic interface signal definitions. */
+
+/// Interface Signal type declaration (single linked list element).
+typedef struct oocd_interface_signal {
+ /// Signal name string.
+ char *name;
+ /// Mask value for selected signal.
+ unsigned int mask;
+ /// Value can be 0,1, or -1 for unknown state.
+ int value;
+ /// Pointer to the next element on the signals list.
+ struct oocd_interface_signal *next;
+} oocd_interface_signal_t;
+
+typedef enum oocd_interface_operation {
+ UNDEFINED = 0,
+ READ,
+ WRITE,
+ SET,
+ CLEAR
+} oocd_interface_operation_t;
+
+int oocd_interface_signal_add(char *name, unsigned int mask);
+int oocd_interface_signal_del(char *name);
+oocd_interface_signal_t *oocd_interface_signal_find(char *name);
+
+#endif