工具与软件:
您好、TI
删除双按钮菜单后、
我想通过主机通过 UART 发送的命令来控制 BLE 发现和连接操作。
但是、初始化完成后multi_role_doDiscoverDevices
、当我发送执行命令时、
系统似乎在之后卡住GAPScan_enable
、UART 停止工作。
系统似乎已冻结。
对于如何解决此问题、您有什么建议吗?
bool multi_role_doDiscoverDevices(uint8_t index) { (void) index; #if (DEFAULT_DEV_DISC_BY_SVC_UUID == TRUE) // Scanning for DEFAULT_SCAN_DURATION x 10 ms. // The stack does not need to record advertising reports // since the application will filter them by Service UUID and save. // Reset number of scan results to 0 before starting scan numScanRes = 0; GapScan_enable(0, DEFAULT_SCAN_DURATION, 0); #else // !DEFAULT_DEV_DISC_BY_SVC_UUID // Scanning for DEFAULT_SCAN_DURATION x 10 ms. // Let the stack record the advertising reports as many as up to DEFAULT_MAX_SCAN_RES. GapScan_enable(0, DEFAULT_SCAN_DURATION, DEFAULT_MAX_SCAN_RES); #endif // DEFAULT_DEV_DISC_BY_SVC_UUID // Enable only "Stop Discovering" and disable all others in the main menu //tbm_setItemStatus(&mrMenuMain, MR_ITEM_STOPDISC, // (MR_ITEM_ALL & ~MR_ITEM_STOPDISC)); return (true); }