Exemplo n.º 1
0
void FMDrv_ChipInit()
{
   SerialCommCryClkOn();
   SerialCommInit();
   NS953_I2cWriteReg(START_REG_NUM, TOTAL_REG_NUM);
   SerialCommCryClkOff();
}
Exemplo n.º 2
0
void FMDrv_PowerOnReset(void)
{
   SerialCommCryClkOn();
   SerialCommInit();
   resetCtrlWord();
   NS953_I2cWriteReg(START_REG_NUM, TOTAL_REG_NUM);
}
Exemplo n.º 3
0
void  RDA5802_PowerOnReset(void)
{
    FMshadowReg[1]=0x01;

    delay_us(10000);
    SerialCommInit(); 
    RDA5802_Intialization(); 
}
Exemplo n.º 4
0
bool FMDrv_IsChipValid( void )
{
	bool result;
   SerialCommCryClkOn();
   SerialCommInit();
   result = NS953_I2cWriteReg(START_REG_NUM, TOTAL_REG_NUM);
   SerialCommCryClkOff();
   return result;
}
Exemplo n.º 5
0
uint16 RDAFM_GetChipID(void)
{
    uint8 RDAFM_reg_data[6]={0};
    uint16 cChipID;
//  uint8 tryCount,bRet;

    SerialCommInit();
    
    gpio_set_pin_level(GPIO_I2C_SCLK,0);
    DELAY(DURATION_LOW);
    gpio_set_pin_level(GPIO_I2C_SCLK,1);
    DELAY(DURATION_LOW*30);
  
    gpio_set_pin_level(GPIO_I2C_SDA,1);
    gpio_set_pin_level(GPIO_I2C_SCLK,1);

    RDAFM_reg_data[0]=0x00;
    RDAFM_reg_data[1]=0x02;

    OperationRDAFM_2w(WRITE,&RDAFM_reg_data[0], 2);
    delay_us(30000);       
    OperationRDAFM_2w(READ,&RDAFM_reg_data[0], 6);
    cChipID=(RDAFM_reg_data[4]*0x100)+ RDAFM_reg_data[5];   
    
    if(0x5802==cChipID || 0x5803==cChipID )
    {
        return(0x5802);
    }
    else
    {
        RDABT_5876_fm_patch_on();
        delay_us(10000);
        OperationRDAFM_2w(WRITE,&(RDAFM_reg_data[0]), 2);
        delay_us(30000);
        OperationRDAFM_2w(READ,&(RDAFM_reg_data[0]), 6);
        cChipID=(RDAFM_reg_data[4]*0x100)+ RDAFM_reg_data[5];
        if(0x5802==cChipID || 0x5803==cChipID )
        {
            return(0x5802);
        }
    }
    return (0xFFFF);        
}