altos: Allow radio recv and xmit to be separately configured
[fw/altos] / src / core / ao.h
index ce0bf5d14289007dff1b602e750cdc7b23dec7f4..6cfdcba851ba14752819718acd4c7a4ee7ab367a 100644 (file)
@@ -514,17 +514,28 @@ extern __xdata uint8_t    ao_radio_dma;
 #define AO_RADIO_STATUS_CRC_OK AO_FEC_DECODE_CRC_OK
 #endif
 
+#ifndef HAS_RADIO_RECV
+#define HAS_RADIO_RECV HAS_RADIO
+#endif
+#ifndef HAS_RADIO_XMIT
+#define HAS_RADIO_XMIT HAS_RADIO
+#endif
+
 void
 ao_radio_general_isr(void) ao_arch_interrupt(16);
 
+#if HAS_RADIO_XMIT
 void
 ao_radio_send(const __xdata void *d, uint8_t size) __reentrant;
+#endif
 
+#if HAS_RADIO_RECV
 uint8_t
 ao_radio_recv(__xdata void *d, uint8_t size) __reentrant;
 
 void
 ao_radio_recv_abort(void);
+#endif
 
 void
 ao_radio_test(uint8_t on);
@@ -534,6 +545,25 @@ typedef int16_t (*ao_radio_fill_func)(uint8_t *buffer, int16_t len);
 void
 ao_radio_send_lots(ao_radio_fill_func fill);
 
+/*
+ * ao_radio_pa
+ */
+
+#if AO_RADIO_HAS_PA
+void
+ao_radio_pa_on(void);
+
+void
+ao_radio_pa_off(void);
+
+void
+ao_radio_pa_init(void);
+#else
+#define ao_radio_pa_on()
+#define ao_radio_pa_off()
+#define ao_radio_pa_init()
+#endif
+
 /*
  * Compute the packet length as follows:
  *