disable receiver after receiving one packet and reenable
it after reading it from the fifo
0x12, 0x03,
0x15, 0x34,
- 0x17, 0x30, // always go into IDLE
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,
0x18, 0x18,
0x19, 0x16,
0x1B, 0x43,
}
rssi = cc1100_sendbyte( 0 );
}
rssi = cc1100_sendbyte( 0 );
-+ /* LQI = */ cc1100_sendbyte( 0 );
-
CC1100_DEASSERT;
- ccStrobe( CC1100_SFRX );
- ccStrobe( CC1100_SIDLE );
- ccStrobe( CC1100_SNOP );
- ccStrobe( CC1100_SRX );
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;
dec[0] = enc[0];
dec[1] = (~enc[1]) ^ 0x89;
dec[l] = enc[l] ^ dec[2];
dec[l] = enc[l] ^ dec[2];
if (tx_report & REP_BINTIME) {
DC('a');
if (tx_report & REP_BINTIME) {
DC('a');
-+ if (cc1100_readReg( CC1100_MARCSTATE ) == MARCSTATE_RXFIFO_OVERFLOW) {
++ switch(cc1100_readReg( CC1100_MARCSTATE )) {
++ case MARCSTATE_RXFIFO_OVERFLOW:
+ ccStrobe( CC1100_SFRX );
+ ccStrobe( CC1100_SFRX );
+ ccStrobe( CC1100_SIDLE );
+ ccStrobe( CC1100_SNOP );
+ ccStrobe( CC1100_SRX );
+ ccStrobe( CC1100_SIDLE );
+ ccStrobe( CC1100_SNOP );
+ ccStrobe( CC1100_SRX );
my_delay_ms(3); // 3ms: Found by trial and error
}
my_delay_ms(3); // 3ms: Found by trial and error
}
enc[0] = dec[0];
enc[1] = (~dec[1]) ^ 0x89;
enc[0] = dec[0];
enc[1] = (~dec[1]) ^ 0x89;
enc[l] = dec[l] ^ dec[2];
enc[l] = dec[l] ^ dec[2];
// send
CC1100_ASSERT;
cc1100_sendbyte(CC1100_WRITE_BURST | CC1100_TXFIFO);
// send
CC1100_ASSERT;
cc1100_sendbyte(CC1100_WRITE_BURST | CC1100_TXFIFO);