28 uint8_t
mac[MAC_ADDRESS_SIZE];
60static constexpr uint8_t MAX_SCAN_REPORT_QUEUE_SIZE = 32;
64 void setup()
override;
82#ifdef RP2040_BLE_SCAN_LISTENER_COUNT
99 bool scan_start(uint16_t interval, uint16_t window,
bool active);
103#ifdef USE_BLE_GATT_CLIENT
118 void enqueue_scan_report_(
const uint8_t *mac_lsb_first, int8_t rssi, uint8_t addr_type, uint8_t adv_event_type,
119 const uint8_t *data, uint16_t data_len);
121#ifdef RP2040_BLE_SCAN_LISTENER_COUNT
143#ifdef USE_BLE_GATT_CLIENT
Minimal static vector - saves memory by avoiding std::vector overhead.
Consumer interface for controller scan reports.
virtual void on_scan_report(const BLEScanReport &report)=0
~BLEScanListener()=default
bool btstack_initialized_
static void packet_handler(uint8_t type, uint16_t channel, uint8_t *packet, uint16_t size)
void scan_stop()
Stop the controller scan (no-op when not scanning).
uint8_t ble_mac_[MAC_ADDRESS_SIZE]
uint8_t scan_inhibit_count_
float get_setup_priority() const override
StaticVector< BLEScanListener *, RP2040_BLE_SCAN_LISTENER_COUNT > scan_listeners_
esphome::EventPool< BLEScanReport, MAX_SCAN_REPORT_QUEUE_SIZE - 1 > report_pool_
void inhibit_scan()
Pause the physical scan for the duration of a GATT connect attempt (initiating and scanning contend f...
void register_scan_listener(BLEScanListener *listener)
Register a consumer for scan reports (delivered on the main loop via loop()).
void get_mac_msb_first(uint8_t out[MAC_ADDRESS_SIZE]) const
Controller BLE address in printable (MSB-first) order, as gap_local_bd_addr() delivers it — note BLES...
esphome::LockFreeQueue< BLEScanReport, MAX_SCAN_REPORT_QUEUE_SIZE > report_queue_
void dump_config() override
void set_enable_on_boot(bool enable_on_boot)
void release_scan_inhibit()
btstack_packet_callback_registration_t hci_event_callback_registration_
void enqueue_scan_report_(const uint8_t *mac_lsb_first, int8_t rssi, uint8_t addr_type, uint8_t adv_event_type, const uint8_t *data, uint16_t data_len)
Buffer one controller report (BTstack packet handler, CYW43 async-context IRQ — bounded copy into the...
btstack_packet_callback_registration_t sm_event_callback_registration_
One advertisement report from the controller.
uint8_t mac[MAC_ADDRESS_SIZE]