altos: Remove unused AES code from teledongle and tidongle
[fw/altos] / src / cc1111 / ao_radio.c
index 00816b33bdef4c9e784834c84c12d07a0ca3c6c9..51ed369b5b393a0b719f4991dc0e42a671086e5e 100644 (file)
@@ -286,7 +286,7 @@ ao_radio_get(uint8_t len)
        ao_config_get();
        ao_mutex_get(&ao_radio_mutex);
        ao_radio_idle();
-       RF_CHANNR = ao_config.radio_channel;
+       RF_CHANNR = 0;
        RF_FREQ2 = (uint8_t) (ao_config.radio_setting >> 16);
        RF_FREQ1 = (uint8_t) (ao_config.radio_setting >> 8);
        RF_FREQ0 = (uint8_t) (ao_config.radio_setting);
@@ -367,21 +367,9 @@ ao_radio_recv_abort(void)
 __xdata ao_radio_rdf_value = 0x55;
 
 void
-ao_radio_rdf(int ms)
+ao_radio_rdf(uint8_t pkt_len)
 {
        uint8_t i;
-       uint8_t pkt_len;
-
-       /*
-        * Compute the packet length as follows:
-        *
-        * 2000 bps (for a 1kHz tone)
-        * so, for 'ms' milliseconds, we need
-        * 2 * ms bits, or ms / 4 bytes
-        */
-       if (ms > (255 * 4))
-               ms = 255 * 4;
-       pkt_len = ms >> 2;
 
        ao_radio_abort = 0;
        ao_radio_get(pkt_len);
@@ -433,7 +421,7 @@ ao_radio_test(void)
        mode++;
        if ((mode & 2) && !radio_on) {
 #if HAS_MONITOR
-               ao_set_monitor(0);
+               ao_monitor_disable();
 #endif
 #if PACKET_HAS_SLAVE
                ao_packet_slave_stop();
@@ -451,6 +439,9 @@ ao_radio_test(void)
                ao_radio_idle();
                ao_radio_put();
                radio_on = 0;
+#if HAS_MONITOR
+               ao_monitor_enable();
+#endif
        }
 }