void
rf_asksin_task(void)
{
-@@ -77,15 +90,27 @@
+@@ -77,18 +90,30 @@
uint8_t dec[MAX_ASKSIN_MSG];
uint8_t rssi;
uint8_t l;
+
enc[0] = cc1100_readReg( CC1100_RXFIFO ) & 0x7f; // read len
+ if (enc[0]>=MAX_ASKSIN_MSG)
+ enc[0] = MAX_ASKSIN_MSG-1;
+-
++
+ while ((enc[0] + 2) < (rxfifo_cnt - 1)) { // Wait for more data
+ my_delay_ms(1);
+ rxfifo_cnt = (read_cc1100_rxbytes() & 0x7f) + 1;
+ }
+
- if (enc[0]>=MAX_ASKSIN_MSG)
- enc[0] = MAX_ASKSIN_MSG-1;
+ CC1100_ASSERT;
+ cc1100_sendbyte( CC1100_READ_BURST | CC1100_RXFIFO );
@@ -97,13 +122,12 @@
}