1
0
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:
Francisco 2021-11-10 16:35:17 +01:00 committed by GitHub
commit 05593911bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 10 deletions

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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]");

View File

@ -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