CH579按照論壇的教程加了如下代碼,廣播rssi信號(hào)非常好,但是掃描到從設(shè)備信號(hào)很差,為啥呢?
//必須全局變量
blePaControlConfig_t pa_lna_ctl;
//設(shè)置對(duì)應(yīng)的IO為輸出模式
GPIOA_ModeCfg(GPIO_Pin_3|GPIO_Pin_4, GPIO_ModeOut_PP_5mA);
//設(shè)置對(duì)應(yīng)的GPIO為對(duì)應(yīng)的拉高拉低寄存器
//對(duì)應(yīng)的pin是bit
pa_lna_ctl.txEnableGPIO = (uint32_t)&R32_PA_OUT;
pa_lna_ctl.txDisableGPIO = (uint32_t)&R32_PA_CLR;
pa_lna_ctl.tx_pin = GPIO_Pin_3;
pa_lna_ctl.rxEnableGPIO = (uint32_t)&R32_PA_OUT;
pa_lna_ctl.rxDisableGPIO = (uint32_t)&R32_PA_CLR;
pa_lna_ctl.rx_pin = GPIO_Pin_4;
//下面調(diào)用要在GAPRole_PeripheralInit,GAPRole_CentralInit 之類的代碼調(diào)用之后才能調(diào)用
BLE_PAControlInit( &pa_lna_ctl );