#include "btm_int.h"
#include "btu.h"
#include "hcidefs.h"
-#include "hcimsgs.h"
#include "main/shim/btm_api.h"
#include "main/shim/shim.h"
#include "stack/include/acl_api.h"
+#include "stack/include/hcimsgs.h"
#include "stack/include/inq_hci_link_interface.h"
extern void btm_inq_remote_name_timer_timeout(void* data);
p_inq->p_inq_cmpl_cb = NULL; /* Do not notify caller anymore */
if ((p_inq->inqparms.mode & BTM_BR_INQUIRY_MASK) != 0) {
- btsnd_hcic_inq_cancel();
+ bluetooth::legacy::hci::GetInterface().InquiryCancel();
}
if ((p_inq->inqparms.mode & BTM_BLE_INQUIRY_MASK) != 0)
btm_ble_stop_inquiry();
p_inq->max_bd_entries =
(uint16_t)(BT_DEFAULT_BUFFER_SIZE / sizeof(tINQ_BDADDR));
- btsnd_hcic_inquiry(general_inq_lap, p_inq->inqparms.duration, 0);
+ bluetooth::legacy::hci::GetInterface().StartInquiry(
+ general_inq_lap, p_inq->inqparms.duration, 0);
return BTM_CMD_STARTED;
}
if (btm_cb.btm_inq_vars.inq_active & normal_active) {
/* can not call BTM_CancelInquiry() here. We need to report inquiry
* complete evt */
- btsnd_hcic_inq_cancel();
+ bluetooth::legacy::hci::GetInterface().InquiryCancel();
}
}
/* do not allow inquiry to start */
#include "btm_int.h" /* Included for UIPC_* macro definitions */
#include "stack/include/acl_hci_link_interface.h"
-void btsnd_hcic_inquiry(const LAP inq_lap, uint8_t duration,
- uint8_t response_cnt) {
+static void btsnd_hcic_inquiry(const LAP inq_lap, uint8_t duration,
+ uint8_t response_cnt) {
BT_HDR* p = (BT_HDR*)osi_malloc(HCI_CMD_BUF_SIZE);
uint8_t* pp = (uint8_t*)(p + 1);
btu_hcif_send_cmd(LOCAL_BR_EDR_CONTROLLER_ID, p);
}
-void btsnd_hcic_inq_cancel(void) {
+static void btsnd_hcic_inq_cancel(void) {
BT_HDR* p = (BT_HDR*)osi_malloc(HCI_CMD_BUF_SIZE);
uint8_t* pp = (uint8_t*)(p + 1);
}
bluetooth::legacy::hci::Interface interface_ = {
+ .StartInquiry = btsnd_hcic_inquiry, // OCF 0x0001
+ .InquiryCancel = btsnd_hcic_inq_cancel, // OCF 0x0002
.Disconnect = btsnd_hcic_disconnect,
.StartRoleSwitch = btsnd_hcic_switch_role,
};
/* Message by message.... */
-extern void btsnd_hcic_inquiry(const LAP inq_lap, uint8_t duration,
- uint8_t response_cnt);
-
#define HCIC_PARAM_SIZE_INQUIRY 5
#define HCIC_INQ_INQ_LAP_OFF 0
/* Inquiry */
/* Inquiry Cancel */
-extern void btsnd_hcic_inq_cancel(void);
#define HCIC_PARAM_SIZE_INQ_CANCEL 0
namespace legacy {
namespace hci {
struct Interface {
+ void (*StartInquiry)(const LAP inq_lap, uint8_t duration,
+ uint8_t response_cnt);
+ void (*InquiryCancel)();
void (*Disconnect)(uint16_t handle, uint8_t reason);
void (*StartRoleSwitch)(const RawAddress& bd_addr, uint8_t role);
};