mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-18 12:52:44 +01:00
Merge pull request #16955 from haukepetersen/fix_nimble_scannereventtypes
pkg/nimble: fix scan event type define usage
This commit is contained in:
commit
05593911bf
@ -138,7 +138,7 @@ static void _on_scan_evt(uint8_t type, const ble_addr_t *addr, int8_t rssi,
|
||||
|
||||
/* we are only interested in ADV_IND packets, the rest can be dropped right
|
||||
* away */
|
||||
if (type != BLE_HCI_ADV_TYPE_ADV_IND) {
|
||||
if (type != BLE_HCI_ADV_RPT_EVTYPE_ADV_IND) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -118,7 +118,7 @@ static void _on_scan_evt(uint8_t type,
|
||||
int res;
|
||||
|
||||
/* filter out all non-connectible advertisements */
|
||||
if (type != BLE_HCI_ADV_TYPE_ADV_IND) {
|
||||
if (type != BLE_HCI_ADV_RPT_EVTYPE_ADV_IND) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -30,20 +30,20 @@
|
||||
static void _print_type(uint8_t type)
|
||||
{
|
||||
switch (type) {
|
||||
case BLE_HCI_ADV_TYPE_ADV_IND:
|
||||
case BLE_HCI_ADV_RPT_EVTYPE_ADV_IND:
|
||||
printf(" [IND]");
|
||||
break;
|
||||
case BLE_HCI_ADV_TYPE_ADV_DIRECT_IND_HD:
|
||||
printf(" [DIRECT_IND_HD]");
|
||||
case BLE_HCI_ADV_RPT_EVTYPE_DIR_IND:
|
||||
printf(" [DIRECT_IND]");
|
||||
break;
|
||||
case BLE_HCI_ADV_TYPE_ADV_SCAN_IND:
|
||||
case BLE_HCI_ADV_RPT_EVTYPE_SCAN_IND:
|
||||
printf(" [SCAN_IND]");
|
||||
break;
|
||||
case BLE_HCI_ADV_TYPE_ADV_NONCONN_IND:
|
||||
case BLE_HCI_ADV_RPT_EVTYPE_NONCONN_IND:
|
||||
printf(" [NONCONN_IND]");
|
||||
break;
|
||||
case BLE_HCI_ADV_TYPE_ADV_DIRECT_IND_LD:
|
||||
printf(" [DIRECT_IND_LD]");
|
||||
case BLE_HCI_ADV_RPT_EVTYPE_SCAN_RSP:
|
||||
printf(" [SCAN_RSP]");
|
||||
break;
|
||||
default:
|
||||
printf(" [INVALID]");
|
||||
|
@ -35,7 +35,8 @@ extern "C" {
|
||||
* @brief Callback signature triggered by this module for each discovered
|
||||
* advertising packet
|
||||
*
|
||||
* @param[in] type type of advertising packet, e.g BLE_HCI_ADV_TYPE_ADV_IND
|
||||
* @param[in] type type of advertising packet, e.g
|
||||
* BLE_HCI_ADV_RPT_EVTYPE_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
|
||||
|
Loading…
Reference in New Issue
Block a user