summaryrefslogtreecommitdiff
path: root/n/avr/proto/proto.c
diff options
context:
space:
mode:
authorschodet2005-01-21 01:38:27 +0000
committerschodet2005-01-21 01:38:27 +0000
commit02d6993344c968b0e98848d9f45726f56894bdc8 (patch)
tree9a079462433877a318eae6442a185d731e711eea /n/avr/proto/proto.c
parent5df03b91677bb6d299bf1e95f980e9088ffeb9ee (diff)
Ajout de macros pour les noms des fonctions callback et putc.
Diffstat (limited to 'n/avr/proto/proto.c')
-rw-r--r--n/avr/proto/proto.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/n/avr/proto/proto.c b/n/avr/proto/proto.c
index 2a62381..ddba80b 100644
--- a/n/avr/proto/proto.c
+++ b/n/avr/proto/proto.c
@@ -71,7 +71,7 @@ proto_accept (uint8_t c)
}
else
{
- proto_callback ('?', 0, 0);
+ AC_PROTO_CALLBACK ('?', 0, 0);
step = 0;
}
break;
@@ -79,7 +79,7 @@ proto_accept (uint8_t c)
/* Command received yet. */
if (c == '\r')
{
- proto_callback (cmd, size, args);
+ AC_PROTO_CALLBACK (cmd, size, args);
step = 0;
}
else
@@ -103,7 +103,7 @@ proto_accept_digit (uint8_t c)
/* Test for argument list overflow. */
if (size >= AC_PROTO_ARGS_MAX_SIZE)
{
- proto_callback ('?', 0, 0);
+ AC_PROTO_CALLBACK ('?', 0, 0);
step = 0;
return;
}
@@ -116,7 +116,7 @@ proto_accept_digit (uint8_t c)
c -= 'A' - 10;
else
{
- proto_callback ('?', 0, 0);
+ AC_PROTO_CALLBACK ('?', 0, 0);
return;
}
/* Add digit. */
@@ -130,7 +130,7 @@ proto_accept_digit (uint8_t c)
inline static void
proto_hex (uint8_t h)
{
- proto_putc (h >= 10 ? h - 10 + 'a' : h + '0');
+ AC_PROTO_PUTC (h >= 10 ? h - 10 + 'a' : h + '0');
}
/* Send a argument byte. */
@@ -145,10 +145,10 @@ proto_arg (uint8_t a)
void
proto_send (uint8_t cmd, uint8_t size, uint8_t *args)
{
- proto_putc ('!');
- proto_putc (cmd);
+ AC_PROTO_PUTC ('!');
+ AC_PROTO_PUTC (cmd);
while (size--)
proto_arg (*args++);
- proto_putc ('\r');
+ AC_PROTO_PUTC ('\r');
}