mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-26 12:35:25 +00:00
hci: move le_central_ + gap_le_ to gap.h
This commit is contained in:
parent
073bd0fad0
commit
6e364dea25
33
src/gap.h
33
src/gap.h
@ -87,6 +87,21 @@ typedef enum {
|
||||
GAP_CONNECTION_LE
|
||||
} gap_connection_type_t;
|
||||
|
||||
typedef struct le_connection_parameter_range{
|
||||
uint16_t le_conn_interval_min;
|
||||
uint16_t le_conn_interval_max;
|
||||
uint16_t le_conn_latency_min;
|
||||
uint16_t le_conn_latency_max;
|
||||
uint16_t le_supervision_timeout_min;
|
||||
uint16_t le_supervision_timeout_max;
|
||||
} le_connection_parameter_range_t;
|
||||
|
||||
typedef enum {
|
||||
GAP_RANDOM_ADDRESS_TYPE_OFF = 0,
|
||||
GAP_RANDOM_ADDRESS_NON_RESOLVABLE,
|
||||
GAP_RANDOM_ADDRESS_RESOLVABLE,
|
||||
} gap_random_address_type_t;
|
||||
|
||||
/* API_START */
|
||||
|
||||
/**
|
||||
@ -131,12 +146,6 @@ void gap_set_local_name(const char * local_name);
|
||||
*/
|
||||
gap_connection_type_t gap_get_connection_type(hci_con_handle_t connection_handle);
|
||||
|
||||
typedef enum {
|
||||
GAP_RANDOM_ADDRESS_TYPE_OFF = 0,
|
||||
GAP_RANDOM_ADDRESS_NON_RESOLVABLE,
|
||||
GAP_RANDOM_ADDRESS_RESOLVABLE,
|
||||
} gap_random_address_type_t;
|
||||
|
||||
/**
|
||||
* @brief Enable privacy by using random addresses
|
||||
* @param random_address_type to use (incl. OFF)
|
||||
@ -235,6 +244,18 @@ int gap_auto_connection_stop(bd_addr_type_t address_typ, bd_addr_t address);
|
||||
*/
|
||||
void gap_auto_connection_stop_all(void);
|
||||
|
||||
void gap_le_get_connection_parameter_range(le_connection_parameter_range_t range);
|
||||
void gap_le_set_connection_parameter_range(le_connection_parameter_range_t range);
|
||||
|
||||
/* LE Client Start */
|
||||
|
||||
uint8_t le_central_start_scan(void);
|
||||
uint8_t le_central_stop_scan(void);
|
||||
uint8_t le_central_connect(bd_addr_t addr, bd_addr_type_t addr_type);
|
||||
uint8_t le_central_connect_cancel(void);
|
||||
uint8_t gap_disconnect(hci_con_handle_t handle);
|
||||
void le_central_set_scan_parameters(uint8_t scan_type, uint16_t scan_interval, uint16_t scan_window);
|
||||
|
||||
#if defined __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
23
src/hci.h
23
src/hci.h
@ -130,15 +130,6 @@ typedef enum {
|
||||
CON_PARAMETER_UPDATE_DENY
|
||||
} le_con_parameter_update_state_t;
|
||||
|
||||
typedef struct le_connection_parameter_range{
|
||||
uint16_t le_conn_interval_min;
|
||||
uint16_t le_conn_interval_max;
|
||||
uint16_t le_conn_latency_min;
|
||||
uint16_t le_conn_latency_max;
|
||||
uint16_t le_supervision_timeout_min;
|
||||
uint16_t le_supervision_timeout_max;
|
||||
} le_connection_parameter_range_t;
|
||||
|
||||
// Authentication flags
|
||||
typedef enum {
|
||||
AUTH_FLAGS_NONE = 0x0000,
|
||||
@ -742,20 +733,6 @@ int hci_send_cmd_packet(uint8_t *packet, int size);
|
||||
int hci_remote_esco_supported(hci_con_handle_t con_handle);
|
||||
|
||||
/* API_START */
|
||||
|
||||
void gap_le_get_connection_parameter_range(le_connection_parameter_range_t range);
|
||||
void gap_le_set_connection_parameter_range(le_connection_parameter_range_t range);
|
||||
|
||||
/* LE Client Start */
|
||||
|
||||
uint8_t le_central_start_scan(void);
|
||||
uint8_t le_central_stop_scan(void);
|
||||
uint8_t le_central_connect(bd_addr_t addr, bd_addr_type_t addr_type);
|
||||
uint8_t le_central_connect_cancel(void);
|
||||
uint8_t gap_disconnect(hci_con_handle_t handle);
|
||||
void le_central_set_scan_parameters(uint8_t scan_type, uint16_t scan_interval, uint16_t scan_window);
|
||||
|
||||
/* LE Client End */
|
||||
|
||||
void hci_connectable_control(uint8_t enable);
|
||||
void hci_close(void);
|
||||
|
Loading…
x
Reference in New Issue
Block a user