pub unsafe extern "C" fn bt_data_parse(
ad: *mut net_buf_simple,
func: Option<unsafe extern "C" fn(_: *mut bt_data, _: *mut c_void) -> bool>,
user_data: *mut c_void,
)
Expand description
@brief Helper for parsing advertising (or EIR or OOB) data.
A helper for parsing the basic data types used for Extended Inquiry Response (EIR), Advertising Data (AD), and OOB data blocks. The most common scenario is to call this helper on the advertising data received in the callback that was given to bt_le_scan_start().
@warning This helper function will consume ad
when parsing. The user should
make a copy if the original data is to be used afterwards
@param ad Advertising data as given to the bt_le_scan_cb_t callback. @param func Callback function which will be called for each element that’s found in the data. The callback should return true to continue parsing, or false to stop parsing. @param user_data User data to be passed to the callback.