CH58M使用廣播示例,設(shè)置SECONDARY_PHY為L(zhǎng)E CODED,通過手機(jī)掃描發(fā)現(xiàn)顯示的是2M PHY。使用的EVT 1.8版本。
??????//?Device?starts?advertising?upon?initialization ??????uint8_t?initial_advertising_enable?=?TRUE; ??????uint8_t?initial_adv_event_type?=?GAP_ADTYPE_EXT_SCAN_UNDIRECT; ??????//?Set?the?GAP?Role?Parameters ??????GAPRole_SetParameter(GAPROLE_ADVERT_ENABLED,?sizeof(uint8_t),?&initial_advertising_enable); ??????GAPRole_SetParameter(GAPROLE_ADV_EVENT_TYPE,?sizeof(uint8_t),?&initial_adv_event_type); ??????GAPRole_SetParameter(GAPROLE_SCAN_RSP_DATA,?sizeof(scanRspData),?scanRspData); ??????GAPRole_SetParameter(GAPROLE_ADVERT_DATA,?sizeof(advertData),?advertData); ??????GAP_SetParamValue(TGAP_ADV_PRIMARY_PHY,?GAP_PHY_VAL_LE_1M); ??????GAP_SetParamValue(TGAP_ADV_SECONDARY_PHY,?GAP_PHY_VAL_LE_CODED);
熱門產(chǎn)品 :
USB3.0 HUB控制器:CH634