summaryrefslogtreecommitdiff
path: root/digital/dev2/src/common/gpio_proto.h
diff options
context:
space:
mode:
authorNicolas Schodet2013-04-13 00:19:31 +0200
committerNicolas Schodet2013-04-13 00:20:19 +0200
commit140227bcb88802ef69694f3b5b9db65c7ea9dd0d (patch)
tree8dc390a714aaa88fa14347a5efff577d0b53c2fa /digital/dev2/src/common/gpio_proto.h
parent4b6a226434e402e16111de13531ef3d4be81d9e1 (diff)
digital/dev2: use serial commands to speed up SWD communications
Diffstat (limited to 'digital/dev2/src/common/gpio_proto.h')
-rw-r--r--digital/dev2/src/common/gpio_proto.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/digital/dev2/src/common/gpio_proto.h b/digital/dev2/src/common/gpio_proto.h
index 5252480e..0837acf4 100644
--- a/digital/dev2/src/common/gpio_proto.h
+++ b/digital/dev2/src/common/gpio_proto.h
@@ -25,7 +25,7 @@
*
* }}} */
-/* All communications are big endian. */
+/* All communications are little endian. */
/* Reset communication and set all pins as input. */
#define GPIO_OP_RESET_SYNC 0xa5
@@ -54,4 +54,14 @@
/* Request port input. */
#define GPIO_OP_IN 0xb9
+/* Send serial data (data mask as first argument, clock mask as second
+ * argument, data length as third argument, then a number of data lsb first).
+ * This will: set data, toggle clock twice, start again. */
+#define GPIO_OP_SERIAL_OUT 0xc0
+/* Receive serial data (data mask as first argument, clock mask as second
+ * argument, data length as third argument, will response with received data).
+ * This will: read data, toggle clock twice, start again. */
+#define GPIO_OP_SERIAL_IN 0xc1
+
+
#endif /* gpio_proto_h */