X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/fhem-stuff/blobdiff_plain/3a214c12e89f4888a45f297887bc03d16b00fe29..b2720844ad3ca5ae4d2b92d6d76650756f41ace0:/culfw/culfw-cc1100-fix.diff diff --git a/culfw/culfw-cc1100-fix.diff b/culfw/culfw-cc1100-fix.diff new file mode 100644 index 0000000..097b483 --- /dev/null +++ b/culfw/culfw-cc1100-fix.diff @@ -0,0 +1,38 @@ +Index: clib/cc1100.c +=================================================================== +--- clib/cc1100.c (revision 373) ++++ clib/cc1100.c (working copy) +@@ -266,26 +266,25 @@ + void + ccTX(void) + { +- uint8_t cnt = 0xff; + EIMSK &= ~_BV(CC1100_INT); + + // Going from RX to TX does not work if there was a reception less than 0.5 + // sec ago. Due to CCA? Using IDLE helps to shorten this period(?) +- ccStrobe(CC1100_SIDLE); +- while(cnt-- && (ccStrobe( CC1100_STX ) & 0x70) != 2) +- my_delay_us(10); ++ ++ while (cc1100_readReg(CC1100_MARCSTATE) != MARCSTATE_TX) { ++ ccStrobe(CC1100_STX); ++ } + } + + //-------------------------------------------------------------------- + void + ccRX(void) + { +- uint8_t cnt = 0xff; ++ while (cc1100_readReg(CC1100_MARCSTATE) != MARCSTATE_RX) { ++ ccStrobe(CC1100_SRX); ++ } + +- while(cnt-- && (ccStrobe( CC1100_SRX ) & 0x70) != 1) +- my_delay_us(10); + EIMSK |= _BV(CC1100_INT); +- + } + +