++// Workaround for CC1101 Errata 3
++static inline uint8_t
++read_cc1100_rxbytes(void)
++{
++ uint8_t rxbytes, rxbytes2;
++
++ rxbytes = cc1100_readReg(CC1100_RXBYTES);
++ while((rxbytes2 = cc1100_readReg(CC1100_RXBYTES)) != rxbytes)
++ rxbytes = rxbytes2;
++
++ return rxbytes;
++}
++
++static void
++rf_asksin_reset_rx(void)
++{
++ ccStrobe( CC1100_SFRX );
++ ccStrobe( CC1100_SIDLE );
++ ccStrobe( CC1100_SNOP );
++
++ while (read_cc1100_rxbytes() & 0x7f)
++ cc1100_readReg(CC1100_RXFIFO);
++
++ ccStrobe( CC1100_SRX );
++}
++