/// GATT Client callback function events
typedef enum {
- ESP_GATTC_REG_EVT = 0, /*!> when GATT client is registered */
- ESP_GATTC_UNREG_EVT, /*!> when GATT client is unregistered */
- ESP_GATTC_OPEN_EVT, /*!> when GATT connection is set up */
- ESP_GATTC_READ_CHAR_EVT, /*!> when GATT characteristic is read */
- ESP_GATTC_WRITE_CHAR_EVT, /*!> when GATT characteristic write operation completes */
- ESP_GATTC_CLOSE_EVT, /*!> when GATT connection is closed */
- ESP_GATTC_SEARCH_CMPL_EVT, /*!> when GATT service discovery is completed */
- ESP_GATTC_SEARCH_RES_EVT, /*!> when GATT service discovery result is got */
- ESP_GATTC_READ_DESCR_EVT, /*!> when GATT characteristic descriptor read completes */
- ESP_GATTC_WRITE_DESCR_EVT, /*!> when GATT characteristic descriptor write completes */
- ESP_GATTC_NOTIFY_EVT, /*!> when GATT notification or indication arrives */
- ESP_GATTC_PREP_WRITE_EVT, /*!> when GATT prepare-write operation conpletes */
- ESP_GATTC_EXEC_EVT, /*!> when write execution completes */
- ESP_GATTC_ACL_EVT, /*!> when ACL connection is up */
- ESP_GATTC_CANCEL_OPEN_EVT, /*!> when GATT client ongoing connection is cancelled */
- ESP_GATTC_SRVC_CHG_EVT, /*!> when "service changed" occurs */
- ESP_GATTC_ENC_CMPL_CB_EVT, /*!> when encryption procedure completes */
- ESP_GATTC_CFG_MTU_EVT, /*!> when configuration of MTU completes */
- ESP_GATTC_ADV_DATA_EVT, /*!> when advertising of data */
- ESP_GATTC_MULT_ADV_ENB_EVT, /*!> when multi-advertising is enabled */
- ESP_GATTC_MULT_ADV_UPD_EVT, /*!> when multi-advertising parameters are updated */
- ESP_GATTC_MULT_ADV_DATA_EVT, /*!> when multi-advertising data arrives */
- ESP_GATTC_MULT_ADV_DIS_EVT, /*!> when multi-advertising is disabled */
- ESP_GATTC_CONGEST_EVT, /*!> when GATT connection congestion comes */
- ESP_GATTC_BTH_SCAN_ENB_EVT, /*!> when batch scan is enabled */
- ESP_GATTC_BTH_SCAN_CFG_EVT, /*!> when batch scan storage is configured */
- ESP_GATTC_BTH_SCAN_RD_EVT, /*!> when Batch scan read event is reported */
- ESP_GATTC_BTH_SCAN_THR_EVT, /*!> when Batch scan threshold is set */
- ESP_GATTC_BTH_SCAN_PARAM_EVT, /*!> when Batch scan parameters are set */
- ESP_GATTC_BTH_SCAN_DIS_EVT, /*!> when Batch scan is disabled */
- ESP_GATTC_SCAN_FLT_CFG_EVT, /*!> when Scan filter configuration completes */
- ESP_GATTC_SCAN_FLT_PARAM_EVT, /*!> when Scan filter parameters are set */
- ESP_GATTC_SCAN_FLT_STATUS_EVT, /*!> when Scan filter status is reported */
- ESP_GATTC_ADV_VSC_EVT, /*!> when ADV VSC event is reported*/
- ESP_GATTC_GET_CHAR_EVT, /*!> when characteristic is got from GATT server */
- ESP_GATTC_GET_DESCR_EVT, /*!> when charcteristic descriptor is got from GATT server */
- ESP_GATTC_GET_INCL_SRVC_EVT, /*!> when included service is got from GATT server */
- ESP_GATTC_REG_FOR_NOTIFY_EVT, /*!> when registration for notification of a service completes */
- ESP_GATTC_UNREG_FOR_NOTIFY_EVT /*!> when unregistration for notification of a service completes */
+ ESP_GATTC_REG_EVT = 0, /*!< When GATT client is registered, the event comes */
+ ESP_GATTC_UNREG_EVT = 1, /*!< When GATT client is unregistered, the event comes */
+ ESP_GATTC_OPEN_EVT = 2, /*!< When GATT connection is set up, the event comes */
+ ESP_GATTC_READ_CHAR_EVT = 3, /*!< When GATT characteristic is read, the event comes */
+ ESP_GATTC_WRITE_CHAR_EVT = 4, /*!< When GATT characteristic write operation completes, the event comes */
+ ESP_GATTC_CLOSE_EVT = 5, /*!< When GATT connection is closed, the event comes */
+ ESP_GATTC_SEARCH_CMPL_EVT = 6, /*!< When GATT service discovery is completed, the event comes */
+ ESP_GATTC_SEARCH_RES_EVT = 7, /*!< When GATT service discovery result is got, the event comes */
+ ESP_GATTC_READ_DESCR_EVT = 8, /*!< When GATT characteristic descriptor read completes, the event comes */
+ ESP_GATTC_WRITE_DESCR_EVT = 9, /*!< When GATT characteristic descriptor write completes, the event comes */
+ ESP_GATTC_NOTIFY_EVT = 10, /*!< When GATT notification or indication arrives, the event comes */
+ ESP_GATTC_PREP_WRITE_EVT = 11, /*!< When GATT prepare-write operation completes, the event comes */
+ ESP_GATTC_EXEC_EVT = 12, /*!< When write execution completes, the event comes */
+ ESP_GATTC_ACL_EVT = 13, /*!< When ACL connection is up, the event comes */
+ ESP_GATTC_CANCEL_OPEN_EVT = 14, /*!< When GATT client ongoing connection is cancelled, the event comes */
+ ESP_GATTC_SRVC_CHG_EVT = 15, /*!< When "service changed" occurs, the event comes */
+ ESP_GATTC_ENC_CMPL_CB_EVT = 17, /*!< When encryption procedure completes, the event comes */
+ ESP_GATTC_CFG_MTU_EVT = 18, /*!< When configuration of MTU completes, the event comes */
+ ESP_GATTC_ADV_DATA_EVT = 19, /*!< When advertising of data, the event comes */
+ ESP_GATTC_MULT_ADV_ENB_EVT = 20, /*!< When multi-advertising is enabled, the event comes */
+ ESP_GATTC_MULT_ADV_UPD_EVT = 21, /*!< When multi-advertising parameters are updated, the event comes */
+ ESP_GATTC_MULT_ADV_DATA_EVT = 22, /*!< When multi-advertising data arrives, the event comes */
+ ESP_GATTC_MULT_ADV_DIS_EVT = 23, /*!< When multi-advertising is disabled, the event comes */
+ ESP_GATTC_CONGEST_EVT = 24, /*!< When GATT connection congestion comes, the event comes */
+ ESP_GATTC_BTH_SCAN_ENB_EVT = 25, /*!< When batch scan is enabled, the event comes */
+ ESP_GATTC_BTH_SCAN_CFG_EVT = 26, /*!< When batch scan storage is configured, the event comes */
+ ESP_GATTC_BTH_SCAN_RD_EVT = 27, /*!< When Batch scan read event is reported, the event comes */
+ ESP_GATTC_BTH_SCAN_THR_EVT = 28, /*!< When Batch scan threshold is set, the event comes */
+ ESP_GATTC_BTH_SCAN_PARAM_EVT = 29, /*!< When Batch scan parameters are set, the event comes */
+ ESP_GATTC_BTH_SCAN_DIS_EVT = 30, /*!< When Batch scan is disabled, the event comes */
+ ESP_GATTC_SCAN_FLT_CFG_EVT = 31, /*!< When Scan filter configuration completes, the event comes */
+ ESP_GATTC_SCAN_FLT_PARAM_EVT = 32, /*!< When Scan filter parameters are set, the event comes */
+ ESP_GATTC_SCAN_FLT_STATUS_EVT = 33, /*!< When Scan filter status is reported, the event comes */
+ ESP_GATTC_ADV_VSC_EVT = 34, /*!< When advertising vendor spec content event is reported, the event comes */
+ ESP_GATTC_GET_CHAR_EVT = 35, /*!< When characteristic is got from GATT server, the event comes */
+ ESP_GATTC_GET_DESCR_EVT = 36, /*!< When characteristic descriptor is got from GATT server, the event comes */
+ ESP_GATTC_GET_INCL_SRVC_EVT = 37, /*!< When included service is got from GATT server, the event comes */
+ ESP_GATTC_REG_FOR_NOTIFY_EVT = 38, /*!< When register for notification of a service completes, the event comes */
+ ESP_GATTC_UNREG_FOR_NOTIFY_EVT = 39, /*!< When unregister for notification of a service completes, the event comes */
} esp_gattc_cb_event_t;
/// Maximum Transmission Unit used in GATT
*
* @param[in] callback : pointer to the application callback function.
*
- * @return - ESP_OK: success
+ * @return
+ * - ESP_OK: success
* - other: failed
*
*/
*
* @param[in] app_id : Application Identify (UUID), for different application
*
- * @return - ESP_OK: success
+ * @return
+ * - ESP_OK: success
* - other: failed
*
*/
*
* @param[in] gatt_if : app identifier.
*
- * @return - ESP_OK: success
+ * @return
+ * - ESP_OK: success
* - other: failed
*
*/
* @param[in] remote_bda: remote device bluetooth device address.
* @param[in] is_direct: direct connection or background auto connection
*
- * @return - ESP_OK: success
+ * @return
+ * - ESP_OK: success
* - other: failed
*
*/
*
* @param[in] conn_id: connection ID to be closed.
*
- * @return - ESP_OK: success
+ * @return
+ * - ESP_OK: success
* - other: failed
*
*/
* @param[in] conn_id: connection ID.
* mtu: desired MTU size to use.
*
- * @return - ESP_OK: success
+ * @return
+ * - ESP_OK: success
* - other: failed
*
*/
* @param[in] filter_uuid: a UUID of the service application is interested in.
* If Null, discover for all services.
*
- * @return - ESP_OK: success
+ * @return
+ * - ESP_OK: success
* - other: failed
*
*/
*
* @param[in] start_char_id: the start characteristic ID
*
- * @return - ESP_OK: success
+ * @return
+ * - ESP_OK: success
* - other: failed
*
*/
* characteristic.
* @param[in] start_descr_id: the start descriptor id
*
- * @return - ESP_OK: success
+ * @return
+ * - ESP_OK: success
* - other: failed
*
*/
* @param[in] srvc_id: the service ID of which the characteristic is belonged to.
* @param[in] start_incl_srvc_id: the start include service id
*
- * @return - ESP_OK: success
+ * @return
+ * - ESP_OK: success
* - other: failed
*
*/
* @param[in] char_id : characteristic ID to read.
* @param[in] auth_req : authenticate request type
*
- * @return - ESP_OK: success
+ * @return
+ * - ESP_OK: success
* - other: failed
*
*/
* @param[in] descr_id : characteristic descriptor ID to read.
* @param[in] auth_req : authenticate request type
*
- * @return - ESP_OK: success
+ * @return
+ * - ESP_OK: success
* - other: failed
*
*/
* @param[in] auth_req : authentication request.
*
*
- * @return - ESP_OK: success
+ * @return
+ * - ESP_OK: success
* - other: failed
*
*/
* @param[in] auth_req : authentication request.
*
*
- * @return - ESP_OK: success
+ * @return
+ * - ESP_OK: success
* - other: failed
*
*/
* @param[in] value : the value to be written.
* @param[in] auth_req : authentication request.
*
- * @return - ESP_OK: success
+ * @return
+ * - ESP_OK: success
* - other: failed
*
*/
* @param[in] conn_id : connection ID.
* @param[in] is_execute : execute or cancel.
*
- * @return - ESP_OK: success
+ * @return
+ * - ESP_OK: success
* - other: failed
*
*/
* @param[in] char_id : pointer to GATT characteristic ID.
*
*
- * @return - ESP_OK: registration succeeds
+ * @return
+ * - ESP_OK: registration succeeds
* - other: failed
*
*/
* @param[in] char_id : pointer to GATT characteristic ID.
*
*
- * @return - ESP_OK: unregister succeeds
+ * @return
+ * - ESP_OK: unregister succeeds
* - other: failed
*
*/