0x12, 0x03,
0x15, 0x34,
- 0x17, 0x30, // always go into IDLE
-+ 0x17, 0x3F, // always go into RX, CCA, ELV uses 0x03
++ 0x17, 0x33, // always go into RX after TX, CCA, ELV uses 0x03
0x18, 0x18,
0x19, 0x16,
0x1B, 0x43,
}
void
-@@ -97,14 +96,10 @@
+@@ -97,13 +96,13 @@
}
rssi = cc1100_sendbyte( 0 );
-+ /* LQI = */ cc1100_sendbyte( 0 );
-
+-
++
CC1100_DEASSERT;
- ccStrobe( CC1100_SFRX );
- ccStrobe( CC1100_SIDLE );
- ccStrobe( CC1100_SNOP );
- ccStrobe( CC1100_SRX );
--
++ while(cc1100_readReg(CC1100_RXBYTES) & 0x7f)
++ cc1100_readReg( CC1100_RXFIFO );
++
++ ccRX();
+
dec[0] = enc[0];
dec[1] = (~enc[1]) ^ 0x89;
-
-@@ -113,7 +108,6 @@
+@@ -113,7 +112,6 @@
dec[l] = enc[l] ^ dec[2];
if (tx_report & REP_BINTIME) {
DC('a');
-@@ -133,24 +127,14 @@
+@@ -133,24 +131,17 @@
}
return;
-
- }
-+ if (cc1100_readReg( CC1100_MARCSTATE ) == MARCSTATE_RXFIFO_OVERFLOW) {
++ switch(cc1100_readReg( CC1100_MARCSTATE )) {
++ case MARCSTATE_RXFIFO_OVERFLOW:
+ ccStrobe( CC1100_SFRX );
++ case MARCSTATE_IDLE:
+ ccStrobe( CC1100_SIDLE );
+ ccStrobe( CC1100_SNOP );
+ ccStrobe( CC1100_SRX );
++ break;
+ }
}
void
-@@ -173,20 +157,7 @@
+@@ -173,20 +164,7 @@
my_delay_ms(3); // 3ms: Found by trial and error
}
enc[0] = dec[0];
enc[1] = (~dec[1]) ^ 0x89;
-@@ -195,6 +166,15 @@
+@@ -195,6 +173,15 @@
enc[l] = dec[l] ^ dec[2];
// send
CC1100_ASSERT;
cc1100_sendbyte(CC1100_WRITE_BURST | CC1100_TXFIFO);
-@@ -205,12 +185,17 @@
+@@ -205,12 +192,17 @@
CC1100_DEASSERT;