-- break;
--
-- }
--
- }
-
- void
-@@ -173,20 +173,7 @@
- my_delay_ms(3); // 3ms: Found by trial and error
- }
-
-- ccStrobe(CC1100_SIDLE);
-- ccStrobe(CC1100_SFRX );
-- ccStrobe(CC1100_SFTX );
--
-- if (dec[2] & (1 << 4)) { //BURST-bit set?
-- ccStrobe(CC1100_STX ); //We need to send a burst
--
-- //According to ELV, devices get activated every 300ms, so send burst for 360ms
-- for(l = 0; l < 3; l++)
-- my_delay_ms(120); //arg is uint_8, so loop
-- }
--
- // "crypt"
--
- enc[0] = dec[0];
- enc[1] = (~dec[1]) ^ 0x89;
-
-@@ -195,6 +182,15 @@
-
- enc[l] = dec[l] ^ dec[2];
++ // We must not read the last byte from the RX fifo while RX is in progress (Errata 1)
++ while (((read_cc1100_rxbytes() & 0x7f) < 2) && (cc1100_readReg(CC1100_PKTSTATUS) & (1 << 3))) {
++ my_delay_ms(1);
++ }