Part Number:CC2340R5Other Parts Discussed in Thread:SYSCONFIG
除了在Syscfg裡可以設定藍牙廣播間隔時間,要如何在Code裡面設定廣播時間
例如:if達成某個條件Interval變成500ms,else就保持1000ms
Galaxy Yue:
您好,
请查看这个link在sysconfig后的代码片段(已附上)
https://dev.ti.com/tirex/explore/node?node=A__AWGBpOjezYNvPbjzZTCkqw__SIMPLELINK-ACADEMY-CC23XX__gsUPh5j__LATEST
这个是API列表
https://software-dl.ti.com/simplelink/esd/simplelink_lowpower_f3_sdk/7.10.00.35/exports/docs/ble5stack/ble_user_guide/doxygen/ble/html/gap__advertiser_8h.html
// Advertisement Params 1 GapAdv_params_t advParams1 = {.eventProps =GAP_ADV_PROP_CONNECTABLE | GAP_ADV_PROP_LEGACY | GAP_ADV_PROP_SCANNABLE,.primIntMin =800,.primIntMax =800,.primChanMap =GAP_ADV_CHAN_37,.peerAddrType = PEER_ADDRTYPE_PUBLIC_OR_PUBLIC_ID,.peerAddr ={ 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa },.filterPolicy = GAP_ADV_WL_POLICY_ANY_REQ,.txPower =GAP_ADV_TX_POWER_NO_PREFERENCE,.primPhy =GAP_ADV_PRIM_PHY_1_MBPS,.secPhy =GAP_ADV_SEC_PHY_1_MBPS,.sid =0 };