CH58M使用广播示例,设置SECONDARY_PHY为LE CODED,通过手机扫描发现显示的是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);
热门产品 :
CH32V317: 互联型青稞RISC-V MCU