Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a9662bac authored by Chris Manton's avatar Chris Manton
Browse files

enum-ify stack/btm/btm_ble_gap::BTM_BLE_

Toward readable code

Bug: 163134718
Tag: #refactor
Test: compile & verify basic functions working

Change-Id: Icb54b5f68c11bcb0a28b1cf25abcaf68c734d6ca
parent 1509b54c
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -181,8 +181,11 @@ static void btm_ble_inquiry_timer_gap_limited_discovery_timeout(void* data);
static void btm_ble_inquiry_timer_timeout(void* data);
static void btm_ble_observer_timer_timeout(void* data);

#define BTM_BLE_INQ_RESULT 0x01
#define BTM_BLE_OBS_RESULT 0x02
enum : uint8_t {
  BTM_BLE_NOT_SCANNING = 0x00,
  BTM_BLE_INQ_RESULT = 0x01,
  BTM_BLE_OBS_RESULT = 0x02,
};

static bool ble_evt_type_is_connectable(uint16_t evt_type) {
  return evt_type & (1 << BLE_EVT_CONNECTABLE_BIT);