+typedef int16_t (*ao_radio_fill_func)(uint8_t *buffer, int16_t len);
+
+#define DEBUG 0
+#if DEBUG
+void
+ao_aprs_bit(uint8_t bit)
+{
+ static int seq = 0;
+ printf ("%6d %d\n", seq++, bit ? 1 : 0);
+}
+#else
+void
+ao_aprs_bit(uint8_t bit)
+{
+ putchar (bit ? 0xc0 : 0x40);
+}
+#endif
+
+void
+ao_radio_send_aprs(ao_radio_fill_func fill);
+
+static void
+aprs_bit_debug(uint8_t tx_bit)
+{
+ fprintf (stderr, "bit %d\n", tx_bit);
+}
+
+static void
+aprs_byte_debug(uint8_t tx_byte)
+{
+ fprintf(stderr, "byte %02x\n", tx_byte);
+}
+#define APRS_BIT_DEBUG(x) aprs_bit_debug(x)
+#define APRS_BYTE_DEBUG(y) aprs_byte_debug(y)
+