summaryrefslogtreecommitdiff
path: root/n
diff options
context:
space:
mode:
authorschodet2005-03-25 18:58:06 +0000
committerschodet2005-03-25 18:58:06 +0000
commit14217b088f68687076529d78bacb7feebab43a66 (patch)
tree2a48fe53914c859f4761e2a761f0475c7b9dd872 /n
parent688c743313118c681dc8a8fe8dda2e2eaf9bd8a9 (diff)
Ajout de fonctions d'envois.
Diffstat (limited to 'n')
-rw-r--r--n/avr/proto/proto_inline.c67
1 files changed, 67 insertions, 0 deletions
diff --git a/n/avr/proto/proto_inline.c b/n/avr/proto/proto_inline.c
index f17b52b..f0259e1 100644
--- a/n/avr/proto/proto_inline.c
+++ b/n/avr/proto/proto_inline.c
@@ -210,3 +210,70 @@ proto_send4d (uint8_t cmd, uint32_t arg0, uint32_t arg1, uint32_t arg2, uint32_t
AC_PROTO_PUTC ('\r');
}
+/* Send a command with 5 bytes arguments. */
+extern inline void
+proto_send5b (uint8_t cmd, uint8_t arg0, uint8_t arg1, uint8_t arg2,
+ uint8_t arg3, uint8_t arg4)
+{
+ AC_PROTO_PUTC ('!');
+ AC_PROTO_PUTC (cmd);
+ proto_arg (arg0);
+ proto_arg (arg1);
+ proto_arg (arg2);
+ proto_arg (arg3);
+ proto_arg (arg4);
+ 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,
+ uint8_t arg3, uint8_t arg4, uint8_t arg5)
+{
+ AC_PROTO_PUTC ('!');
+ AC_PROTO_PUTC (cmd);
+ proto_arg (arg0);
+ proto_arg (arg1);
+ proto_arg (arg2);
+ proto_arg (arg3);
+ proto_arg (arg4);
+ proto_arg (arg5);
+ AC_PROTO_PUTC ('\r');
+}
+
+/* Send a command with 7 bytes arguments. */
+extern inline void
+proto_send7b (uint8_t cmd, uint8_t arg0, uint8_t arg1, uint8_t arg2,
+ uint8_t arg3, uint8_t arg4, uint8_t arg5, uint8_t arg6)
+{
+ AC_PROTO_PUTC ('!');
+ AC_PROTO_PUTC (cmd);
+ proto_arg (arg0);
+ proto_arg (arg1);
+ proto_arg (arg2);
+ proto_arg (arg3);
+ proto_arg (arg4);
+ proto_arg (arg5);
+ proto_arg (arg6);
+ AC_PROTO_PUTC ('\r');
+}
+
+/* Send a command with 8 bytes arguments. */
+extern inline void
+proto_send8b (uint8_t cmd,
+ uint8_t arg0, uint8_t arg1, uint8_t arg2, uint8_t arg3,
+ uint8_t arg4, uint8_t arg5, uint8_t arg6, uint8_t arg7)
+{
+ AC_PROTO_PUTC ('!');
+ AC_PROTO_PUTC (cmd);
+ proto_arg (arg0);
+ proto_arg (arg1);
+ proto_arg (arg2);
+ proto_arg (arg3);
+ proto_arg (arg4);
+ proto_arg (arg5);
+ proto_arg (arg6);
+ proto_arg (arg7);
+ AC_PROTO_PUTC ('\r');
+}
+