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

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

Internally link stack/btm::ble_evt_type_is_

Towards readable code

Bug: 163134718
Tag: #refactor
Test: compile & verify basic functions working
Test: act.py -tc BleCocTest

Change-Id: Ie6337dbe4aa9099bb4f41092672643d23619183d
parent 1e88d762
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -178,27 +178,27 @@ static void btm_ble_observer_timer_timeout(void* data);
#define BTM_BLE_INQ_RESULT 0x01
#define BTM_BLE_OBS_RESULT 0x02

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

bool ble_evt_type_is_scannable(uint16_t evt_type) {
static bool ble_evt_type_is_scannable(uint16_t evt_type) {
  return evt_type & (1 << BLE_EVT_SCANNABLE_BIT);
}

bool ble_evt_type_is_directed(uint16_t evt_type) {
static bool ble_evt_type_is_directed(uint16_t evt_type) {
  return evt_type & (1 << BLE_EVT_DIRECTED_BIT);
}

bool ble_evt_type_is_scan_resp(uint16_t evt_type) {
static bool ble_evt_type_is_scan_resp(uint16_t evt_type) {
  return evt_type & (1 << BLE_EVT_SCAN_RESPONSE_BIT);
}

bool ble_evt_type_is_legacy(uint16_t evt_type) {
static bool ble_evt_type_is_legacy(uint16_t evt_type) {
  return evt_type & (1 << BLE_EVT_LEGACY_BIT);
}

uint8_t ble_evt_type_data_status(uint16_t evt_type) {
static uint8_t ble_evt_type_data_status(uint16_t evt_type) {
  return (evt_type >> 5) & 3;
}

+0 −1
Original line number Diff line number Diff line
@@ -35,7 +35,6 @@
#include "hcidefs.h"
#include "smp_api.h"

extern bool ble_evt_type_is_connectable(uint16_t evt_type);
extern void btm_ble_refresh_raddr_timer_timeout(void* data);
extern tBTM_STATUS btm_ble_read_remote_name(const RawAddress& remote_bda,
                                            tBTM_CMPL_CB* p_cb);