X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fkernel%2Fao_send_packet.c;h=ee4685998215a7899f123caf2780abc88ebdc00a;hb=HEAD;hp=66315d227e8e05ac8a620e6727e11d44586f00ca;hpb=24167015705ae831692b95735968b04a876f935e;p=fw%2Faltos diff --git a/src/kernel/ao_send_packet.c b/src/kernel/ao_send_packet.c index 66315d22..ff3ab68d 100644 --- a/src/kernel/ao_send_packet.c +++ b/src/kernel/ao_send_packet.c @@ -3,7 +3,8 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of @@ -16,20 +17,20 @@ */ #include "ao.h" +#include "ao_send_packet.h" #define AO_MAX_SEND 128 -static __xdata uint8_t ao_send[AO_MAX_SEND]; +static uint8_t ao_send[AO_MAX_SEND]; static void ao_send_packet(void) { - __pdata uint16_t count; + uint32_t count; uint8_t b; - __pdata uint8_t i; + uint8_t i; - ao_cmd_hex(); - count = ao_cmd_lex_i; + count = ao_cmd_hex(); if (ao_cmd_status != ao_cmd_success) return; if (count > AO_MAX_SEND - 2) { @@ -43,10 +44,10 @@ ao_send_packet(void) return; ao_send[i] = b; } - ao_radio_send(ao_send, count); + ao_radio_send(ao_send, (uint8_t) count); } -static __code struct ao_cmds ao_send_packet_cmds[] = { +static const struct ao_cmds ao_send_packet_cmds[] = { { ao_send_packet, "S \0Send packet. Data on next line" }, { 0, NULL } };