本帖最后由 jjg424 于 2021-8-5 10:17 编辑
static en_result_t App_BtTimerTest(void)
{
stc_bt_cfg_t stcCfg;
en_result_t enResult = Ok;
//打开BT外设时钟
Sysctrl_SetPeripheralGate(SysctrlPeripheralBt, TRUE);
stcCfg.enGateP = BtPositive;
stcCfg.enGate = BtGateDisable;
stcCfg.enPRS = BtPCLKDiv16;
stcCfg.enTog = BtTogDisable;
stcCfg.enCT = BtTimer;
stcCfg.enMD = BtMode2;
//Bt初始化
if (Ok != Bt_Init(TIM1, &stcCfg))
{
enResult = Error;
}
Bt_Cnt32Set(TIM1, 0);
Bt_Run(TIM1);
return enResult;
}
|