altos: Mark local functions 'static'
[fw/altos] / src / drivers / ao_packet_master.c
index 5e440db04776442dc0c516bdcdadb69f4ed8ce12..e67dd27fb1111bbb5898209a3080fc3ee52b8c47 100644 (file)
@@ -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
@@ -38,7 +39,7 @@ ao_packet_getchar(void)
 }
 
 static void
-ao_packet_echo(void) __reentrant
+ao_packet_echo(void) 
 {
        int     c;
        while (ao_packet_enable) {
@@ -49,9 +50,9 @@ ao_packet_echo(void) __reentrant
        ao_exit();
 }
 
-static __xdata struct ao_task  ao_packet_echo_task;
-static __xdata uint16_t                ao_packet_master_delay;
-static __xdata uint16_t                ao_packet_master_time;
+static struct ao_task  ao_packet_echo_task;
+static uint16_t                ao_packet_master_delay;
+static uint16_t                ao_packet_master_time;
 
 #define AO_PACKET_MASTER_DELAY_SHORT   AO_MS_TO_TICKS(100)
 #define AO_PACKET_MASTER_DELAY_LONG    AO_MS_TO_TICKS(1000)
@@ -82,7 +83,7 @@ ao_packet_master_check_busy(void)
                ao_packet_master_delay = AO_PACKET_MASTER_DELAY_LONG;
 }
 
-void
+static void
 ao_packet_master(void)
 {
        ao_config_get();
@@ -113,10 +114,11 @@ ao_packet_master(void)
 }
 
 static void
-ao_packet_forward(void) __reentrant
+ao_packet_forward(void) 
 {
        char c;
        ao_packet_enable = 1;
+       ao_packet_tx_used = 0;
        ao_cmd_white();
 
        flush();
@@ -150,7 +152,7 @@ ao_packet_signal(void)
        printf ("RSSI: %d\n", ao_radio_rssi);
 }
 
-__code struct ao_cmds ao_packet_master_cmds[] = {
+const struct ao_cmds ao_packet_master_cmds[] = {
        { ao_packet_forward,    "p\0Remote packet link." },
        { ao_packet_signal,     "s\0Report signal strength." },
        { 0,    NULL },