From 140227bcb88802ef69694f3b5b9db65c7ea9dd0d Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Sat, 13 Apr 2013 00:19:31 +0200 Subject: digital/dev2: use serial commands to speed up SWD communications --- digital/dev2/src/common/gpio_proto.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'digital/dev2/src/common/gpio_proto.h') 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 */ -- cgit v1.2.3