mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'bugfix/fix_bt_sphinx_warnings_4.3' into 'release/v4.3'
components_bt: fix unstandard typedefs [backport v4.3] See merge request espressif/esp-idf!19339
This commit is contained in:
commit
a456819d78
@ -114,9 +114,9 @@ typedef struct {
|
||||
} esp_blufi_ap_record_t;
|
||||
|
||||
/// Bluetooth address length
|
||||
#define ESP_BD_ADDR_LEN 6
|
||||
#define ESP_BLUFI_BD_ADDR_LEN 6
|
||||
/// Bluetooth device address
|
||||
typedef uint8_t esp_bd_addr_t[ESP_BD_ADDR_LEN];
|
||||
typedef uint8_t esp_blufi_bd_addr_t[ESP_BLUFI_BD_ADDR_LEN];
|
||||
|
||||
/**
|
||||
* @brief BLUFI callback parameters union
|
||||
@ -147,7 +147,7 @@ typedef union {
|
||||
* @brief ESP_BLUFI_EVENT_CONNECT
|
||||
*/
|
||||
struct blufi_connect_evt_param {
|
||||
esp_bd_addr_t remote_bda; /*!< Blufi Remote bluetooth device address */
|
||||
esp_blufi_bd_addr_t remote_bda; /*!< Blufi Remote bluetooth device address */
|
||||
uint8_t server_if; /*!< server interface */
|
||||
uint16_t conn_id; /*!< Connection id */
|
||||
} connect; /*!< Blufi callback param of ESP_BLUFI_EVENT_CONNECT */
|
||||
@ -156,7 +156,7 @@ typedef union {
|
||||
* @brief ESP_BLUFI_EVENT_DISCONNECT
|
||||
*/
|
||||
struct blufi_disconnect_evt_param {
|
||||
esp_bd_addr_t remote_bda; /*!< Blufi Remote bluetooth device address */
|
||||
esp_blufi_bd_addr_t remote_bda; /*!< Blufi Remote bluetooth device address */
|
||||
} disconnect; /*!< Blufi callback param of ESP_BLUFI_EVENT_DISCONNECT */
|
||||
|
||||
/* ESP_BLUFI_EVENT_REQ_WIFI_CONNECT */ /* No callback param */
|
||||
@ -224,7 +224,7 @@ typedef union {
|
||||
*/
|
||||
struct blufi_recv_softap_channel_evt_param {
|
||||
uint8_t channel; /*!< Authentication mode */
|
||||
} softap_channel; /*!< Blufi callback param of ESP_BLUFI_EVENT_RECV_SOFTAP_CHANNEL */
|
||||
} softap_channel; /*!< Blufi callback param of ESP_BLUFI_EVENT_RECV_SOFTAP_CHANNEL */
|
||||
|
||||
/**
|
||||
* @brief ESP_BLUFI_EVENT_RECV_USERNAME
|
||||
|
@ -295,7 +295,7 @@ static void blufi_profile_cb(tBTA_GATTS_EVT event, tBTA_GATTS *p_data)
|
||||
BT_BD_ADDR_HEX(p_data->conn.remote_bda), p_data->conn.server_if,
|
||||
p_data->conn.reason, p_data->conn.conn_id);
|
||||
|
||||
memcpy(blufi_env.remote_bda, p_data->conn.remote_bda, sizeof(esp_bd_addr_t));
|
||||
memcpy(blufi_env.remote_bda, p_data->conn.remote_bda, ESP_BLUFI_BD_ADDR_LEN);
|
||||
blufi_env.conn_id = p_data->conn.conn_id;
|
||||
blufi_env.is_connected = true;
|
||||
blufi_env.recv_seq = blufi_env.send_seq = 0;
|
||||
@ -303,7 +303,7 @@ static void blufi_profile_cb(tBTA_GATTS_EVT event, tBTA_GATTS *p_data)
|
||||
msg.sig = BTC_SIG_API_CB;
|
||||
msg.pid = BTC_PID_BLUFI;
|
||||
msg.act = ESP_BLUFI_EVENT_BLE_CONNECT;
|
||||
memcpy(param.connect.remote_bda, p_data->conn.remote_bda, sizeof(esp_bd_addr_t));
|
||||
memcpy(param.connect.remote_bda, p_data->conn.remote_bda, ESP_BLUFI_BD_ADDR_LEN);
|
||||
param.connect.conn_id = BTC_GATT_GET_CONN_ID(p_data->conn.conn_id);
|
||||
conn_id = param.connect.conn_id;
|
||||
server_if = p_data->conn.server_if;
|
||||
@ -320,7 +320,7 @@ static void blufi_profile_cb(tBTA_GATTS_EVT event, tBTA_GATTS *p_data)
|
||||
BT_BD_ADDR_HEX(p_data->conn.remote_bda), p_data->conn.server_if,
|
||||
p_data->conn.reason, p_data->conn.conn_id);
|
||||
|
||||
memcpy(blufi_env.remote_bda, p_data->conn.remote_bda, sizeof(esp_bd_addr_t));
|
||||
memcpy(blufi_env.remote_bda, p_data->conn.remote_bda, ESP_BLUFI_BD_ADDR_LEN);
|
||||
blufi_env.conn_id = p_data->conn.conn_id;
|
||||
blufi_env.recv_seq = blufi_env.send_seq = 0;
|
||||
blufi_env.sec_mode = 0x0;
|
||||
@ -334,7 +334,7 @@ static void blufi_profile_cb(tBTA_GATTS_EVT event, tBTA_GATTS *p_data)
|
||||
msg.sig = BTC_SIG_API_CB;
|
||||
msg.pid = BTC_PID_BLUFI;
|
||||
msg.act = ESP_BLUFI_EVENT_BLE_DISCONNECT;
|
||||
memcpy(param.disconnect.remote_bda, p_data->conn.remote_bda, sizeof(esp_bd_addr_t));
|
||||
memcpy(param.disconnect.remote_bda, p_data->conn.remote_bda, ESP_BLUFI_BD_ADDR_LEN);
|
||||
btc_transfer_context(&msg, ¶m, sizeof(esp_blufi_cb_param_t), NULL);
|
||||
break;
|
||||
}
|
||||
|
@ -256,7 +256,7 @@ esp_blufi_gap_event(struct ble_gap_event *event, void *arg)
|
||||
|
||||
rc = ble_gap_conn_find(event->connect.conn_handle, &desc);
|
||||
assert(rc == 0);
|
||||
memcpy(param.connect.remote_bda, desc.peer_id_addr.val, sizeof(esp_bd_addr_t));
|
||||
memcpy(param.connect.remote_bda, desc.peer_id_addr.val, ESP_BLUFI_BD_ADDR_LEN);
|
||||
|
||||
param.connect.conn_id = event->connect.conn_handle;
|
||||
/* save connection handle */
|
||||
@ -270,7 +270,7 @@ esp_blufi_gap_event(struct ble_gap_event *event, void *arg)
|
||||
return 0;
|
||||
case BLE_GAP_EVENT_DISCONNECT:
|
||||
ESP_LOGI(TAG, "disconnect; reason=%d\n", event->disconnect.reason);
|
||||
memcpy(blufi_env.remote_bda, event->disconnect.conn.peer_id_addr.val, sizeof(esp_bd_addr_t));
|
||||
memcpy(blufi_env.remote_bda, event->disconnect.conn.peer_id_addr.val, ESP_BLUFI_BD_ADDR_LEN);
|
||||
blufi_env.is_connected = false;
|
||||
blufi_env.recv_seq = blufi_env.send_seq = 0;
|
||||
blufi_env.sec_mode = 0x0;
|
||||
@ -287,7 +287,7 @@ esp_blufi_gap_event(struct ble_gap_event *event, void *arg)
|
||||
msg.sig = BTC_SIG_API_CB;
|
||||
msg.pid = BTC_PID_BLUFI;
|
||||
msg.act = ESP_BLUFI_EVENT_BLE_DISCONNECT;
|
||||
memcpy(param.disconnect.remote_bda, event->disconnect.conn.peer_id_addr.val, sizeof(esp_bd_addr_t));
|
||||
memcpy(param.disconnect.remote_bda, event->disconnect.conn.peer_id_addr.val, ESP_BLUFI_BD_ADDR_LEN);
|
||||
btc_transfer_context(&msg, ¶m, sizeof(esp_blufi_cb_param_t), NULL);
|
||||
|
||||
return 0;
|
||||
|
@ -285,7 +285,7 @@ typedef enum {
|
||||
#define ESP_BLE_MESH_VENDOR_MODEL(_company, _id, _op, _pub, _user_data) \
|
||||
{ \
|
||||
.vnd.company_id = (_company), \
|
||||
.vnd.model_id = (_id), \
|
||||
.vnd.vnd_model_id = (_id), \
|
||||
.op = _op, \
|
||||
.pub = _pub, \
|
||||
.keys = { [0 ... (CONFIG_BLE_MESH_MODEL_KEY_COUNT - 1)] = \
|
||||
@ -480,7 +480,7 @@ struct esp_ble_mesh_model {
|
||||
const uint16_t model_id; /*!< 16-bit model identifier */
|
||||
struct {
|
||||
uint16_t company_id; /*!< 16-bit company identifier */
|
||||
uint16_t model_id; /*!< 16-bit model identifier */
|
||||
uint16_t vnd_model_id; /*!< 16-bit vendor model identifier */
|
||||
} vnd; /*!< Structure encapsulating a model ID with a company ID */
|
||||
};
|
||||
|
||||
|
@ -27,7 +27,8 @@ static const uint8_t UUID_SPP[16] = {0x00, 0x00, 0x11, 0x01, 0x00, 0x00, 0x10, 0
|
||||
0x80, 0x00, 0x00, 0x80, 0x5F, 0x9B, 0x34, 0xFB
|
||||
};
|
||||
static tSDP_UUID sdp_uuid;
|
||||
esp_err_t esp_spp_register_callback(esp_spp_cb_t *callback)
|
||||
|
||||
esp_err_t esp_spp_register_callback(esp_spp_cb_t callback)
|
||||
{
|
||||
ESP_BLUEDROID_STATUS_CHECK(ESP_BLUEDROID_STATUS_ENABLED);
|
||||
|
||||
|
@ -205,7 +205,7 @@ typedef union {
|
||||
* @param event: Event type
|
||||
* @param param: Point to callback parameter, currently is union type
|
||||
*/
|
||||
typedef void (esp_spp_cb_t)(esp_spp_cb_event_t event, esp_spp_cb_param_t *param);
|
||||
typedef void (*esp_spp_cb_t)(esp_spp_cb_event_t event, esp_spp_cb_param_t *param);
|
||||
|
||||
/**
|
||||
* @brief This function is called to init callbacks with SPP module.
|
||||
|
@ -266,7 +266,7 @@ static void spp_free_slot(spp_slot_t *slot)
|
||||
|
||||
static inline void btc_spp_cb_to_app(esp_spp_cb_event_t event, esp_spp_cb_param_t *param)
|
||||
{
|
||||
esp_spp_cb_t *btc_spp_cb = (esp_spp_cb_t *)btc_profile_cb_get(BTC_PID_SPP);
|
||||
esp_spp_cb_t btc_spp_cb = (esp_spp_cb_t)btc_profile_cb_get(BTC_PID_SPP);
|
||||
if (btc_spp_cb) {
|
||||
btc_spp_cb(event, param);
|
||||
}
|
||||
|
@ -24,50 +24,6 @@ ulp-legacy.rst:line: WARNING: Duplicate declaration, esp_err_t ulp_run(uint32_t
|
||||
ulp-legacy.rst:line: WARNING: Duplicate declaration, esp_err_t ulp_set_wakeup_period(size_t period_index, uint32_t period_us)
|
||||
ulp-risc-v.rst:line: WARNING: Duplicate declaration, esp_err_t ulp_set_wakeup_period(size_t period_index, uint32_t period_us)
|
||||
README.rst:line: WARNING: Duplicate declaration, esp_err_t ulp_run(uint32_t entry_point)
|
||||
|
||||
|
||||
# This seems like a bug, as the field are ::model_id and ::vnd::model_id
|
||||
esp_ble_mesh_defs.inc:line: WARNING: Duplicate declaration, uint16_t esp_ble_mesh_model::model_id
|
||||
WARNING:esp_bt_defs, use :noindex: for one of them
|
||||
WARNING:esp_blufi, use :noindex: for one of them
|
||||
esp_bt_defs.inc:line: WARNING: Duplicate declaration, uint8_t esp_bd_addr_t[ESP_BD_ADDR_LEN]
|
||||
|
||||
#
|
||||
# Issue present only when building on msys2 / mingw32 START >>>
|
||||
#
|
||||
esp_spp_api.inc:line: WARNING: Error in type declaration.
|
||||
If typedef-like declaration:
|
||||
Type must be either just a name or a typedef-like declaration.
|
||||
If just a name:
|
||||
Error in declarator or parameters and qualifiers
|
||||
Invalid definition: Expected identifier in nested name, got keyword: void [error at 4]
|
||||
void() esp_spp_cb_t(esp_spp_cb_event_t event, esp_spp_cb_param_t *param)
|
||||
----^
|
||||
If typedef-like declaration:
|
||||
Error in declarator
|
||||
If pointer to member declarator:
|
||||
Invalid definition: Expected identifier in nested name. [error at 4]
|
||||
void() esp_spp_cb_t(esp_spp_cb_event_t event, esp_spp_cb_param_t *param)
|
||||
----^
|
||||
If declId, parameters, and qualifiers:
|
||||
Invalid definition: Expected identifier in nested name. [error at 4]
|
||||
void() esp_spp_cb_t(esp_spp_cb_event_t event, esp_spp_cb_param_t *param)
|
||||
----^
|
||||
If parenthesis in noptr-declarator:
|
||||
Error in declarator or parameters and qualifiers
|
||||
If pointer to member declarator:
|
||||
Invalid definition: Expected identifier in nested name. [error at 5]
|
||||
void() esp_spp_cb_t(esp_spp_cb_event_t event, esp_spp_cb_param_t *param)
|
||||
-----^
|
||||
If declarator-id:
|
||||
Invalid definition: Expected identifier in nested name. [error at 5]
|
||||
void() esp_spp_cb_t(esp_spp_cb_event_t event, esp_spp_cb_param_t *param)
|
||||
-----^
|
||||
If type alias or template alias:
|
||||
Invalid definition: Expected identifier in nested name, got keyword: void [error at 4]
|
||||
void() esp_spp_cb_t(esp_spp_cb_event_t event, esp_spp_cb_param_t *param)
|
||||
----^
|
||||
|
||||
#
|
||||
# Issue present only when building on msys2 / mingw32 END <<<
|
||||
#
|
||||
|
@ -330,7 +330,7 @@ esp_err_t genie_model_msg_send(genie_model_msg_t *p_model_msg)
|
||||
return err;
|
||||
}
|
||||
|
||||
ESP_LOGD(TAG, "p_model: %p, cid: 0x%04x, id: 0x%04x, opcode: 0x%02x, retry: %d", p_model, p_model->vnd.company_id, p_model->vnd.model_id, p_model_msg->opid, p_model_msg->retry);
|
||||
ESP_LOGD(TAG, "p_model: %p, cid: 0x%04x, id: 0x%04x, opcode: 0x%02x, retry: %d", p_model, p_model->vnd.company_id, p_model->vnd.vnd_model_id, p_model_msg->opid, p_model_msg->retry);
|
||||
|
||||
if(p_model_msg->tid == 0) {
|
||||
p_model_msg->tid = genie_model_msg_gen_tid();
|
||||
|
@ -236,7 +236,7 @@ esp_err_t example_handle_config_app_key_add_evt(uint16_t app_idx)
|
||||
}
|
||||
if (k == ARRAY_SIZE(model->keys)) {
|
||||
ESP_LOGE(TAG, "%s: Vendor model (model_id 0x%04x, cid: 0x%04x) is full of AppKey",
|
||||
__func__, model->vnd.model_id, model->vnd.company_id);
|
||||
__func__, model->vnd.vnd_model_id, model->vnd.company_id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user