Beispiel #1
0
/**
 * init
 *
 * Initialize CC1101
 */
void CC1101_init(void)
{

  CC1101_reset();                              // Reset CC1101

  // Configure PATABLE
  CC1101_writeBurstReg(CC1101_PATABLE, (byte*)paTable, 8);
  //CC1101_writeReg(CC1101_PATABLE, CC1101.paTableByte);

  char read = CC1101_readReg(CC1101_PARTNUM, CC1101_STATUS_REGISTER);
  read = CC1101_readReg(CC1101_VERSION, CC1101_STATUS_REGISTER);
  read = CC1101_readReg(CC1101_MARCSTATE, CC1101_STATUS_REGISTER);

  //byte syncWord = 199;
  //CC1101_setSyncWord(&syncWord, false);
  CC1101_setCarrierFreq(CFREQ_315);
  CC1101_disableAddressCheck();

}
Beispiel #2
0
/*******************************************************************************
* Description : 
* Syntax      : 
* Parameters I: 
* Parameters O: 
* return      : 
*******************************************************************************/
static void CC1101_initStep(void)
{
    CC1101_ExtInt_disable();      

    CC1101_pinMode(); 
    CC1101_reset();        //GDO2 _|-|_  3.5us  
    CC1101_regSetting();       

    CC1101_setPATable();      //8 level 0~7
    CC1101_setTxPower(PA_LEVEL_7);  // choice max PA

#ifdef RF_PA_EN
    pinPA_Tx_DIS;      /* Tx don't through PA and Rx */
#endif	

	SpiWriteStrobe(SIDLE);	 
    delayUs(200);
    
#ifdef RF_SLAVE         
        CC1101_RxMode();    //default Rx mode enalbe ExtInt
#endif   
}