mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-10 04:43:33 +00:00
component/bt : mv some define to btc
1. Actually, btc & api are the same module thing. So the type defined in api header file can be included by btc c/h files. Besides, why btc & api should be separated, because that user may be aware of api and api refer defines/types, rather than other non-refer things. All defines/types that user won't use should be put in btc directory (and define with prefix "btc_"), and which will be used by user should be defined with prefix "esp_" . 2. rename attribute value(all is value, not data)
This commit is contained in:
@@ -51,27 +51,6 @@
|
||||
#define ESP_GATT_DEF_BLE_MTU_SIZE 23
|
||||
#define ESP_GATT_MAX_MTU_SIZE 517
|
||||
|
||||
|
||||
/* esp_ble_gattc_args_t */
|
||||
typedef struct {
|
||||
uint16_t app_id;
|
||||
uint16_t conn_id;
|
||||
uint16_t mtu;
|
||||
uint16_t len;
|
||||
uint16_t offset;
|
||||
esp_gatt_if_t gatt_if; /* internal is server_if or client_if */
|
||||
esp_gatt_srvc_id_t service_id;
|
||||
esp_gatt_srvc_id_t start_service_id;
|
||||
esp_gatt_id_t char_id;
|
||||
esp_gatt_id_t descr_id;
|
||||
esp_gatt_auth_req_t auth_req;
|
||||
esp_bd_addr_t remote_bda;
|
||||
esp_bt_uuid_t uuid;
|
||||
bool is_direct;
|
||||
bool is_execute;
|
||||
uint8_t value[ESP_GATT_MAX_ATTR_LEN];
|
||||
} esp_ble_gattc_args_t;
|
||||
|
||||
/* esp_ble_gattc_cb_param_t */
|
||||
typedef union {
|
||||
/*registration data for ESP_GATTC_REG_EVT */
|
||||
@@ -433,7 +412,7 @@ esp_err_t esp_ble_gattc_read_char_descr (uint16_t conn_id,
|
||||
** @param[in] conn_id - connection ID.
|
||||
** @param[in] srvc_id - serivcie ID.
|
||||
** @param[in] char_id - characteristic ID to write.
|
||||
** @param[in] len: length of the data to be written.
|
||||
** @param[in] value_len: length of the value to be written.
|
||||
** @param[in] value - the value to be written.
|
||||
**
|
||||
** @return ESP_OK - success, other - failed
|
||||
@@ -442,7 +421,7 @@ esp_err_t esp_ble_gattc_read_char_descr (uint16_t conn_id,
|
||||
esp_err_t esp_ble_gattc_write_char( uint16_t conn_id,
|
||||
esp_gatt_srvc_id_t *srvc_id,
|
||||
esp_gatt_id_t *char_id,
|
||||
uint16_t len,
|
||||
uint16_t value_len,
|
||||
uint8_t *value,
|
||||
esp_gatt_auth_req_t auth_req);
|
||||
|
||||
@@ -457,6 +436,7 @@ esp_err_t esp_ble_gattc_write_char( uint16_t conn_id,
|
||||
** @param[in] srvc_id - serivcie ID.
|
||||
** @param[in] char_id - characteristic ID.
|
||||
** @param[in] descr_id - characteristic descriptor ID to write.
|
||||
** @param[in] value_len: length of the value to be written.
|
||||
** @param[in] value - the value to be written.
|
||||
**
|
||||
** @return ESP_OK - success, other - failed
|
||||
@@ -466,7 +446,7 @@ esp_err_t esp_ble_gattc_write_char_descr (uint16_t conn_id,
|
||||
esp_gatt_srvc_id_t *srvc_id,
|
||||
esp_gatt_id_t *char_id,
|
||||
esp_gatt_id_t *descr_id,
|
||||
uint16_t len,
|
||||
uint16_t value_len,
|
||||
uint8_t *value,
|
||||
esp_gatt_auth_req_t auth_req);
|
||||
|
||||
@@ -481,7 +461,7 @@ esp_err_t esp_ble_gattc_write_char_descr (uint16_t conn_id,
|
||||
** @param[in] conn_id - connection ID.
|
||||
** @param[in] char_id - GATT characteritic ID of the service.
|
||||
** @param[in] offset - offset of the write value.
|
||||
** @param[in] len: length of the data to be written.
|
||||
** @param[in] value_len: length of the value to be written.
|
||||
** @param[in] value - the value to be written.
|
||||
**
|
||||
** @return ESP_OK - success, other - failed
|
||||
@@ -491,8 +471,8 @@ esp_err_t esp_ble_gattc_prepare_write(uint16_t conn_id,
|
||||
esp_gatt_srvc_id_t *srvc_id,
|
||||
esp_gatt_id_t *char_id,
|
||||
uint16_t offset,
|
||||
uint16_t len,
|
||||
uint8_t *data,
|
||||
uint16_t value_len,
|
||||
uint8_t *value,
|
||||
esp_gatt_auth_req_t auth_req);
|
||||
|
||||
/*******************************************************************************
|
||||
|
Reference in New Issue
Block a user