pkb/nimble/scanner: pass adv pkt type to callback
This commit is contained in:
parent
999fffdc59
commit
825710e489
@ -42,8 +42,15 @@ enum {
|
|||||||
/**
|
/**
|
||||||
* @brief Callback signature triggered by this module for each discovered
|
* @brief Callback signature triggered by this module for each discovered
|
||||||
* advertising packet
|
* advertising packet
|
||||||
|
*
|
||||||
|
* @param[in] type type of advertising packet, e.g BLE_HCI_ADV_TYPE_ADV_IND
|
||||||
|
* @param[in] addr advertising address of the source node
|
||||||
|
* @param[in] rssi RSSI value for the received packet
|
||||||
|
* @param[in] ad advertising data
|
||||||
|
* @param[in] ad_len length of @p ad in bytes
|
||||||
*/
|
*/
|
||||||
typedef void(*nimble_scanner_cb)(const ble_addr_t *addr, int8_t rssi,
|
typedef void(*nimble_scanner_cb)(uint8_t type,
|
||||||
|
const ble_addr_t *addr, int8_t rssi,
|
||||||
const uint8_t *ad, size_t ad_len);
|
const uint8_t *ad, size_t ad_len);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -35,7 +35,7 @@ static int _on_scan_evt(struct ble_gap_event *event, void *arg)
|
|||||||
{
|
{
|
||||||
/* only interested in the DISC event */
|
/* only interested in the DISC event */
|
||||||
if (event->type == BLE_GAP_EVENT_DISC) {
|
if (event->type == BLE_GAP_EVENT_DISC) {
|
||||||
_disc_cb(&event->disc.addr, event->disc.rssi,
|
_disc_cb(event->disc.event_type, &event->disc.addr, event->disc.rssi,
|
||||||
event->disc.data, (size_t)event->disc.length_data);
|
event->disc.data, (size_t)event->disc.length_data);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user