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.cpp
00001 #include "ble_advdata_parser.h" 00002 00003 uint32_t ble_advdata_parser_field_find(uint8_t type, uint8_t * p_advdata, uint8_t * len, uint8_t ** pp_field_data) 00004 { 00005 uint32_t index = 0; 00006 00007 while (index < *len) 00008 { 00009 uint8_t field_length = p_advdata[index]; 00010 uint8_t field_type = p_advdata[index+1]; 00011 00012 if (field_type == type) 00013 { 00014 *pp_field_data = &p_advdata[index+2]; 00015 *len = field_length-1; 00016 return NRF_SUCCESS; 00017 } 00018 index += field_length+1; 00019 } 00020 return NRF_ERROR_NOT_FOUND; 00021 }
Generated on Tue Jul 12 2022 19:00:51 by
