component/bt: add open and close event for gatts

1.added open event and close event for gatts.
2.used esp_log_buffer_char/hex for gattc scan result.
This commit is contained in:
zhiweijian
2017-06-01 14:16:24 +08:00
parent 6873c19131
commit f5a59f4f78
6 changed files with 77 additions and 40 deletions

View File

@@ -208,12 +208,25 @@ typedef union {
/**
* @brief ESP_GATTS_OPEN_EVT
*/
struct gatts_open_evt_param {
esp_gatt_status_t status; /*!< Operation status */
} open; /*!< Gatt server callback param of ESP_GATTS_OPEN_EVT */
/**
* @brief ESP_GATTS_CANCEL_OPEN_EVT
*/
struct gatts_cancel_open_evt_param {
esp_gatt_status_t status; /*!< Operation status */
} cancel_open; /*!< Gatt server callback param of ESP_GATTS_CANCEL_OPEN_EVT */
/**
* @brief ESP_GATTS_CLOSE_EVT
*/
struct gatts_close_evt_param {
esp_gatt_status_t status; /*!< Operation status */
uint16_t conn_id; /*!< Connection id */
} close; /*!< Gatt server callback param of ESP_GATTS_CLOSE_EVT */
/**
* @brief ESP_GATTS_LISTEN_EVT
*/