LE: Add peripheral role support (3/4)

Initial stack support for the LE peripheral role.

Change-Id: Ie036432c90c405a331e2fceaf88bf97a46182176
This commit is contained in:
Andre Eisenbach 2013-08-06 19:54:25 -07:00 committed by Matthew Xie
parent 02223d1602
commit 299e43c186

View file

@ -151,6 +151,11 @@ typedef void (*write_descriptor_callback)(int conn_id, int status,
typedef void (*read_remote_rssi_callback)(int client_if, bt_bdaddr_t* bda,
int rssi, int status);
/**
* Callback indicationg the status of a listen() operation
*/
typedef void (*listen_callback)(int status, int server_if);
typedef struct {
register_client_callback register_client_cb;
scan_result_callback scan_result_cb;
@ -169,6 +174,7 @@ typedef struct {
write_descriptor_callback write_descriptor_cb;
execute_write_callback execute_write_cb;
read_remote_rssi_callback read_remote_rssi_cb;
listen_callback listen_cb;
} btgatt_client_callbacks_t;
/** Represents the standard BT-GATT client interface. */
@ -191,6 +197,9 @@ typedef struct {
bt_status_t (*disconnect)( int client_if, const bt_bdaddr_t *bd_addr,
int conn_id);
/** Start or stop advertisements to listen for incoming connections */
bt_status_t (*listen)(int client_if, bool start);
/** Clear the attribute cache for a given device */
bt_status_t (*refresh)( int client_if, const bt_bdaddr_t *bd_addr );
@ -266,6 +275,11 @@ typedef struct {
/** Determine the type of the remote device (LE, BR/EDR, Dual-mode) */
int (*get_device_type)( const bt_bdaddr_t *bd_addr );
/** Set the advertising data or scan response data */
bt_status_t (*set_adv_data)(int server_if, bool set_scan_rsp, bool include_name,
bool include_txpower, int min_interval, int max_interval, int appearance,
uint16_t manufacturer_len, char* manufacturer_data);
/** Test mode interface */
bt_status_t (*test_command)( int command, btgatt_test_params_t* params);
} btgatt_client_interface_t;