This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] CCS/CC2650:简单广播设备示例无法切换广播模式。

Guru**** 2606725 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/wireless-connectivity/bluetooth-group/bluetooth/f/bluetooth-forum/912021/ccs-cc2650-simple-broadcaster-example-not-able-to-toggle-advertising-mode

器件型号:CC2650

工具/软件:Code Composer Studio

您好!

我创建了周期性计时器、以在简单广播设备示例中切换广播。

void period_clock_callbc (void){

   字符状态、值;
   状态= GAPRole_GetParameter (GAPROLE_Adv_enabled、&value);
   uint8_t 初始化地址使能;

  
   if (value){
       //关闭广播
       初始化地址使能= 0;
         GAPRole_SetParameter (GAPROLE_Advert_enabled、sizeof (uint8_t)、 &initalAddertEnable);
   }

   if (!value){
       //关闭广播
       初始化地址使能= 1;
         GAPRole_SetParameter (GAPROLE_Advert_enabled、sizeof (uint8_t)、 &initalAddertEnable);
   }

我每5秒设置一次该时钟。 我已将初始广播设置为 false。 对于第一个时钟中断、它启用广播模式。 但是、此后、即使 进入 IF (value)循环、它也不会停止广播模式。