23 lines
573 B
C
23 lines
573 B
C
#pragma once
|
|
|
|
#include <stdint.h>
|
|
|
|
/**
|
|
* Called for every unique BLE advertisement received.
|
|
* tag_id is a null-terminated string: "aa:bb:cc:dd:ee:ff"
|
|
* rssi is in dBm (negative).
|
|
*/
|
|
typedef void (*ble_scanner_cb_t)(const char *tag_id, int8_t rssi);
|
|
|
|
/**
|
|
* Initialise the Bluedroid BLE stack and register the scan callback.
|
|
* Must be called once after esp_bt_controller_init / esp_bluedroid_init.
|
|
*/
|
|
void ble_scanner_init(ble_scanner_cb_t cb);
|
|
|
|
/** Start passive BLE scanning. */
|
|
void ble_scanner_start(void);
|
|
|
|
/** Stop BLE scanning. */
|
|
void ble_scanner_stop(void);
|