summaryrefslogtreecommitdiffhomepage
path: root/digital/avr/modules/proto/proto_inline.c
diff options
context:
space:
mode:
authorNicolas Schodet2012-04-03 00:49:55 +0200
committerNicolas Schodet2012-04-06 23:55:25 +0200
commitfa1dc85d0a8ca03e24a8c48d7916f272c3f138e6 (patch)
tree75592df9c2da334a46cc79cafc0d5596d44bd383 /digital/avr/modules/proto/proto_inline.c
parent720037c9a21a15910266fad2650fc446faa6ed58 (diff)
digital/avr/modules/proto: add automatic send[bwd] with n arguments
Diffstat (limited to 'digital/avr/modules/proto/proto_inline.c')
-rw-r--r--digital/avr/modules/proto/proto_inline.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/digital/avr/modules/proto/proto_inline.c b/digital/avr/modules/proto/proto_inline.c
index 43110c8e..58779ec8 100644
--- a/digital/avr/modules/proto/proto_inline.c
+++ b/digital/avr/modules/proto/proto_inline.c
@@ -23,6 +23,17 @@
*
* }}} */
#include "modules/utils/byte.h"
+#include "preproc.h"
+
+/** Send a command with n byte arguments. */
+#define proto_sendb(cmd, args...) \
+ PREPROC_PASTE (proto_send, PREPROC_NARG (args), b) (cmd, args)
+/** Send a command with n word arguments. */
+#define proto_sendw(cmd, args...) \
+ PREPROC_PASTE (proto_send, PREPROC_NARG (args), w) (cmd, args)
+/** Send a command with n double word arguments. */
+#define proto_sendd(cmd, args...) \
+ PREPROC_PASTE (proto_send, PREPROC_NARG (args), d) (cmd, args)
/** Send a command with no argument. */
extern inline void