BLE5.2 1.0
开发文档说明
xc_gatt_server_api.h
浏览该文件的文档.
1
10#ifndef __XC_GATT_SERVER_API_H__
11#define __XC_GATT_SERVER_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"
17
18
19
21{
24};
25
27{
29 GATT_ENABLE = 1
30};
50uint16_t xc_ble_gatt_user_srv_register(uint16_t pref_mtu, uint8_t prio_level, const gatt_srv_cb_t* p_cb, uint8_t* p_user_lid);
51
83uint16_t xc_ble_gatt_service_add(uint8_t user_lid, uint8_t info, const uint8_t* p_uuid, uint8_t nb_att, const uint8_t* p_att_mask,
84 const gatt_att_desc_t* p_atts, uint8_t nb_att_rsvd, uint16_t* p_start_hdl);
85
119uint16_t xc_ble_gatt_service16_add(uint8_t user_lid, uint8_t info, uint16_t uuid16, uint8_t nb_att, const uint8_t* p_att_mask,
120 const gatt_att16_desc_t* p_atts, uint8_t nb_att_rsvd, uint16_t* p_start_hdl);
121
134uint16_t xc_ble_gatt_service_remove(uint8_t user_lid, uint16_t start_hdl);
135
158uint16_t xc_ble_gatt_srv_notify(uint8_t conidx, uint8_t user_lid, uint16_t dummy, uint16_t hdl,
159 uint16_t length, const uint8_t *p_value);
160
183uint16_t xc_ble_gatt_srv_indicate(uint8_t conidx, uint8_t user_lid, uint16_t dummy, uint16_t hdl,
184 uint16_t length, const uint8_t *p_value);
185
203uint16_t xc_ble_gatt_srv_read_cfm(uint8_t conidx, uint8_t user_lid, uint16_t token, uint16_t status,
204 uint16_t att_length, uint16_t length, const uint8_t *p_value);
205
220uint16_t xc_ble_gatt_srv_write_cfm(uint8_t conidx, uint8_t user_lid, uint16_t token, uint16_t status);
221
222#endif // __XC_GATT_SERVER_API_H__
223
224
225
uint16_t xc_ble_gatt_service_remove(uint8_t user_lid, uint16_t start_hdl)
Command used to remove a service from local attribute database.
uint16_t xc_ble_gatt_user_srv_register(uint16_t pref_mtu, uint8_t prio_level, const gatt_srv_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.
@ GATT_NO_ERROR
No error
uint16_t xc_ble_gatt_srv_read_cfm(uint8_t conidx, uint8_t user_lid, uint16_t token, uint16_t status, uint16_t att_length, uint16_t length, const uint8_t *p_value)
Upper layer provide attribute value requested by GATT Layer for a read procedure If rejected,...
uint16_t xc_ble_gatt_srv_write_cfm(uint8_t conidx, uint8_t user_lid, uint16_t token, uint16_t status)
Upper layer provide status of attribute value modification by GATT server user. Confirmation server u...
uint16_t xc_ble_gatt_service16_add(uint8_t user_lid, uint8_t info, uint16_t uuid16, uint8_t nb_att, const uint8_t *p_att_mask, const gatt_att16_desc_t *p_atts, uint8_t nb_att_rsvd, uint16_t *p_start_hdl)
Command used to add a service into local attribute database.
uint16_t xc_ble_gatt_srv_indicate(uint8_t conidx, uint8_t user_lid, uint16_t dummy, uint16_t hdl, uint16_t length, const uint8_t *p_value)
Command used by a GATT server user to send indication
uint16_t xc_ble_gatt_srv_notify(uint8_t conidx, uint8_t user_lid, uint16_t dummy, uint16_t hdl, uint16_t length, const uint8_t *p_value)
Command used by a GATT server user to send notifications
uint16_t xc_ble_gatt_service_add(uint8_t user_lid, uint8_t info, const uint8_t *p_uuid, uint8_t nb_att, const uint8_t *p_att_mask, const gatt_att_desc_t *p_atts, uint8_t nb_att_rsvd, uint16_t *p_start_hdl)
Command used to add a service into local attribute database.
@ GATT_ENABLE
@ GATT_DISABLE