} esp_blufi_cb_param_t;
/**
- *
- * @function esp_blufi_register_callback
*
* @brief This function is called to receive blufi callback event
*
esp_err_t esp_blufi_register_callback(esp_profile_cb_t callback);
/**
- *
- * @function esp_blufi_send_config_state
*
* @brief This function is called to send config state to phone
*
esp_err_t esp_blufi_send_config_state(esp_blufi_config_state_t state);
/**
- *
- * @function esp_blufi_profile_init
*
* @brief This function is called to initialize blufi_profile
*
*/
esp_err_t esp_blufi_profile_init(void);
-/*
- *
- * @function esp_blufi_profile_deinit
+/**
*
* @brief This function is called to de-initialize blufi_profile
*
#include "esp_err.h"
/**
- * @function esp_enable_bluetooth
- *
* @brief Enable bluetooth, must after esp_init_bluetooth()
*
* @return
esp_err_t esp_enable_bluetooth(void);
/**
- * @function esp_disable_bluetooth
- *
* @brief Disable bluetooth, must prior to esp_deinit_bluetooth()
*
* @return
esp_err_t esp_disable_bluetooth(void);
/**
- * @function esp_init_bluetooth
- *
* @brief Init and alloc the resource for bluetooth, must be prior to every bluetooth stuff
*
* @return
esp_err_t esp_init_bluetooth(void);
/**
- * @function esp_deinit_bluetooth
- *
* @brief Deinit and free the resource for bluetooth, must be after every bluetooth stuff
*
* @return
} esp_ble_gap_cb_param_t;
/**
- * @function esp_ble_gap_register_callback
- *
* @brief This function is called to occur gap event, such as scan result
*
* @param[in] callback: callback function
/**
- * @function esp_ble_gap_config_adv_data
- *
* @brief This function is called to override the BTA default ADV parameters.
*
* @param[in] adv_data: Pointer to User defined ADV data structure. This
/**
- * @function esp_ble_gap_set_scan_params
- *
* @brief This function is called to set scan parameters
*
- * @param[in] esp_ble_scan_params: Pointer to User defined scan_params data structure. This
+ * @param[in] scan_params: Pointer to User defined scan_params data structure. This
* memory space can not be freed until callback of set_scan_params
*
* @return
/**
- * @function esp_ble_gap_start_scanning
- *
* @brief This procedure keep the device scanning the peer device which advertising on the air
*
* @param[in] duration: Keeping the scanning time, the unit is second.
/**
- * @function esp_ble_gap_stop_scanning
- *
* @brief This function call to stop the device scanning the peer device which advertising on the air
- * @param void
* @return
* - ESP_OK : success
* - other : failed
esp_err_t esp_ble_gap_stop_scanning(void);
/**
- * @function esp_ble_gap_start_advertising
- *
* @brief This function is called to start advertising.
*
- * @param[in] esp_ble_adv_params_all_t: pointer to User defined adv_params data structure.
- *
+ * @param[in] adv_params: pointer to User defined adv_params data structure.
+
* @return
* - ESP_OK : success
* - other : failed
/**
- * @function esp_gap_ble_stop_advertising
- *
* @brief This function is called to stop advertising.
*
- * @param None
- *
* @return
* - ESP_OK : success
* - other : failed
/**
- * @function esp_ble_update_conn_params
- *
* @brief Update connection parameters, can only be used when connection is up.
*
- * @param[in] param - connection update parameters
+ * @param[in] params - connection update parameters
*
* @return
* - ESP_OK : success
/**
- * @function esp_ble_gap_set_pkt_data_len
- *
* @brief This function is to set maximum LE data packet size
*
* @return
/**
- * @function esp_ble_gap_set_rand_addr
- *
* @brief This function set the random address for the application
*
* @param[in] rand_addr: the random address which should be setting
/**
- * @function esp_ble_gap_config_local_privacy
- *
* @brief Enable/disable privacy on the local device
*
* @param[in] privacy_enable - enable/disable privacy on remote device.
/**
- * @function esp_ble_gap_set_device_name
- *
* @brief Set device name to the local device
*
* @param[in] name - device name.
/**
- * @function esp_ble_resolve_adv_data
- *
* @brief This function is called to get ADV data for a specific type.
*
* @param[in] adv_data - pointer of ADV data which to be resolved
* @return pointer of ADV data
*
*/
-uint8_t *esp_ble_resolve_adv_data(uint8_t *adv_data, uint8_t type, uint8_t *p_length);
+uint8_t *esp_ble_resolve_adv_data(uint8_t *adv_data, uint8_t type, uint8_t *length);
#endif /* __ESP_GAP_BLE_API_H__ */
/**
- *
- * @function esp_ble_gattc_app_register_callback
- *
* @brief This function is called to register application callbacks
* with GATTC module.
*
/**
- *
- * @function esp_ble_gattc_app_register
- *
* @brief This function is called to register application callbacks
* with GATTC module.
*
/**
- *
- * @function esp_ble_gattc_app_unregister
- *
* @brief This function is called to unregister an application
* from GATTC module.
*
/**
- *
- * @function esp_ble_gattc_conn
- *
* @brief Open a direct connection or add a background auto connection
*
* @param[in] gatt_if: application identity.
/**
- *
- * @function esp_ble_gattc_close
- *
* @brief Close a connection to a GATT server.
*
* @param[in] conn_id: connection ID to be closed.
* - other: failed
*
*/
-esp_err_t esp_ble_gattc_close (uint16_t conn_id);
+esp_err_t esp_ble_gattc_close(uint16_t conn_id);
/**
- *
- * @function esp_ble_gattc_config_mtu
- *
* @brief Configure the MTU size in the GATT channel. This can be done
* only once per connection.
*
* @param[in] conn_id: connection ID.
- * mtu: desired MTU size to use.
+ * @param[in] mtu: desired MTU size to use.
*
* @return
* - ESP_OK: success
* - other: failed
*
*/
-esp_err_t esp_ble_gattc_config_mtu (uint16_t conn_id, uint16_t mtu);
+esp_err_t esp_ble_gattc_config_mtu(uint16_t conn_id, uint16_t mtu);
/**
- *
- * @function esp_ble_gattc_search_service
- *
* @brief This function is called to request a GATT service discovery
* on a GATT server. This function report service search result
* by a callback event, and followed by a service search complete
/**
- *
- * @function esp_ble_gattc_get_characteristic
- *
* @brief This function is called to find the first characteristic of the
* service on the given server.
*
/**
- *
- * @function esp_ble_gattc_get_descriptor
- *
* @brief This function is called to find the descriptor of the
* service on the given server.
*
/**
- *
- * @function esp_ble_gattc_get_include_service
- *
* @brief This function is called to find the first characteristic of the
* service on the given server.
*
/**
- *
- * @function esp_ble_gattc_read_char
- *
* @brief This function is called to read a service's characteristics of
* the given characteriistic ID
*
/**
- *
- * @function esp_ble_gattc_read_char_descr
- *
* @brief This function is called to read a characteristics descriptor.
*
* @param[in] conn_id : connection ID.
* @param[in] srvc_id : service ID.
+ * @param[in] char_id : characteristic ID to read.
* @param[in] descr_id : characteristic descriptor ID to read.
* @param[in] auth_req : authenticate request type
*
/**
- *
- * @function esp_ble_gattc_write_char
- *
* @brief This function is called to write characteristic value.
*
* @param[in] conn_id : connection ID.
* @param[in] write_type : the type of attribute write operation.
* @param[in] auth_req : authentication request.
*
- *
* @return
* - ESP_OK: success
* - other: failed
/**
- *
- * @function esp_ble_gattc_write_char_descr
- *
* @brief This function is called to write characteristic descriptor value.
*
* @param[in] conn_id : connection ID
* @param[in] write_type : the type of attribute write operation.
* @param[in] auth_req : authentication request.
*
- *
* @return
* - ESP_OK: success
* - other: failed
/**
- *
- * @function esp_ble_gattc_prepare_write
- *
* @brief This function is called to prepare write a characteristic value.
*
* @param[in] conn_id : connection ID.
+ * @param[in] srvc_id : service ID.
* @param[in] char_id : GATT characteristic ID of the service.
* @param[in] offset : offset of the write value.
* @param[in] value_len: length of the value to be written.
esp_gatt_auth_req_t auth_req);
/**
- *
- * @function esp_ble_gattc_execute_write
- *
* @brief This function is called to execute write a prepare write sequence.
*
* @param[in] conn_id : connection ID.
/**
- *
- * @function esp_ble_gattc_register_for_notify
- *
* @brief This function is called to register for notification of a service.
*
* @param[in] gatt_if : gatt interface id.
- * @param[in] bda : target GATT server.
+ * @param[in] server_bda : target GATT server.
* @param[in] srvc_id : pointer to GATT service ID.
* @param[in] char_id : pointer to GATT characteristic ID.
*
- *
* @return
* - ESP_OK: registration succeeds
* - other: failed
/**
- *
- * @function esp_ble_gattc_unregister_ntf
- *
* @brief This function is called to de-register for notification of a service.
*
* @param[in] gatt_if : gatt interface id.
- * @param[in] bda : target GATT server.
+ * @param[in] server_bda : target GATT server.
* @param[in] srvc_id : pointer to GATT service ID.
* @param[in] char_id : pointer to GATT characteristic ID.
*
- *
* @return
* - ESP_OK: unregister succeeds
* - other: failed
} esp_ble_gatts_cb_param_t;
/**
- *
- * @function esp_ble_gatts_register_callback
- *
* @brief This function is called to register application callbacks
* with BTA GATTS module.
*
- *
* @return
* - ESP_OK : success
* - other : failed
/**
- *
- * @function esp_ble_gatts_app_register
- *
* @brief This function is called to register application identifier
*
- *
* @return
* - ESP_OK : success
* - other : failed
/**
- *
- * @function esp_ble_gatts_app_unregister
- *
* @brief unregister with GATT Server.
*
* @param[in] gatt_if: gatt interface id.
/**
- *
- * @function esp_ble_gatts_create_service
- *
* @brief Create a service. When service creation is done, a callback
* event BTA_GATTS_CREATE_SRVC_EVT is called to report status
* and service ID to the profile. The service ID obtained in
/**
- *
- * @function esp_ble_gatts_add_included_service
- *
* @brief This function is called to add an included service. After included
* service is included, a callback event BTA_GATTS_ADD_INCL_SRVC_EVT
* is reported the included service ID.
/**
- *
- * @function esp_ble_gatts_add_char
- *
* @brief This function is called to add a characteristic into a service.
*
* @param[in] service_handle: service handle to which this included service is to
/**
- *
- * @function esp_ble_gatts_add_char_descr
- *
* @brief This function is called to add characteristic descriptor. When
* it's done, a callback event BTA_GATTS_ADD_DESCR_EVT is called
* to report the status and an ID number for this descriptor.
/**
- *
- * @function esp_ble_gatts_delete_service
- *
* @brief This function is called to delete a service. When this is done,
* a callback event BTA_GATTS_DELETE_EVT is report with the status.
*
- * @param[in] service_handled: service_handle to be deleted.
+ * @param[in] service_handle: service_handle to be deleted.
*
* @return
* - ESP_OK : success
/**
- *
- * @function esp_ble_gatts_start_service
- *
* @brief This function is called to start a service.
*
* @param[in] service_handle: the service handle to be started.
- * @param[in] sup_transport: supported transport.
*
* @return
* - ESP_OK : success
/**
- *
- * @function esp_ble_gatts_stop_service
- *
* @brief This function is called to stop a service.
*
* @param[in] service_handle - service to be topped.
/**
- *
- * @function esp_ble_gatts_send_indicate
- *
* @brief This function is called to read a characteristics descriptor.
*
* @param[in] conn_id - connection id to indicate.
- * @param[in] attribute_handle - attribute handle to indicate.
+ * @param[in] attr_handle - attribute handle to indicate.
* @param[in] value_len - indicate value length.
* @param[in] value: value to indicate.
* @param[in] need_confirm - if this indication expects a confirmation or not.
/**
- *
- * @function esp_ble_gatts_send_rsp
- *
* @brief This function is called to send a response to a request.
*
* @param[in] conn_id - connection identifier.
/**
- *
- * @function esp_ble_gatts_open
- *
* @brief Open a direct open connection or add a background auto connection
*
* @param[in] gatt_if: application ID.
esp_err_t esp_ble_gatts_open(esp_gatt_if_t gatt_if, esp_bd_addr_t remote_bda, bool is_direct);
/**
- *
- * @function esp_ble_gatts_close
- *
* @brief Close a connection a remote device.
*
* @param[in] conn_id: connection ID to be closed.