mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-28 08:37:22 +00:00
hci: fix build without ENABLE_CLASSIC
This commit is contained in:
parent
8221aa8868
commit
e6d6524d17
31
src/gap.h
31
src/gap.h
@ -44,7 +44,10 @@ extern "C" {
|
|||||||
|
|
||||||
#include "btstack_defines.h"
|
#include "btstack_defines.h"
|
||||||
#include "btstack_util.h"
|
#include "btstack_util.h"
|
||||||
|
|
||||||
|
#ifdef ENABLE_CLASSIC
|
||||||
#include "classic/btstack_link_key_db.h"
|
#include "classic/btstack_link_key_db.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
|
||||||
@ -117,6 +120,19 @@ typedef enum {
|
|||||||
|
|
||||||
// Classic + LE
|
// Classic + LE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Read RSSI
|
||||||
|
* @param con_handle
|
||||||
|
* @events: GAP_EVENT_RSSI_MEASUREMENT
|
||||||
|
*/
|
||||||
|
int gap_read_rssi(hci_con_handle_t con_handle);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Gets local address.
|
||||||
|
*/
|
||||||
|
void gap_local_bd_addr(bd_addr_t address_buffer);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Disconnect connection with handle
|
* @brief Disconnect connection with handle
|
||||||
* @param handle
|
* @param handle
|
||||||
@ -574,6 +590,7 @@ authorization_state_t gap_authorization_state(hci_con_handle_t con_handle);
|
|||||||
bool gap_bonded(hci_con_handle_t con_handle);
|
bool gap_bonded(hci_con_handle_t con_handle);
|
||||||
|
|
||||||
// Classic
|
// Classic
|
||||||
|
#ifdef ENABLE_CLASSIC
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Override page scan mode. Page scan mode enabled by l2cap when services are registered
|
* @brief Override page scan mode. Page scan mode enabled by l2cap when services are registered
|
||||||
@ -587,11 +604,6 @@ void gap_connectable_control(uint8_t enable);
|
|||||||
*/
|
*/
|
||||||
void gap_discoverable_control(uint8_t enable);
|
void gap_discoverable_control(uint8_t enable);
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Gets local address.
|
|
||||||
*/
|
|
||||||
void gap_local_bd_addr(bd_addr_t address_buffer);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Deletes link key for remote device with baseband address.
|
* @brief Deletes link key for remote device with baseband address.
|
||||||
* @param addr
|
* @param addr
|
||||||
@ -685,13 +697,6 @@ int gap_inquiry_stop(void);
|
|||||||
*/
|
*/
|
||||||
int gap_remote_name_request(const bd_addr_t addr, uint8_t page_scan_repetition_mode, uint16_t clock_offset);
|
int gap_remote_name_request(const bd_addr_t addr, uint8_t page_scan_repetition_mode, uint16_t clock_offset);
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Read RSSI
|
|
||||||
* @param con_handle
|
|
||||||
* @events: GAP_EVENT_RSSI_MEASUREMENT
|
|
||||||
*/
|
|
||||||
int gap_read_rssi(hci_con_handle_t con_handle);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Legacy Pairing Pin Code Response
|
* @brief Legacy Pairing Pin Code Response
|
||||||
* @note data is not copied, pointer has to stay valid
|
* @note data is not copied, pointer has to stay valid
|
||||||
@ -823,6 +828,8 @@ uint8_t gap_sniff_subrating_configure(hci_con_handle_t con_handle, uint16_t max_
|
|||||||
*/
|
*/
|
||||||
uint8_t gap_qos_set(hci_con_handle_t con_handle, hci_service_type_t service_type, uint32_t token_rate, uint32_t peak_bandwidth, uint32_t latency, uint32_t delay_variation);
|
uint8_t gap_qos_set(hci_con_handle_t con_handle, hci_service_type_t service_type, uint32_t token_rate, uint32_t peak_bandwidth, uint32_t latency, uint32_t delay_variation);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
// LE
|
// LE
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -3302,10 +3302,13 @@ void hci_set_control(const btstack_control_t *hardware_control){
|
|||||||
}
|
}
|
||||||
|
|
||||||
void hci_close(void){
|
void hci_close(void){
|
||||||
|
|
||||||
|
#ifdef ENABLE_CLASSIC
|
||||||
// close remote device db
|
// close remote device db
|
||||||
if (hci_stack->link_key_db) {
|
if (hci_stack->link_key_db) {
|
||||||
hci_stack->link_key_db->close();
|
hci_stack->link_key_db->close();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
btstack_linked_list_iterator_t lit;
|
btstack_linked_list_iterator_t lit;
|
||||||
btstack_linked_list_iterator_init(&lit, &hci_stack->connections);
|
btstack_linked_list_iterator_init(&lit, &hci_stack->connections);
|
||||||
|
@ -801,8 +801,10 @@ typedef struct {
|
|||||||
// hardware power controller
|
// hardware power controller
|
||||||
const btstack_control_t * control;
|
const btstack_control_t * control;
|
||||||
|
|
||||||
|
#ifdef ENABLE_CLASSIC
|
||||||
/* link key db */
|
/* link key db */
|
||||||
const btstack_link_key_db_t * link_key_db;
|
const btstack_link_key_db_t * link_key_db;
|
||||||
|
#endif
|
||||||
|
|
||||||
// list of existing baseband connections
|
// list of existing baseband connections
|
||||||
btstack_linked_list_t connections;
|
btstack_linked_list_t connections;
|
||||||
@ -1073,10 +1075,12 @@ void hci_set_control(const btstack_control_t *hardware_control);
|
|||||||
void hci_set_sco_transport(const btstack_sco_transport_t *sco_transport);
|
void hci_set_sco_transport(const btstack_sco_transport_t *sco_transport);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef ENABLE_CLASSIC
|
||||||
/**
|
/**
|
||||||
* @brief Configure Bluetooth hardware control. Has to be called before power on.
|
* @brief Configure Bluetooth hardware control. Has to be called before power on.
|
||||||
*/
|
*/
|
||||||
void hci_set_link_key_db(btstack_link_key_db_t const * link_key_db);
|
void hci_set_link_key_db(btstack_link_key_db_t const * link_key_db);
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Set callback for Bluetooth Hardware Error
|
* @brief Set callback for Bluetooth Hardware Error
|
||||||
|
Loading…
x
Reference in New Issue
Block a user