想请教一下,iar编译报error,
#if defined (add_vbat_service)
uint8_t battery_data = 85;
ble_advdata_service_data_t service_data;
#endif
memset(&init, 0, sizeof(init));
init.advdata.name_type = BLE_ADVDATA_FULL_NAME;
//init.advdata.name_type = BLE_ADVDATA_NO_NAME;
//init.advdata.name_type = BLE_ADVDATA_SHORT_NAME;
//init.advdata.short_name_len = 6;
init.advdata.include_appearance = true;
init.advdata.flags = BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE;
//init.advdata.flags = BLE_GAP_ADV_FLAGS_LE_ONLY_LIMITED_DISC_MODE;
#if defined (add_vbat_service)
service_data.service_uuid = BLE_UUID_BATTERY_SERVICE;
service_data.data.size = sizeof(battery_data);
service_data.data.p_data = &battery_data;
init.advdata.service_data_count = 1;
#endif
提示Error[Pe550]: variable "service_data" was set but never used D:\nRF5_SDK_15.2.0_9412b96\examples\ble_peripheral\ble_app_template\main.c 632
我明明已经use了,怎么还有错误??
条件编译我也有的
|
兄弟,你用正版了么,没用正版大家就凑合的用用,不能跳转是很正常,重启和重新设置一下,高亮是可以设置的,百度一下。要求不要死高死高的。