+static __pdata uint8_t ao_pad_armed;
+static __pdata uint16_t ao_pad_arm_time;
+static __pdata uint8_t ao_pad_box;
+static __xdata uint8_t ao_pad_disabled;
+static __pdata uint16_t ao_pad_packet_time;
+
+#ifndef AO_PAD_RSSI_MINIMUM
+#define AO_PAD_RSSI_MINIMUM -90
+#endif
+
+#define DEBUG 1
+
+#if DEBUG
+static __pdata uint8_t ao_pad_debug;
+#define PRINTD(...) (ao_pad_debug ? (printf(__VA_ARGS__), 0) : 0)
+#define FLUSHD() (ao_pad_debug ? (flush(), 0) : 0)
+#else
+#define PRINTD(...)
+#define FLUSHD()
+#endif
+
+static void
+ao_siren(uint8_t v)
+{
+#ifdef AO_SIREN
+ ao_gpio_set(AO_SIREN_PORT, AO_SIREN_PIN, AO_SIREN, v);
+#else
+#if HAS_BEEP
+ ao_beep(v ? AO_BEEP_MID : 0);
+#else
+ (void) v;
+#endif
+#endif
+}