-@@ -113,7 +188,6 @@
-
- dec[l] = enc[l] ^ dec[2];
-
--
- if (tx_report & REP_BINTIME) {
-
- DC('a');
-@@ -131,26 +205,17 @@
-
- DNL();
- }
-+ }
-
-- return;
--
-+ 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;
- }
--
--
-- switch (cc1100_readReg( CC1100_MARCSTATE )) {
--
-- // RX_OVERFLOW
-- case 17:
-- // IDLE
-- case 1:
-- ccStrobe( CC1100_SFRX );
-- ccStrobe( CC1100_SIDLE );
-- ccStrobe( CC1100_SNOP );
-- ccStrobe( CC1100_SRX );
-- break;
--
-- }
--
- }
-
- void
-@@ -173,20 +238,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 +247,15 @@
-
- enc[l] = dec[l] ^ dec[2];
-
-+ ccTX();
-+ if (dec[2] & (1 << 4)) { // BURST-bit set?
-+ // 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
-+ } else {
-+ my_delay_ms(10);
-+ }
-+
- // send
- CC1100_ASSERT;
- cc1100_sendbyte(CC1100_WRITE_BURST | CC1100_TXFIFO);
-@@ -205,12 +266,17 @@
-
- CC1100_DEASSERT;
-
-- ccStrobe( CC1100_SFRX );
-- ccStrobe( CC1100_STX );
-+ // wait for TX to finish
-+ while(cc1100_readReg( CC1100_MARCSTATE ) == MARCSTATE_TX)
-+ ;
-+
-+ if (cc1100_readReg( CC1100_MARCSTATE ) == MARCSTATE_TXFIFO_UNDERFLOW) {
-+ ccStrobe( CC1100_SFTX );
-+ ccStrobe( CC1100_SIDLE );
-+ ccStrobe( CC1100_SNOP );
-+ ccStrobe( CC1100_SRX );
-+ }
-
-- while( cc1100_readReg( CC1100_MARCSTATE ) != 1 )
-- my_delay_ms(5);
--
- if(asksin_on) {
- ccRX();
- } else {