From 4fb3a3f7767bb2a53103de2195dfa4141c11dbd4 Mon Sep 17 00:00:00 2001 From: Chris Manton Date: Sat, 19 Sep 2020 23:29:24 -0700 Subject: [PATCH] enum-ify _SCAN both classic and ble Towards readable code Bug: 163134718 Tag: #refactor Test: act.py -tc BleCocTest Change-Id: I917ba2204a79af800afefe1b7e046a9510316030 --- stack/btm/neighbor_inquiry.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/stack/btm/neighbor_inquiry.h b/stack/btm/neighbor_inquiry.h index f943eaa96..495483864 100644 --- a/stack/btm/neighbor_inquiry.h +++ b/stack/btm/neighbor_inquiry.h @@ -78,19 +78,19 @@ enum : uint8_t { }; /* Define scan types */ -#define BTM_SCAN_TYPE_STANDARD 0 -#define BTM_SCAN_TYPE_INTERLACED 1 /* 1.2 devices only */ +enum : uint16_t { + BTM_SCAN_TYPE_STANDARD = 0, + BTM_SCAN_TYPE_INTERLACED = 1, /* 1.2 devices only */ +}; /* Define inquiry results mode */ -#define BTM_INQ_RESULT_STANDARD 0 -#define BTM_INQ_RESULT_WITH_RSSI 1 -#define BTM_INQ_RESULT_EXTENDED 2 -/* RSSI value not supplied (ignore it) */ -#define BTM_INQ_RES_IGNORE_RSSI 0x7f - -/* Inquiry Filter Condition types (see tBTM_INQ_PARMS) */ -/* Inquiry Filtering is turned off */ -#define BTM_CLR_INQUIRY_FILTER 0 +enum : uint8_t { + BTM_INQ_RESULT_STANDARD = 0, + BTM_INQ_RESULT_WITH_RSSI = 1, + BTM_INQ_RESULT_EXTENDED = 2, + /* RSSI value not supplied (ignore it) */ + BTM_INQ_RES_IGNORE_RSSI = 0x7f, +}; /* These are the fields returned in each device's response to the inquiry. It * is returned in the results callback if registered. -- 2.11.0