summaryrefslogtreecommitdiff
path: root/src/core/ao_send_packet.c
diff options
context:
space:
mode:
authorBdale Garbee <bdale@gag.com>2013-05-16 00:36:23 -0600
committerBdale Garbee <bdale@gag.com>2013-05-16 00:36:23 -0600
commit02d111b1b53ef01fc6e9ab6c4bc60b8af1be0067 (patch)
tree8356f4a019969ee99a45e264c87d38555cf316cc /src/core/ao_send_packet.c
parent7a2e1f05adad990a6b161865267abf07ffec7a7e (diff)
parent7699a55aed3a9a7daeb4c6a5a9a280f43edf455f (diff)
Merge branch 'branch-1.2' into debian
Diffstat (limited to 'src/core/ao_send_packet.c')
-rw-r--r--src/core/ao_send_packet.c20
1 files changed, 2 insertions, 18 deletions
diff --git a/src/core/ao_send_packet.c b/src/core/ao_send_packet.c
index 1a8e74de..66315d22 100644
--- a/src/core/ao_send_packet.c
+++ b/src/core/ao_send_packet.c
@@ -21,22 +21,6 @@
static __xdata uint8_t ao_send[AO_MAX_SEND];
-static uint8_t
-getnibble(void)
-{
- char c;
-
- c = getchar();
- if ('0' <= c && c <= '9')
- return c - '0';
- if ('a' <= c && c <= 'f')
- return c - ('a' - 10);
- if ('A' <= c && c <= 'F')
- return c - ('A' - 10);
- ao_cmd_status = ao_cmd_lex_error;
- return 0;
-}
-
static void
ao_send_packet(void)
{
@@ -53,8 +37,8 @@ ao_send_packet(void)
return;
}
for (i = 0; i < count; i++) {
- b = getnibble() << 4;
- b |= getnibble();
+ b = ao_getnibble() << 4;
+ b |= ao_getnibble();
if (ao_cmd_status != ao_cmd_success)
return;
ao_send[i] = b;