component_bt: Fix build doc errors of bt

1. bluedroid: use standard function pointer define.
   2. blufi: Change ESP_BD_ADDR_LEN into ESP_BLUFI_BD_ADDR_LEN
   3. doc/sphinx_known_warnings: Remove fixed parts.
pull/8968/head
weitianhua 2022-05-10 16:01:15 +08:00 zatwierdzone przez morris
rodzic 20fdf3bdf1
commit 4c370cc437
13 zmienionych plików z 21 dodań i 82 usunięć

Wyświetl plik

@ -107,9 +107,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
@ -140,7 +140,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 */
@ -149,7 +149,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 */

Wyświetl plik

@ -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, &param, sizeof(esp_blufi_cb_param_t), NULL);
break;
}

Wyświetl plik

@ -262,7 +262,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 */
@ -276,7 +276,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;
@ -293,7 +293,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, &param, sizeof(esp_blufi_cb_param_t), NULL);
return 0;

Wyświetl plik

@ -15,7 +15,7 @@
#if (defined BTC_HD_INCLUDED && BTC_HD_INCLUDED == TRUE)
esp_err_t esp_bt_hid_device_register_callback(esp_hd_cb_t *callback)
esp_err_t esp_bt_hid_device_register_callback(esp_hd_cb_t callback)
{
ESP_BLUEDROID_STATUS_CHECK(ESP_BLUEDROID_STATUS_ENABLED);

Wyświetl plik

@ -15,7 +15,7 @@
#if (defined BTC_HH_INCLUDED && BTC_HH_INCLUDED == TRUE)
esp_err_t esp_bt_hid_host_register_callback(esp_hh_cb_t *callback)
esp_err_t esp_bt_hid_host_register_callback(esp_hh_cb_t callback)
{
ESP_BLUEDROID_STATUS_CHECK(ESP_BLUEDROID_STATUS_ENABLED);

Wyświetl plik

@ -19,7 +19,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);

Wyświetl plik

@ -263,7 +263,7 @@ typedef union {
* @param event: Event type
* @param param: Point to callback parameter, currently is union type
*/
typedef void (esp_hd_cb_t)(esp_hidd_cb_event_t event, esp_hidd_cb_param_t *param);
typedef void (*esp_hd_cb_t)(esp_hidd_cb_event_t event, esp_hidd_cb_param_t *param);
/**
* @brief This function is called to init callbacks with HID device module.

Wyświetl plik

@ -280,7 +280,7 @@ typedef union {
* @param event: Event type
* @param param: Point to callback parameter, currently is union type
*/
typedef void (esp_hh_cb_t)(esp_hidh_cb_event_t event, esp_hidh_cb_param_t *param);
typedef void (*esp_hh_cb_t)(esp_hidh_cb_event_t event, esp_hidh_cb_param_t *param);
/**
* @brief This function is called to init callbacks with HID host module.

Wyświetl plik

@ -197,7 +197,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.

Wyświetl plik

@ -77,7 +77,7 @@ typedef void (bt_hid_copy_cb_t)(btc_msg_t *msg, void *p_dest, void *p_src);
static inline void btc_hd_cb_to_app(esp_hidd_cb_event_t event, esp_hidd_cb_param_t *param)
{
esp_hd_cb_t *btc_hd_cb = (esp_hd_cb_t *)btc_profile_cb_get(BTC_PID_HD);
esp_hd_cb_t btc_hd_cb = (esp_hd_cb_t)btc_profile_cb_get(BTC_PID_HD);
if (btc_hd_cb) {
btc_hd_cb(event, param);
}

Wyświetl plik

@ -66,7 +66,7 @@ static bdstr_t bdstr;
static inline void btc_hh_cb_to_app(esp_hidh_cb_event_t event, esp_hidh_cb_param_t *param)
{
esp_hh_cb_t *btc_hh_cb = (esp_hh_cb_t *)btc_profile_cb_get(BTC_PID_HH);
esp_hh_cb_t btc_hh_cb = (esp_hh_cb_t)btc_profile_cb_get(BTC_PID_HH);
if (btc_hh_cb) {
btc_hh_cb(event, param);
}

Wyświetl plik

@ -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);
}

Wyświetl plik

@ -8,68 +8,6 @@
#
esp_ble_mesh_defs.inc:line: WARNING: Duplicate C++ declaration, also defined at api-reference/bluetooth/esp-ble-mesh:line.
Declaration is '.. cpp:member:: uint16_t model_id'.
esp_bt_defs.inc:line: WARNING: Duplicate C declaration, also defined at api-reference/bluetooth/esp_blufi:line.
Declaration is '.. c:macro:: ESP_BD_ADDR_LEN'.
esp_bt_defs.inc:line: WARNING: Duplicate C++ declaration, also defined at api-reference/bluetooth/esp_blufi:line.
Declaration is '.. cpp:type:: uint8_t esp_bd_addr_t [ESP_BD_ADDR_LEN]'.
esp_hidd_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 C++ declaration: Expected identifier in nested name, got keyword: void [error at 4]
void() esp_hd_cb_t (esp_hidd_cb_event_t event, esp_hidd_cb_param_t *param)
----^
If typedef-like declaration:
Error in declarator
If declarator-id with parameters-and-qualifiers:
Invalid C++ declaration: Expected identifier in nested name. [error at 4]
void() esp_hd_cb_t (esp_hidd_cb_event_t event, esp_hidd_cb_param_t *param)
----^
If parenthesis in noptr-declarator:
Error in declarator or parameters-and-qualifiers
If pointer to member declarator:
Invalid C++ declaration: Expected identifier in nested name. [error at 5]
void() esp_hd_cb_t (esp_hidd_cb_event_t event, esp_hidd_cb_param_t *param)
-----^
If declarator-id:
Invalid C++ declaration: Expected identifier in nested name. [error at 5]
void() esp_hd_cb_t (esp_hidd_cb_event_t event, esp_hidd_cb_param_t *param)
-----^
If type alias or template alias:
Invalid C++ declaration: Expected identifier in nested name, got keyword: void [error at 4]
void() esp_hd_cb_t (esp_hidd_cb_event_t event, esp_hidd_cb_param_t *param)
----^
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 C++ declaration: 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 declarator-id with parameters-and-qualifiers:
Invalid C++ declaration: 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 C++ declaration: 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 C++ declaration: 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 C++ declaration: 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)
----^
rmt_encoder.inc:line: WARNING: Duplicate C++ declaration, also defined at api-reference/peripherals/rmt:line.
Declaration is '.. cpp:type:: struct rmt_encoder_t rmt_encoder_t'.
spi_master.inc:line: WARNING: Duplicate C++ declaration, also defined at api-reference/peripherals/spi_master:line.