Discuz! Board
标题:
我在DFU的基础上 在static services_init添加一个蓝牙数据传输服务后死掉
[打印本页]
作者:
蓝色冲击波
时间:
2017-6-1 09:26
标题:
我在DFU的基础上 在static services_init添加一个蓝牙数据传输服务后死掉
1.DFU功能
#ifdef BLE_DFU_APP_SUPPORT
/** @snippet [DFU BLE Service initialization] */
ble_dfu_init_t dfus_init;
// Initialize the Device Firmware Update Service.
memset(&dfus_init, 0, sizeof(dfus_init));
dfus_init.evt_handler = dfu_app_on_dfu_evt;
dfus_init.error_handler = NULL;
dfus_init.evt_handler = dfu_app_on_dfu_evt;
dfus_init.revision = DFU_REVISION;
err_code = ble_dfu_init(&m_dfus, &dfus_init);
APP_ERROR_CHECK(err_code);
dfu_app_reset_prepare_set(reset_prepare);
dfu_app_dm_appl_instance_set(m_app_handle);
/** @snippet [DFU BLE Service initialization] */
#endif
2.蓝牙数据传输服务
ble_nus_init_t nus_init;
memset(&nus_init, 0, sizeof(nus_init));
nus_init.data_handler = nus_data_handler;
err_code = ble_nus_init(&m_nus, &nus_init);
APP_ERROR_CHECK(err_code);
两个功能屏蔽任意一个都能正常工作,同时开启这两个服务会造成其中一个服务初始化失败(ble_dfu_init或者ble_nus_init初始化失败,连死循环都进不去)!调试提示内存不够!但这都是两个服务都是官方给的例子,我没有改动,也没发现有什么地方可改。有没有解决 办法?
作者:
蓝色冲击波
时间:
2017-6-1 14:06
没人遇到过这个问题吗?
欢迎光临 Discuz! Board (http://qfv8.com/)
Powered by Discuz! X3