|
你好,大侠们,
/*
*********************************************************************************************************
* 函 数 名: SI4730_PowerUp_FM_Revice
* 功能说明: 配置Si4703为FM接收模式, 模拟模式(非数字模式)
* 形 参:无
* 返 回 值: 0 失败, 1 成功
*********************************************************************************************************
*/
uint8_t SI4730_PowerUp_FM_Revice(void)
{
/* AN332 page = 277
Powerup in Analog Mode
CMD 0x01 POWER_UP
ARG1 0xC0 Set to FM Receive. Enable interrupts.
ARG2 0x05 Set to Analog Audio Output
STATUS →0x80 Reply Status. Clear-to-send high.
*/
uint8_t ucCmdBuf[3];
uint32_t uiTimeOut;
ucCmdBuf[0] = 0x01;
ucCmdBuf[1] = 0xD0; //0xC0;
ucCmdBuf[2] = 0x05;
SI4730_SendCmd(ucCmdBuf, 3);
/*
第1个形参表示最大轮询次数; 如果成功,返回值uiTimeOut > 0 表示实际轮询次数
第2个形参1表示结束后发送STOP
*/
uiTimeOut = SI4730_WaitStatus80(1000, 1); // 这个始终都没有0x80 返回,返回 的是0x00, 这个是什么情况啊 ?????
if (uiTimeOut > 0)
{
return 1;
}
return 0;
} |
|