nRF Connect SDK API 0.1.0
Loading...
Searching...
No Matches

◆ BT_SCAN_CB_INIT

#define BT_SCAN_CB_INIT (   _name,
  match_fun,
  no_match_fun,
  error_fun,
  connecting_fun 
)

#include <include/bluetooth/scan.h>

Value:
static const struct cb_data _name ## _data = { \
.filter_match = match_fun, \
.filter_no_match = no_match_fun, \
.connecting_error = error_fun, \
.connecting = connecting_fun, \
}; \
static struct bt_scan_cb _name = { \
.cb_addr = &_name ## _data, \
}
const struct cb_data * cb_addr
Definition: scan.h:405
Scanning callback structure.
Definition: scan.h:404
void(* filter_match)(struct bt_scan_device_info *device_info, struct bt_scan_filter_match *filter_match, bool connectable)
Scan filter matched.
Definition: scan.h:357
Data for scanning callback structure.
Definition: scan.h:349

Initializing macro for scanning module.

This is macro initializing necessary structures for bt_scan_cb type.

Parameters
[in]_nameUnique name for bt_scan_cb structure.
[in]match_funScan filter matched function pointer.
[in]no_match_funScan filter unmatched (the device was not found) function pointer.
[in]error_funError when connecting function pointer.
[in]connecting_funConnecting data function pointer.