From 6fc806b313277f807f338a19077418bc918b4de2 Mon Sep 17 00:00:00 2001 From: Glenn Ruben Bakke Date: Tue, 14 Mar 2017 07:59:29 +0100 Subject: [PATCH] nrf5/bluetooth: adding adv report data structure to pass to ubluepy upon adv report event. Adding new api for setting callack where to handle advertisment events in ubluepy. --- nrf5/bluetooth/ble_drv.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/nrf5/bluetooth/ble_drv.h b/nrf5/bluetooth/ble_drv.h index 8e19293c72..c764b21a69 100644 --- a/nrf5/bluetooth/ble_drv.h +++ b/nrf5/bluetooth/ble_drv.h @@ -32,6 +32,14 @@ #include "modubluepy.h" +typedef struct { + uint8_t * p_peer_addr; + bool is_scan_resp; + int8_t rssi; + uint8_t data_len; + uint8_t * p_data; +} ble_drv_adv_data_t; + uint32_t ble_drv_stack_enable(void); void ble_drv_stack_disable(void); @@ -64,4 +72,6 @@ void ble_drv_scan_start(void); void ble_drv_scan_stop(void); +void ble_drv_adv_report_handler_set(mp_obj_t obj, ubluepy_adv_evt_callback_t evt_handler); + #endif // BLUETOOTH_LE_DRIVER_H__