summaryrefslogtreecommitdiff
path: root/n/avr/proto/proto_inline.c
diff options
context:
space:
mode:
Diffstat (limited to 'n/avr/proto/proto_inline.c')
-rw-r--r--n/avr/proto/proto_inline.c78
1 files changed, 39 insertions, 39 deletions
diff --git a/n/avr/proto/proto_inline.c b/n/avr/proto/proto_inline.c
index bbeee20..f17b52b 100644
--- a/n/avr/proto/proto_inline.c
+++ b/n/avr/proto/proto_inline.c
@@ -27,75 +27,75 @@
extern inline void
proto_send0 (uint8_t cmd)
{
- proto_putc ('!');
- proto_putc (cmd);
- proto_putc ('\r');
+ AC_PROTO_PUTC ('!');
+ AC_PROTO_PUTC (cmd);
+ AC_PROTO_PUTC ('\r');
}
/* Send a command with 1 byte argument. */
extern inline void
proto_send1b (uint8_t cmd, uint8_t arg0)
{
- proto_putc ('!');
- proto_putc (cmd);
+ AC_PROTO_PUTC ('!');
+ AC_PROTO_PUTC (cmd);
proto_arg (arg0);
- proto_putc ('\r');
+ AC_PROTO_PUTC ('\r');
}
/* Send a command with 1 word argument. */
extern inline void
proto_send1w (uint8_t cmd, uint16_t arg0)
{
- proto_putc ('!');
- proto_putc (cmd);
+ AC_PROTO_PUTC ('!');
+ AC_PROTO_PUTC (cmd);
proto_arg ((arg0 >> 8) & 0xff);
proto_arg ((arg0 >> 0) & 0xff);
- proto_putc ('\r');
+ AC_PROTO_PUTC ('\r');
}
/* Send a command with 1 double word argument. */
extern inline void
proto_send1d (uint8_t cmd, uint32_t arg0)
{
- proto_putc ('!');
- proto_putc (cmd);
+ AC_PROTO_PUTC ('!');
+ AC_PROTO_PUTC (cmd);
proto_arg ((arg0 >> 24) & 0xff);
proto_arg ((arg0 >> 16) & 0xff);
proto_arg ((arg0 >> 8) & 0xff);
proto_arg ((arg0 >> 0) & 0xff);
- proto_putc ('\r');
+ AC_PROTO_PUTC ('\r');
}
/* Send a command with 2 bytes arguments. */
extern inline void
proto_send2b (uint8_t cmd, uint8_t arg0, uint8_t arg1)
{
- proto_putc ('!');
- proto_putc (cmd);
+ AC_PROTO_PUTC ('!');
+ AC_PROTO_PUTC (cmd);
proto_arg (arg0);
proto_arg (arg1);
- proto_putc ('\r');
+ AC_PROTO_PUTC ('\r');
}
/* Send a command with 2 words arguments. */
extern inline void
proto_send2w (uint8_t cmd, uint16_t arg0, uint16_t arg1)
{
- proto_putc ('!');
- proto_putc (cmd);
+ 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_putc ('\r');
+ AC_PROTO_PUTC ('\r');
}
/* Send a command with 2 double words arguments. */
extern inline void
proto_send2d (uint8_t cmd, uint32_t arg0, uint32_t arg1)
{
- proto_putc ('!');
- proto_putc (cmd);
+ AC_PROTO_PUTC ('!');
+ AC_PROTO_PUTC (cmd);
proto_arg ((arg0 >> 24) & 0xff);
proto_arg ((arg0 >> 16) & 0xff);
proto_arg ((arg0 >> 8) & 0xff);
@@ -104,42 +104,42 @@ proto_send2d (uint8_t cmd, uint32_t arg0, uint32_t arg1)
proto_arg ((arg1 >> 16) & 0xff);
proto_arg ((arg1 >> 8) & 0xff);
proto_arg ((arg1 >> 0) & 0xff);
- proto_putc ('\r');
+ AC_PROTO_PUTC ('\r');
}
/* Send a command with 3 bytes arguments. */
extern inline void
proto_send3b (uint8_t cmd, uint8_t arg0, uint8_t arg1, uint8_t arg2)
{
- proto_putc ('!');
- proto_putc (cmd);
+ AC_PROTO_PUTC ('!');
+ AC_PROTO_PUTC (cmd);
proto_arg (arg0);
proto_arg (arg1);
proto_arg (arg2);
- proto_putc ('\r');
+ AC_PROTO_PUTC ('\r');
}
/* Send a command with 3 words arguments. */
extern inline void
proto_send3w (uint8_t cmd, uint16_t arg0, uint16_t arg1, uint16_t arg2)
{
- proto_putc ('!');
- proto_putc (cmd);
+ 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_putc ('\r');
+ AC_PROTO_PUTC ('\r');
}
/* Send a command with 3 double words arguments. */
extern inline void
proto_send3d (uint8_t cmd, uint32_t arg0, uint32_t arg1, uint32_t arg2)
{
- proto_putc ('!');
- proto_putc (cmd);
+ AC_PROTO_PUTC ('!');
+ AC_PROTO_PUTC (cmd);
proto_arg ((arg0 >> 24) & 0xff);
proto_arg ((arg0 >> 16) & 0xff);
proto_arg ((arg0 >> 8) & 0xff);
@@ -152,28 +152,28 @@ proto_send3d (uint8_t cmd, uint32_t arg0, uint32_t arg1, uint32_t arg2)
proto_arg ((arg2 >> 16) & 0xff);
proto_arg ((arg2 >> 8) & 0xff);
proto_arg ((arg2 >> 0) & 0xff);
- proto_putc ('\r');
+ AC_PROTO_PUTC ('\r');
}
/* 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_putc ('!');
- proto_putc (cmd);
+ AC_PROTO_PUTC ('!');
+ AC_PROTO_PUTC (cmd);
proto_arg (arg0);
proto_arg (arg1);
proto_arg (arg2);
proto_arg (arg3);
- proto_putc ('\r');
+ AC_PROTO_PUTC ('\r');
}
/* 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_putc ('!');
- proto_putc (cmd);
+ AC_PROTO_PUTC ('!');
+ AC_PROTO_PUTC (cmd);
proto_arg ((arg0 >> 8) & 0xff);
proto_arg ((arg0 >> 0) & 0xff);
proto_arg ((arg1 >> 8) & 0xff);
@@ -182,15 +182,15 @@ proto_send4w (uint8_t cmd, uint16_t arg0, uint16_t arg1, uint16_t arg2, uint16_t
proto_arg ((arg2 >> 0) & 0xff);
proto_arg ((arg3 >> 8) & 0xff);
proto_arg ((arg3 >> 0) & 0xff);
- proto_putc ('\r');
+ AC_PROTO_PUTC ('\r');
}
/* 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_putc ('!');
- proto_putc (cmd);
+ AC_PROTO_PUTC ('!');
+ AC_PROTO_PUTC (cmd);
proto_arg ((arg0 >> 24) & 0xff);
proto_arg ((arg0 >> 16) & 0xff);
proto_arg ((arg0 >> 8) & 0xff);
@@ -207,6 +207,6 @@ proto_send4d (uint8_t cmd, uint32_t arg0, uint32_t arg1, uint32_t arg2, uint32_t
proto_arg ((arg3 >> 16) & 0xff);
proto_arg ((arg3 >> 8) & 0xff);
proto_arg ((arg3 >> 0) & 0xff);
- proto_putc ('\r');
+ AC_PROTO_PUTC ('\r');
}