Loading system/stack/include/gatt_api.h +23 −23 Original line number Original line Diff line number Diff line Loading @@ -488,7 +488,7 @@ typedef uint8_t tGATT_AUTH_REQ; typedef struct { typedef struct { uint16_t conn_id; uint16_t conn_id; uint16_t handle; /* attribute handle */ uint16_t handle; /* attribute handle */ uint16_t offset; /* attribute value offset, if no offfset is needed for the uint16_t offset; /* attribute value offset, if no offset is needed for the command, ignore it */ command, ignore it */ uint16_t len; /* length of attribute value */ uint16_t len; /* length of attribute value */ tGATT_AUTH_REQ auth_req; /* authentication request */ tGATT_AUTH_REQ auth_req; /* authentication request */ Loading Loading @@ -522,7 +522,7 @@ typedef struct { /* write request data */ /* write request data */ typedef struct { typedef struct { uint16_t handle; /* attribute handle */ uint16_t handle; /* attribute handle */ uint16_t offset; /* attribute value offset, if no offfset is needed for the uint16_t offset; /* attribute value offset, if no offset is needed for the command, ignore it */ command, ignore it */ uint16_t len; /* length of attribute value */ uint16_t len; /* length of attribute value */ uint8_t value[GATT_MAX_ATTR_LEN]; /* the actual attribute value */ uint8_t value[GATT_MAX_ATTR_LEN]; /* the actual attribute value */ Loading Loading @@ -567,7 +567,7 @@ typedef enum : uint8_t { GATT_DISC_CHAR, /* discover characteristics of a service with/without type GATT_DISC_CHAR, /* discover characteristics of a service with/without type requirement */ requirement */ GATT_DISC_CHAR_DSCPT, /* discover characteristic descriptors of a character */ GATT_DISC_CHAR_DSCPT, /* discover characteristic descriptors of a character */ GATT_DISC_MAX /* maximnun discover type */ GATT_DISC_MAX /* maximum discover type */ } tGATT_DISC_TYPE; } tGATT_DISC_TYPE; /* GATT read type enumeration /* GATT read type enumeration Loading Loading @@ -620,7 +620,7 @@ typedef struct { */ */ typedef union { typedef union { tGATT_READ_BY_TYPE service; tGATT_READ_BY_TYPE service; tGATT_READ_BY_TYPE char_type; /* characterisitc type */ tGATT_READ_BY_TYPE char_type; /* characteristic type */ tGATT_READ_MULTI read_multiple; tGATT_READ_MULTI read_multiple; tGATT_READ_BY_HANDLE by_handle; tGATT_READ_BY_HANDLE by_handle; tGATT_READ_PARTIAL partial; tGATT_READ_PARTIAL partial; Loading Loading @@ -655,7 +655,7 @@ typedef enum : uint8_t { /* characteristic declaration /* characteristic declaration */ */ typedef struct { typedef struct { tGATT_CHAR_PROP char_prop; /* characterisitc properties */ tGATT_CHAR_PROP char_prop; /* characteristic properties */ uint16_t val_handle; /* characteristic value attribute handle */ uint16_t val_handle; /* characteristic value attribute handle */ bluetooth::Uuid char_uuid; /* characteristic UUID type */ bluetooth::Uuid char_uuid; /* characteristic UUID type */ } tGATT_CHAR_DCLR_VAL; } tGATT_CHAR_DCLR_VAL; Loading Loading @@ -800,7 +800,7 @@ typedef union { uint8_t num_clients; uint8_t num_clients; } tGATTS_SRV_CHG_RSP; } tGATTS_SRV_CHG_RSP; /* Attibute server handle ranges NV storage callback functions /* Attribute server handle ranges NV storage callback functions */ */ typedef void(tGATTS_NV_SAVE_CBACK)(bool is_saved, typedef void(tGATTS_NV_SAVE_CBACK)(bool is_saved, tGATTS_HNDL_RANGE* p_hndl_range); tGATTS_HNDL_RANGE* p_hndl_range); Loading Loading @@ -833,7 +833,7 @@ typedef struct { * NV save callback function. There can be one and only one * NV save callback function. There can be one and only one * NV save callback function. * NV save callback function. * * * Parameter p_cb_info : callback informaiton * Parameter p_cb_info : callback information * * * Returns true if registered OK, else false * Returns true if registered OK, else false * * Loading Loading @@ -902,7 +902,7 @@ void GATTS_StopService(uint16_t service_handle); * val_len: Length of the indicated attribute value. * val_len: Length of the indicated attribute value. * p_val: Pointer to the indicated attribute value data. * p_val: Pointer to the indicated attribute value data. * * * Returns GATT_SUCCESS if sucessfully sent or queued; otherwise error * Returns GATT_SUCCESS if successfully sent or queued; otherwise error * code. * code. * * ******************************************************************************/ ******************************************************************************/ Loading @@ -921,7 +921,7 @@ tGATT_STATUS GATTS_HandleValueIndication(uint16_t conn_id, uint16_t attr_handle, * val_len: Length of the indicated attribute value. * val_len: Length of the indicated attribute value. * p_val: Pointer to the indicated attribute value data. * p_val: Pointer to the indicated attribute value data. * * * Returns GATT_SUCCESS if sucessfully sent; otherwise error code. * Returns GATT_SUCCESS if successfully sent; otherwise error code. * * ******************************************************************************/ ******************************************************************************/ tGATT_STATUS GATTS_HandleValueNotification(uint16_t conn_id, tGATT_STATUS GATTS_HandleValueNotification(uint16_t conn_id, Loading @@ -939,7 +939,7 @@ tGATT_STATUS GATTS_HandleValueNotification(uint16_t conn_id, * status: response status * status: response status * p_msg: pointer to message parameters structure. * p_msg: pointer to message parameters structure. * * * Returns GATT_SUCCESS if sucessfully sent; otherwise error code. * Returns GATT_SUCCESS if successfully sent; otherwise error code. * * ******************************************************************************/ ******************************************************************************/ tGATT_STATUS GATTS_SendRsp(uint16_t conn_id, uint32_t trans_id, tGATT_STATUS GATTS_SendRsp(uint16_t conn_id, uint32_t trans_id, Loading Loading @@ -985,7 +985,7 @@ void GATTC_UpdateUserAttMtuIfNeeded(const RawAddress& remote_bda, * Function GATTC_TryMtuRequest * Function GATTC_TryMtuRequest * * * Description This function shall be called before calling * Description This function shall be called before calling * GATTC_ConfgureMTU in order to check if operation is * GATTC_ConfigureMTU in order to check if operation is * available to do. * available to do. * * * Parameters remote_bda : peer device address. (input) * Parameters remote_bda : peer device address. (input) Loading Loading @@ -1105,7 +1105,7 @@ tGATT_STATUS GATTC_SendHandleValueConfirm(uint16_t conn_id, uint16_t handle); * Function GATT_SetIdleTimeout * Function GATT_SetIdleTimeout * * * Description This function (common to both client and server) sets the * Description This function (common to both client and server) sets the * idle timeout for a tansport connection * idle timeout for a transport connection * * * Parameter bd_addr: target device bd address. * Parameter bd_addr: target device bd address. * idle_tout: timeout value in seconds. * idle_tout: timeout value in seconds. Loading Loading @@ -1147,7 +1147,7 @@ tGATT_IF GATT_Register(const bluetooth::Uuid& p_app_uuid128, * * * Description This function deregistered the application from GATT. * Description This function deregistered the application from GATT. * * * Parameters gatt_if: applicaiton interface. * Parameters gatt_if: application interface. * * * Returns None. * Returns None. * * Loading @@ -1162,7 +1162,7 @@ void GATT_Deregister(tGATT_IF gatt_if); * receiving callbacks for registered interface. Function may * receiving callbacks for registered interface. Function may * call back with connection status and queued notifications * call back with connection status and queued notifications * * * Parameter gatt_if: applicaiton interface. * Parameter gatt_if: application interface. * * * Returns None * Returns None * * Loading @@ -1173,10 +1173,10 @@ void GATT_StartIf(tGATT_IF gatt_if); * * * Function GATT_Connect * Function GATT_Connect * * * Description This function initiate a connecttion to a remote device on * Description This function initiate a connection to a remote device on * GATT channel. * GATT channel. * * * Parameters gatt_if: applicaiton interface * Parameters gatt_if: application interface * bd_addr: peer device address * bd_addr: peer device address * addr_type: peer device address type * addr_type: peer device address type * connection_type: connection type * connection_type: connection type Loading Loading @@ -1211,7 +1211,7 @@ bool GATT_Connect(tGATT_IF gatt_if, const RawAddress& bd_addr, * disconnect, typically used for direct connection * disconnect, typically used for direct connection * cancellation. * cancellation. * bd_addr: peer device address. * bd_addr: peer device address. * is_direct: is a direct conenection or a background auto * is_direct: is a direct connection or a background auto * connection * connection * * * Returns true if connection started; else false * Returns true if connection started; else false Loading Loading @@ -1241,12 +1241,12 @@ tGATT_STATUS GATT_Disconnect(uint16_t conn_id); * application interface * application interface * * * Parameters conn_id: connection id (input) * Parameters conn_id: connection id (input) * p_gatt_if: applicaiton interface (output) * p_gatt_if: application interface (output) * bd_addr: peer device address. (output) * bd_addr: peer device address. (output) * transport : physical transport of the GATT connection * transport : physical transport of the GATT connection * (BR/EDR or LE) * (BR/EDR or LE) * * * Returns true the ligical link information is found for conn_id * Returns true the logical link information is found for conn_id * * ******************************************************************************/ ******************************************************************************/ bool GATT_GetConnectionInfor(uint16_t conn_id, tGATT_IF* p_gatt_if, bool GATT_GetConnectionInfor(uint16_t conn_id, tGATT_IF* p_gatt_if, Loading @@ -1259,13 +1259,13 @@ bool GATT_GetConnectionInfor(uint16_t conn_id, tGATT_IF* p_gatt_if, * Description Find the conn_id if the logical link for a BD address * Description Find the conn_id if the logical link for a BD address * and application interface is connected * and application interface is connected * * * Parameters gatt_if: applicaiton interface (input) * Parameters gatt_if: application interface (input) * bd_addr: peer device address. (input) * bd_addr: peer device address. (input) * p_conn_id: connection id (output) * p_conn_id: connection id (output) * transport : physical transport of the GATT connection * transport : physical transport of the GATT connection * (BR/EDR or LE) * (BR/EDR or LE) * * * Returns true the ligical link is connected * Returns true the logical link is connected * * ******************************************************************************/ ******************************************************************************/ bool GATT_GetConnIdIfConnected(tGATT_IF gatt_if, const RawAddress& bd_addr, bool GATT_GetConnIdIfConnected(tGATT_IF gatt_if, const RawAddress& bd_addr, Loading Loading
system/stack/include/gatt_api.h +23 −23 Original line number Original line Diff line number Diff line Loading @@ -488,7 +488,7 @@ typedef uint8_t tGATT_AUTH_REQ; typedef struct { typedef struct { uint16_t conn_id; uint16_t conn_id; uint16_t handle; /* attribute handle */ uint16_t handle; /* attribute handle */ uint16_t offset; /* attribute value offset, if no offfset is needed for the uint16_t offset; /* attribute value offset, if no offset is needed for the command, ignore it */ command, ignore it */ uint16_t len; /* length of attribute value */ uint16_t len; /* length of attribute value */ tGATT_AUTH_REQ auth_req; /* authentication request */ tGATT_AUTH_REQ auth_req; /* authentication request */ Loading Loading @@ -522,7 +522,7 @@ typedef struct { /* write request data */ /* write request data */ typedef struct { typedef struct { uint16_t handle; /* attribute handle */ uint16_t handle; /* attribute handle */ uint16_t offset; /* attribute value offset, if no offfset is needed for the uint16_t offset; /* attribute value offset, if no offset is needed for the command, ignore it */ command, ignore it */ uint16_t len; /* length of attribute value */ uint16_t len; /* length of attribute value */ uint8_t value[GATT_MAX_ATTR_LEN]; /* the actual attribute value */ uint8_t value[GATT_MAX_ATTR_LEN]; /* the actual attribute value */ Loading Loading @@ -567,7 +567,7 @@ typedef enum : uint8_t { GATT_DISC_CHAR, /* discover characteristics of a service with/without type GATT_DISC_CHAR, /* discover characteristics of a service with/without type requirement */ requirement */ GATT_DISC_CHAR_DSCPT, /* discover characteristic descriptors of a character */ GATT_DISC_CHAR_DSCPT, /* discover characteristic descriptors of a character */ GATT_DISC_MAX /* maximnun discover type */ GATT_DISC_MAX /* maximum discover type */ } tGATT_DISC_TYPE; } tGATT_DISC_TYPE; /* GATT read type enumeration /* GATT read type enumeration Loading Loading @@ -620,7 +620,7 @@ typedef struct { */ */ typedef union { typedef union { tGATT_READ_BY_TYPE service; tGATT_READ_BY_TYPE service; tGATT_READ_BY_TYPE char_type; /* characterisitc type */ tGATT_READ_BY_TYPE char_type; /* characteristic type */ tGATT_READ_MULTI read_multiple; tGATT_READ_MULTI read_multiple; tGATT_READ_BY_HANDLE by_handle; tGATT_READ_BY_HANDLE by_handle; tGATT_READ_PARTIAL partial; tGATT_READ_PARTIAL partial; Loading Loading @@ -655,7 +655,7 @@ typedef enum : uint8_t { /* characteristic declaration /* characteristic declaration */ */ typedef struct { typedef struct { tGATT_CHAR_PROP char_prop; /* characterisitc properties */ tGATT_CHAR_PROP char_prop; /* characteristic properties */ uint16_t val_handle; /* characteristic value attribute handle */ uint16_t val_handle; /* characteristic value attribute handle */ bluetooth::Uuid char_uuid; /* characteristic UUID type */ bluetooth::Uuid char_uuid; /* characteristic UUID type */ } tGATT_CHAR_DCLR_VAL; } tGATT_CHAR_DCLR_VAL; Loading Loading @@ -800,7 +800,7 @@ typedef union { uint8_t num_clients; uint8_t num_clients; } tGATTS_SRV_CHG_RSP; } tGATTS_SRV_CHG_RSP; /* Attibute server handle ranges NV storage callback functions /* Attribute server handle ranges NV storage callback functions */ */ typedef void(tGATTS_NV_SAVE_CBACK)(bool is_saved, typedef void(tGATTS_NV_SAVE_CBACK)(bool is_saved, tGATTS_HNDL_RANGE* p_hndl_range); tGATTS_HNDL_RANGE* p_hndl_range); Loading Loading @@ -833,7 +833,7 @@ typedef struct { * NV save callback function. There can be one and only one * NV save callback function. There can be one and only one * NV save callback function. * NV save callback function. * * * Parameter p_cb_info : callback informaiton * Parameter p_cb_info : callback information * * * Returns true if registered OK, else false * Returns true if registered OK, else false * * Loading Loading @@ -902,7 +902,7 @@ void GATTS_StopService(uint16_t service_handle); * val_len: Length of the indicated attribute value. * val_len: Length of the indicated attribute value. * p_val: Pointer to the indicated attribute value data. * p_val: Pointer to the indicated attribute value data. * * * Returns GATT_SUCCESS if sucessfully sent or queued; otherwise error * Returns GATT_SUCCESS if successfully sent or queued; otherwise error * code. * code. * * ******************************************************************************/ ******************************************************************************/ Loading @@ -921,7 +921,7 @@ tGATT_STATUS GATTS_HandleValueIndication(uint16_t conn_id, uint16_t attr_handle, * val_len: Length of the indicated attribute value. * val_len: Length of the indicated attribute value. * p_val: Pointer to the indicated attribute value data. * p_val: Pointer to the indicated attribute value data. * * * Returns GATT_SUCCESS if sucessfully sent; otherwise error code. * Returns GATT_SUCCESS if successfully sent; otherwise error code. * * ******************************************************************************/ ******************************************************************************/ tGATT_STATUS GATTS_HandleValueNotification(uint16_t conn_id, tGATT_STATUS GATTS_HandleValueNotification(uint16_t conn_id, Loading @@ -939,7 +939,7 @@ tGATT_STATUS GATTS_HandleValueNotification(uint16_t conn_id, * status: response status * status: response status * p_msg: pointer to message parameters structure. * p_msg: pointer to message parameters structure. * * * Returns GATT_SUCCESS if sucessfully sent; otherwise error code. * Returns GATT_SUCCESS if successfully sent; otherwise error code. * * ******************************************************************************/ ******************************************************************************/ tGATT_STATUS GATTS_SendRsp(uint16_t conn_id, uint32_t trans_id, tGATT_STATUS GATTS_SendRsp(uint16_t conn_id, uint32_t trans_id, Loading Loading @@ -985,7 +985,7 @@ void GATTC_UpdateUserAttMtuIfNeeded(const RawAddress& remote_bda, * Function GATTC_TryMtuRequest * Function GATTC_TryMtuRequest * * * Description This function shall be called before calling * Description This function shall be called before calling * GATTC_ConfgureMTU in order to check if operation is * GATTC_ConfigureMTU in order to check if operation is * available to do. * available to do. * * * Parameters remote_bda : peer device address. (input) * Parameters remote_bda : peer device address. (input) Loading Loading @@ -1105,7 +1105,7 @@ tGATT_STATUS GATTC_SendHandleValueConfirm(uint16_t conn_id, uint16_t handle); * Function GATT_SetIdleTimeout * Function GATT_SetIdleTimeout * * * Description This function (common to both client and server) sets the * Description This function (common to both client and server) sets the * idle timeout for a tansport connection * idle timeout for a transport connection * * * Parameter bd_addr: target device bd address. * Parameter bd_addr: target device bd address. * idle_tout: timeout value in seconds. * idle_tout: timeout value in seconds. Loading Loading @@ -1147,7 +1147,7 @@ tGATT_IF GATT_Register(const bluetooth::Uuid& p_app_uuid128, * * * Description This function deregistered the application from GATT. * Description This function deregistered the application from GATT. * * * Parameters gatt_if: applicaiton interface. * Parameters gatt_if: application interface. * * * Returns None. * Returns None. * * Loading @@ -1162,7 +1162,7 @@ void GATT_Deregister(tGATT_IF gatt_if); * receiving callbacks for registered interface. Function may * receiving callbacks for registered interface. Function may * call back with connection status and queued notifications * call back with connection status and queued notifications * * * Parameter gatt_if: applicaiton interface. * Parameter gatt_if: application interface. * * * Returns None * Returns None * * Loading @@ -1173,10 +1173,10 @@ void GATT_StartIf(tGATT_IF gatt_if); * * * Function GATT_Connect * Function GATT_Connect * * * Description This function initiate a connecttion to a remote device on * Description This function initiate a connection to a remote device on * GATT channel. * GATT channel. * * * Parameters gatt_if: applicaiton interface * Parameters gatt_if: application interface * bd_addr: peer device address * bd_addr: peer device address * addr_type: peer device address type * addr_type: peer device address type * connection_type: connection type * connection_type: connection type Loading Loading @@ -1211,7 +1211,7 @@ bool GATT_Connect(tGATT_IF gatt_if, const RawAddress& bd_addr, * disconnect, typically used for direct connection * disconnect, typically used for direct connection * cancellation. * cancellation. * bd_addr: peer device address. * bd_addr: peer device address. * is_direct: is a direct conenection or a background auto * is_direct: is a direct connection or a background auto * connection * connection * * * Returns true if connection started; else false * Returns true if connection started; else false Loading Loading @@ -1241,12 +1241,12 @@ tGATT_STATUS GATT_Disconnect(uint16_t conn_id); * application interface * application interface * * * Parameters conn_id: connection id (input) * Parameters conn_id: connection id (input) * p_gatt_if: applicaiton interface (output) * p_gatt_if: application interface (output) * bd_addr: peer device address. (output) * bd_addr: peer device address. (output) * transport : physical transport of the GATT connection * transport : physical transport of the GATT connection * (BR/EDR or LE) * (BR/EDR or LE) * * * Returns true the ligical link information is found for conn_id * Returns true the logical link information is found for conn_id * * ******************************************************************************/ ******************************************************************************/ bool GATT_GetConnectionInfor(uint16_t conn_id, tGATT_IF* p_gatt_if, bool GATT_GetConnectionInfor(uint16_t conn_id, tGATT_IF* p_gatt_if, Loading @@ -1259,13 +1259,13 @@ bool GATT_GetConnectionInfor(uint16_t conn_id, tGATT_IF* p_gatt_if, * Description Find the conn_id if the logical link for a BD address * Description Find the conn_id if the logical link for a BD address * and application interface is connected * and application interface is connected * * * Parameters gatt_if: applicaiton interface (input) * Parameters gatt_if: application interface (input) * bd_addr: peer device address. (input) * bd_addr: peer device address. (input) * p_conn_id: connection id (output) * p_conn_id: connection id (output) * transport : physical transport of the GATT connection * transport : physical transport of the GATT connection * (BR/EDR or LE) * (BR/EDR or LE) * * * Returns true the ligical link is connected * Returns true the logical link is connected * * ******************************************************************************/ ******************************************************************************/ bool GATT_GetConnIdIfConnected(tGATT_IF gatt_if, const RawAddress& bd_addr, bool GATT_GetConnIdIfConnected(tGATT_IF gatt_if, const RawAddress& bd_addr, Loading