From 2e4325bb6ee9385dd5cba454f18e694a627ee14a Mon Sep 17 00:00:00 2001 From: schodet Date: Tue, 3 May 2005 18:09:58 +0000 Subject: 5w. --- n/avr/proto/proto_inline.c | 29 ++++++++++++++++++++++++++--- 1 file 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, -- cgit v1.2.3