BLE5.2 1.0
开发文档说明
xc_gatt_client_api.h
浏览该文件的文档.
1
10#ifndef __XC_GATT_CLIENT_API_H__
11#define __XC_GATT_CLIENT_API_H__
12
13#include "gatt_db.h" // GATT Database access
14#include "gatt.h"
15#include "co_buf.h"
16#include "rwble_hl_error.h"
36uint16_t xc_ble_gatt_user_cli_register(uint16_t pref_mtu, uint8_t prio_level, const gatt_cli_cb_t* p_cb, uint8_t* p_user_lid);
37
47uint16_t xc_ble_gatt_user_unregister(uint8_t user_lid);
48
78uint16_t xc_ble_gatt_cli_discover_svc(uint8_t conidx, uint8_t user_lid, uint16_t dummy, uint8_t disc_type, bool full,
79 uint16_t start_hdl, uint16_t end_hdl, uint8_t uuid_type, const uint8_t* p_uuid);
80
103uint16_t xc_ble_gatt_cli_discover_inc_svc(uint8_t conidx, uint8_t user_lid, uint16_t dummy,
104 uint16_t start_hdl, uint16_t end_hdl);
105
132uint16_t xc_ble_gatt_cli_discover_char(uint8_t conidx, uint8_t user_lid, uint16_t dummy, uint8_t disc_type,
133 uint16_t start_hdl, uint16_t end_hdl, uint8_t uuid_type, const uint8_t* p_uuid);
134
157uint16_t xc_ble_gatt_cli_discover_desc(uint8_t conidx, uint8_t user_lid, uint16_t dummy, uint16_t start_hdl, uint16_t end_hdl);
158
179uint16_t xc_ble_gatt_cli_discover_cancel(uint8_t conidx, uint8_t user_lid, uint16_t dummy);
180
200uint16_t xc_ble_gatt_cli_read(uint8_t conidx, uint8_t user_lid, uint16_t dummy,
201 uint16_t hdl, uint16_t offset, uint16_t length);
202
223uint16_t xc_ble_gatt_cli_read_by_uuid(uint8_t conidx, uint8_t user_lid, uint16_t dummy,
224 uint16_t start_hdl, uint16_t end_hdl, uint8_t uuid_type, const uint8_t* p_uuid);
225
255uint16_t xc_ble_gatt_cli_write(uint8_t conidx, uint8_t user_lid, uint16_t dummy, uint8_t write_type,
256 uint16_t hdl, uint16_t length, const uint8_t* p_data);
257
271uint16_t xc_ble_gatt_cli_event_register(uint8_t conidx, uint8_t user_lid, uint16_t start_hdl, uint16_t end_hdl);
272
286uint16_t xc_ble_gatt_cli_event_unregister(uint8_t conidx, uint8_t user_lid, uint16_t start_hdl, uint16_t end_hdl);
287
299uint16_t xc_ble_gatt_cli_mtu_exch(uint8_t conidx, uint8_t user_lid);
300
313uint16_t xc_ble_gatt_cli_indicate_cfm(uint8_t conidx, uint8_t user_lid, uint16_t token);
314
315
316
317#endif // __XC_GATT_CLIENT_API_H__
318
319
320
uint16_t xc_ble_gatt_cli_discover_desc(uint8_t conidx, uint8_t user_lid, uint16_t dummy, uint16_t start_hdl, uint16_t end_hdl)
Command used by a GATT client user to discover characteristic descriptor exposed by peer device in it...
uint16_t xc_ble_gatt_cli_discover_inc_svc(uint8_t conidx, uint8_t user_lid, uint16_t dummy, uint16_t start_hdl, uint16_t end_hdl)
Command used by a GATT client user to discover included services, exposed by peer device in its attri...
uint16_t xc_ble_gatt_cli_event_register(uint8_t conidx, uint8_t user_lid, uint16_t start_hdl, uint16_t end_hdl)
Command used by a GATT client user to register for reception of events (notification / indication) fo...
uint16_t xc_ble_gatt_cli_discover_cancel(uint8_t conidx, uint8_t user_lid, uint16_t dummy)
Command used by a GATT client user to cancel an on-going discovery procedure. The dummy parameter in ...
uint16_t xc_ble_gatt_cli_event_unregister(uint8_t conidx, uint8_t user_lid, uint16_t start_hdl, uint16_t end_hdl)
Command used by a GATT client user to stop reception of events (notification / indication) onto a spe...
uint16_t xc_ble_gatt_cli_discover_svc(uint8_t conidx, uint8_t user_lid, uint16_t dummy, uint8_t disc_type, bool full, uint16_t start_hdl, uint16_t end_hdl, uint8_t uuid_type, const uint8_t *p_uuid)
Command used by a GATT client user to discover primary or secondary services, exposed by peer device ...
uint16_t xc_ble_gatt_cli_mtu_exch(uint8_t conidx, uint8_t user_lid)
Request a MTU exchange on legacy attribute bearer. There is no callback executed when the procedure i...
uint16_t xc_ble_gatt_cli_discover_char(uint8_t conidx, uint8_t user_lid, uint16_t dummy, uint8_t disc_type, uint16_t start_hdl, uint16_t end_hdl, uint8_t uuid_type, const uint8_t *p_uuid)
Command used by a GATT client user to discover all or according to a specific UUID characteristics ex...
uint16_t xc_ble_gatt_user_cli_register(uint16_t pref_mtu, uint8_t prio_level, const gatt_cli_cb_t *p_cb, uint8_t *p_user_lid)
Command used to register a GATT user. This must be done prior to any GATT procedure execution.
uint16_t xc_ble_gatt_cli_write(uint8_t conidx, uint8_t user_lid, uint16_t dummy, uint8_t write_type, uint16_t hdl, uint16_t length, const uint8_t *p_data)
Command used by a GATT client user to request to write value of an attribute in peer database.
uint16_t xc_ble_gatt_cli_read(uint8_t conidx, uint8_t user_lid, uint16_t dummy, uint16_t hdl, uint16_t offset, uint16_t length)
Command used by a GATT client user to read value of an attribute (identified by its handle) present i...
uint16_t xc_ble_gatt_user_unregister(uint8_t user_lid)
Command used to unregister a GATT user (client or server).
uint16_t xc_ble_gatt_cli_indicate_cfm(uint8_t conidx, uint8_t user_lid, uint16_t token)
Upper layer provide status of attribute event handled by GATT client user. confirmation of indicate b...
uint16_t xc_ble_gatt_cli_read_by_uuid(uint8_t conidx, uint8_t user_lid, uint16_t dummy, uint16_t start_hdl, uint16_t end_hdl, uint8_t uuid_type, const uint8_t *p_uuid)
Command used by a GATT client user to read value of an attribute with a given UUID in peer database.