// tune function
CL6017SControlData[0] &= 0xdf;// mute off
CL6017SControlData[0] &= 0xfd;// tune=0
I2C_WriteCL6017SReg(CL6017SControlData,4);
CL6017SControlData[0] |= 0x02;//tune=1, begin tune operaton
I2C_WriteCL6017SReg(CL6017SControlData,1);
Delay1Ms(50); // wait for 50ms
}
/**************************************************************************************
* 函数名称:CL6017S_FMSeekFromCurrentCh
* 功 能:
* 输入参数:bool seekUp: 0-seek up, 1-seek down
* 输入参数:unsigned int *TunedFrequency: the radio frequency stay in when seeking process complete, the frequency unit is 10khz
* 输出参数:bool sfflag: 0-Seek successful 1-Seek failure
* 说 明: seek from current channel automaticly,if want to seek from certain channel, use CL6017S_FMTune to certain channel ahead
**************************************************************************************/
bool CL6017S_FMSeekFromCurrentCh(bool seekUp, unsigned int *TunedFrequency)
{
unsigned int ch = 0;
unsigned int loop,loopSt=0;
bool stcflag,bSt;
unsigned int Temp[6];
unsigned int rssi, envelope,fd;