summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschodet2005-05-03 18:09:58 +0000
committerschodet2005-05-03 18:09:58 +0000
commit2e4325bb6ee9385dd5cba454f18e694a627ee14a (patch)
treeeae20f8d864923cbca9f29ebd666ae6cdfdfbaf7
parent1126a75ec016b0179cc05765427f5a4c463581d9 (diff)
5w.
-rw-r--r--n/avr/proto/proto_inline.c29
1 files changed, 26 insertions, 3 deletions
diff --git a/n/avr/proto/proto_inline.c b/n/avr/proto/proto_inline.c
index f0259e1..f957b99 100644
--- a/n/avr/proto/proto_inline.c
+++ b/n/avr/proto/proto_inline.c
@@ -157,7 +157,8 @@ proto_send3d (uint8_t cmd, uint32_t arg0, uint32_t arg1, uint32_t arg2)
/* Send a command with 4 bytes arguments. */
extern inline void
-proto_send4b (uint8_t cmd, uint8_t arg0, uint8_t arg1, uint8_t arg2, uint8_t arg3)
+proto_send4b (uint8_t cmd, uint8_t arg0, uint8_t arg1, uint8_t arg2, uint8_t
+ arg3)
{
AC_PROTO_PUTC ('!');
AC_PROTO_PUTC (cmd);
@@ -170,7 +171,8 @@ proto_send4b (uint8_t cmd, uint8_t arg0, uint8_t arg1, uint8_t arg2, uint8_t arg
/* Send a command with 4 words arguments. */
extern inline void
-proto_send4w (uint8_t cmd, uint16_t arg0, uint16_t arg1, uint16_t arg2, uint16_t arg3)
+proto_send4w (uint8_t cmd, uint16_t arg0, uint16_t arg1, uint16_t arg2,
+ uint16_t arg3)
{
AC_PROTO_PUTC ('!');
AC_PROTO_PUTC (cmd);
@@ -187,7 +189,8 @@ proto_send4w (uint8_t cmd, uint16_t arg0, uint16_t arg1, uint16_t arg2, uint16_t
/* Send a command with 4 double words arguments. */
extern inline void
-proto_send4d (uint8_t cmd, uint32_t arg0, uint32_t arg1, uint32_t arg2, uint32_t arg3)
+proto_send4d (uint8_t cmd, uint32_t arg0, uint32_t arg1, uint32_t arg2,
+ uint32_t arg3)
{
AC_PROTO_PUTC ('!');
AC_PROTO_PUTC (cmd);
@@ -225,6 +228,26 @@ proto_send5b (uint8_t cmd, uint8_t arg0, uint8_t arg1, uint8_t arg2,
AC_PROTO_PUTC ('\r');
}
+/* Send a command with 5 words arguments. */
+extern inline void
+proto_send5w (uint8_t cmd, uint16_t arg0, uint16_t arg1, uint16_t arg2,
+ uint16_t arg3, uint16_t arg4)
+{
+ AC_PROTO_PUTC ('!');
+ AC_PROTO_PUTC (cmd);
+ proto_arg ((arg0 >> 8) & 0xff);
+ proto_arg ((arg0 >> 0) & 0xff);
+ proto_arg ((arg1 >> 8) & 0xff);
+ proto_arg ((arg1 >> 0) & 0xff);
+ proto_arg ((arg2 >> 8) & 0xff);
+ proto_arg ((arg2 >> 0) & 0xff);
+ proto_arg ((arg3 >> 8) & 0xff);
+ proto_arg ((arg3 >> 0) & 0xff);
+ proto_arg ((arg4 >> 8) & 0xff);
+ proto_arg ((arg4 >> 0) & 0xff);
+ AC_PROTO_PUTC ('\r');
+}
+
/* Send a command with 6 bytes arguments. */
extern inline void
proto_send6b (uint8_t cmd, uint8_t arg0, uint8_t arg1, uint8_t arg2,