Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of nRF51822 by
ble_advdata_parser.c
00001 #include "ble_advdata_parser.h" 00002 00003 uint32_t ble_advdata_parser_field_find(uint8_t type, 00004 uint8_t * p_advdata, 00005 uint8_t * len, 00006 uint8_t ** pp_field_data) 00007 { 00008 uint32_t index = 0; 00009 00010 while (index < *len) 00011 { 00012 uint8_t field_length = p_advdata[index]; 00013 uint8_t field_type = p_advdata[index + 1]; 00014 00015 if (field_type == type) 00016 { 00017 *pp_field_data = &p_advdata[index + 2]; 00018 *len = field_length - 1; 00019 return NRF_SUCCESS; 00020 } 00021 index += field_length + 1; 00022 } 00023 return NRF_ERROR_NOT_FOUND; 00024 }
Generated on Tue Jul 12 2022 16:21:02 by
