Merge branch 'bugfix/ci_fail_warnings' into 'master'

Fail CI build on warnings

This allows developers to add CFLAGS for -Wno-error=XXX while developing, but before code passes the CI build then it must be warning-free.

See merge request !279
This commit is contained in:
Angus Gratton 2016-12-09 13:25:51 +08:00
commit f68e1c22ab
43 changed files with 120 additions and 310 deletions

View file

@ -134,9 +134,7 @@ esp_err_t esp_ota_write(esp_ota_handle_t handle, const void *data, size_t size)
esp_err_t esp_ota_end(esp_ota_handle_t handle)
{
esp_err_t ret;
ota_ops_entry_t *it;
size_t image_size;
for (it = LIST_FIRST(&s_ota_ops_entries_head); it != NULL; it = LIST_NEXT(it, entries)) {
if (it->handle == handle) {
// an ota handle need to be ended after erased and wrote data in it
@ -145,6 +143,8 @@ esp_err_t esp_ota_end(esp_ota_handle_t handle)
}
#ifdef CONFIG_SECUREBOOTLOADER
esp_err_t ret;
size_t image_size;
if (esp_image_basic_verify(it->part.address, &image_size) != ESP_OK) {
return ESP_ERR_OTA_VALIDATE_FAILED;
}
@ -286,12 +286,12 @@ static esp_err_t esp_rewrite_ota_data(esp_partition_subtype_t subtype)
esp_err_t esp_ota_set_boot_partition(const esp_partition_t *partition)
{
const esp_partition_t *find_partition = NULL;
size_t image_size;
if (partition == NULL) {
return ESP_ERR_INVALID_ARG;
}
#ifdef CONFIG_SECUREBOOTLOADER
size_t image_size;
if (esp_image_basic_verify(partition->address, &image_size) != ESP_OK) {
return ESP_ERR_OTA_VALIDATE_FAILED;
}

View file

@ -84,7 +84,6 @@ esp_err_t esp_ble_gap_start_scanning(uint32_t duration)
esp_err_t esp_ble_gap_stop_scanning(void)
{
btc_msg_t msg;
btc_ble_gap_args_t arg;
msg.sig = BTC_SIG_API_CALL;
msg.pid = BTC_PID_GAP_BLE;

View file

@ -62,18 +62,6 @@ static BOOLEAN bta_dm_check_av(UINT16 event);
static void bta_dm_bl_change_cback (tBTM_BL_EVENT_DATA *p_data);
#if BLE_INCLUDED == TRUE
static void bta_dm_acl_change_cback(BD_ADDR p_bda, DEV_CLASS p_dc,
BD_NAME p_bdn, UINT8 *features,
BOOLEAN is_new, UINT16 handle,
tBT_TRANSPORT transport);
#else
static void bta_dm_acl_change_cback(BD_ADDR p_bda, DEV_CLASS p_dc,
BD_NAME p_bdn, UINT8 *features,
BOOLEAN is_new);
#endif
static void bta_dm_policy_cback(tBTA_SYS_CONN_STATUS status, UINT8 id, UINT8 app_id, BD_ADDR peer_addr);
/* Extended Inquiry Response */
@ -1647,7 +1635,7 @@ void bta_dm_sdp_result (tBTA_DM_MSG *p_data)
if ( bta_dm_search_cb.p_sdp_db != NULL && bta_dm_search_cb.p_sdp_db->raw_used != 0 &&
bta_dm_search_cb.p_sdp_db->raw_data != NULL) {
APPL_TRACE_DEBUG(
"%s raw_data used = 0x%x raw_data_ptr = 0x%x", __func__,
"%s raw_data used = 0x%x raw_data_ptr = %p", __func__,
bta_dm_search_cb.p_sdp_db->raw_used,
bta_dm_search_cb.p_sdp_db->raw_data);
@ -1991,7 +1979,6 @@ static void bta_dm_find_services ( BD_ADDR bd_addr)
{
tSDP_UUID uuid;
UINT16 num_attrs = 1;
tBTA_DM_MSG *p_msg;
memset (&uuid, 0, sizeof(tSDP_UUID));
@ -2169,7 +2156,7 @@ static void bta_dm_discover_device(BD_ADDR remote_bd_addr)
bdcpy(bta_dm_search_cb.peer_bdaddr, remote_bd_addr);
APPL_TRACE_DEBUG("%s name_discover_done = %d p_btm_inq_info 0x%x state = %d, transport=%d",
APPL_TRACE_DEBUG("%s name_discover_done = %d p_btm_inq_info %p state = %d, transport=%d",
__func__,
bta_dm_search_cb.name_discover_done,
bta_dm_search_cb.p_btm_inq_info,
@ -2231,7 +2218,7 @@ static void bta_dm_discover_device(BD_ADDR remote_bd_addr)
#if (BLE_INCLUDED == TRUE && (defined BTA_GATT_INCLUDED) && (BTA_GATT_INCLUDED == TRUE))
if ( bta_dm_search_cb.p_btm_inq_info ) {
APPL_TRACE_DEBUG("%s p_btm_inq_info 0x%x results.device_type 0x%x services_to_search 0x%x",
APPL_TRACE_DEBUG("%s p_btm_inq_info %p results.device_type 0x%x services_to_search 0x%x",
__func__,
bta_dm_search_cb.p_btm_inq_info,
bta_dm_search_cb.p_btm_inq_info->results.device_type,
@ -2956,48 +2943,6 @@ static void bta_dm_bl_change_cback (tBTM_BL_EVENT_DATA *p_data)
}
/*******************************************************************************
**
** Function bta_dm_acl_change_cback
**
** Description Callback from btm when acl connection goes up or down
**
**
** Returns void
**
*******************************************************************************/
#if BLE_INCLUDED == TRUE
static void bta_dm_acl_change_cback(BD_ADDR p_bda, DEV_CLASS p_dc, BD_NAME p_bdn,
UINT8 *features, BOOLEAN is_new, UINT16 handle,
tBT_TRANSPORT transport)
#else
static void bta_dm_acl_change_cback(BD_ADDR p_bda, DEV_CLASS p_dc, BD_NAME p_bdn,
UINT8 *features, BOOLEAN is_new)
#endif
{
tBTA_DM_ACL_CHANGE *p_msg = (tBTA_DM_ACL_CHANGE *) GKI_getbuf(sizeof(tBTA_DM_ACL_CHANGE));
if (p_msg != NULL) {
memset(p_msg, 0, sizeof(tBTA_DM_ACL_CHANGE));
bdcpy(p_msg->bd_addr, p_bda);
p_msg->is_new = is_new;
#if BLE_INCLUDED == TRUE
p_msg->handle = handle;
p_msg->transport = transport;
#endif
/* This is collision case */
if (features != NULL) {
if ((features[0] == 0xFF) && !is_new) {
p_msg->event = BTM_BL_COLLISION_EVT;
}
}
p_msg->hdr.event = BTA_DM_ACL_CHANGE_EVT;
bta_sys_sendmsg(p_msg);
}
}
/*******************************************************************************
**
** Function bta_dm_rs_cback
@ -4018,7 +3963,7 @@ void bta_dm_encrypt_cback(BD_ADDR bd_addr, tBT_TRANSPORT transport, void *p_ref_
break;
}
APPL_TRACE_DEBUG("bta_dm_encrypt_cback status =%d p_callback=0x%x", bta_status, p_callback);
APPL_TRACE_DEBUG("bta_dm_encrypt_cback status =%d p_callback=%p", bta_status, p_callback);
if (p_callback) {
(*p_callback)(bd_addr, transport, bta_status);
@ -4150,8 +4095,6 @@ static UINT8 bta_dm_ble_smp_cback (tBTM_LE_EVT event, BD_ADDR bda, tBTM_LE_EVT_D
tBTM_STATUS status = BTM_SUCCESS;
tBTA_DM_SEC sec_event;
char *p_name = NULL;
UINT8 i;
tBT_DEVICE_TYPE dev_type;
if (!bta_dm_cb.p_sec_cback) {
return BTM_NOT_AUTHORIZED;
@ -5255,7 +5198,7 @@ static void bta_dm_gatt_disc_result(tBTA_GATT_ID service_id)
if ( bta_dm_search_cb.ble_raw_used + sizeof(tBTA_GATT_ID) < bta_dm_search_cb.ble_raw_size ) {
APPL_TRACE_DEBUG("ADDING BLE SERVICE uuid=0x%x, ble_ptr = 0x%x, ble_raw_used = 0x%x",
APPL_TRACE_DEBUG("ADDING BLE SERVICE uuid=0x%x, ble_ptr = %p, ble_raw_used = 0x%x",
service_id.uuid.uu.uuid16, bta_dm_search_cb.p_ble_rawdata, bta_dm_search_cb.ble_raw_used);
if (bta_dm_search_cb.p_ble_rawdata) {

View file

@ -337,7 +337,6 @@ static void bta_dm_pm_cback(tBTA_SYS_CONN_STATUS status, UINT8 id, UINT8 app_id,
{
UINT8 i, j;
UINT16 policy_setting;
UINT8 *p = NULL;
tBTA_DM_PEER_DEVICE *p_dev;

View file

@ -298,7 +298,6 @@ static void bta_create_ops_sdp_record(bluetooth_sdp_record *record, tSDP_DISC_RE
static void bta_create_sap_sdp_record(bluetooth_sdp_record *record, tSDP_DISC_REC *p_rec)
{
tSDP_DISCOVERY_DB *db = p_bta_sdp_cfg->p_sdp_db;
tSDP_DISC_ATTR *p_attr;
tSDP_PROTOCOL_ELEM pe;
UINT16 pversion = -1;

View file

@ -39,14 +39,18 @@ static void btc_sec_callback(tBTA_DM_SEC_EVT event, tBTA_DM_SEC *p_data)
}
}
static bt_status_t btc_enable_bluetooth(void)
static void btc_enable_bluetooth(void)
{
BTA_EnableBluetooth(btc_sec_callback);
if (BTA_EnableBluetooth(btc_sec_callback) != BTA_SUCCESS) {
future_ready(*btc_main_get_future_p(BTC_MAIN_ENABLE_FUTURE), FUTURE_SUCCESS);
}
}
static bt_status_t btc_disable_bluetooth(void)
static void btc_disable_bluetooth(void)
{
BTA_DisableBluetooth();
if (BTA_DisableBluetooth() != BTA_SUCCESS) {
future_ready(*btc_main_get_future_p(BTC_MAIN_DISABLE_FUTURE), FUTURE_SUCCESS);
}
}
void btc_init_callback(void)
@ -54,7 +58,7 @@ void btc_init_callback(void)
future_ready(*btc_main_get_future_p(BTC_MAIN_INIT_FUTURE), FUTURE_SUCCESS);
}
static bt_status_t btc_init_bluetooth(void)
static void btc_init_bluetooth(void)
{
bte_main_boot_entry(btc_init_callback);
}

View file

@ -56,7 +56,7 @@ static void btc_task(void *arg)
for (;;) {
if (pdTRUE == xQueueReceive(xBtcQueue, &msg, (portTickType)portMAX_DELAY)) {
LOG_DEBUG("%s msg %u %u %u %08x\n", __func__, msg.sig, msg.pid, msg.act, msg.arg);
LOG_DEBUG("%s msg %u %u %u %p\n", __func__, msg.sig, msg.pid, msg.act, msg.arg);
switch (msg.sig) {
case BTC_SIG_API_CALL:
profile_tab[msg.pid].btc_call(&msg);

View file

@ -34,8 +34,8 @@
#include "blufi_adv.h"
#include "blufi_int.h"
static uint8_t *success_msg = "BLUFI_CONFIG_OK";
static uint8_t *failed_msg = "BLUFI_CONFIG_FAILED";
const char success_msg[] = "BLUFI_CONFIG_OK";
const char failed_msg[] = "BLUFI_CONFIG_FAILED";
#define BTC_BLUFI_CB_TO_APP(_event, _param) ((esp_profile_cb_t)btc_profile_cb_get(BTC_PID_BLUFI))(_event, _param)
@ -145,7 +145,6 @@ static void blufi_profile_cb(tBTA_GATTS_EVT event, tBTA_GATTS *p_data)
{
tBTA_GATTS_RSP rsp;
tBT_UUID uuid = {LEN_UUID_16, {SVC_BLUFI_UUID}};
UINT8 len = 0;
UINT8 *p_rec_data = NULL;
tBTA_GATT_STATUS status;
@ -323,13 +322,13 @@ static void blufi_msg_notify(UINT8 *blufi_msg, UINT8 len)
static void btc_blufi_config_success(void)
{
LOG_DEBUG("config success\n");
blufi_msg_notify(success_msg, strlen(success_msg));
blufi_msg_notify((uint8_t *)success_msg, strlen(success_msg));
}
static void btc_blufi_config_failed(void)
{
LOG_DEBUG("config faield\n");
blufi_msg_notify(failed_msg, strlen(failed_msg));
blufi_msg_notify((uint8_t *)failed_msg, strlen(failed_msg));
}
void btc_blufi_cb_handler(btc_msg_t *msg)

View file

@ -287,7 +287,7 @@ static void btc_scan_rsp_data_callback(tBTA_STATUS status)
msg.sig = BTC_SIG_API_CB;
msg.pid = BTC_PID_GAP_BLE;
msg.act = ESP_GAP_BLE_SCAN_RSP_DATA_SET_COMPLETE_EVT;
param.adv_data_cmpl.status = status;
param.scan_rsp_data_cmpl.status = status;
ret = btc_transfer_context(&msg, &param,
sizeof(esp_ble_gap_cb_param_t), NULL);
@ -297,56 +297,21 @@ static void btc_scan_rsp_data_callback(tBTA_STATUS status)
}
}
static void btc_set_scan_param_callback(tGATT_IF client_if, tBTA_STATUS status )
{
esp_ble_gap_cb_param_t param;
bt_status_t ret;
btc_msg_t msg;
msg.sig = BTC_SIG_API_CB;
msg.pid = BTC_PID_GAP_BLE;
msg.act = ESP_GAP_BLE_SCAN_PARAM_SET_COMPLETE_EVT;
param.adv_data_cmpl.status = status;
ret = btc_transfer_context(&msg, &param,
sizeof(esp_ble_gap_cb_param_t), NULL);
if (ret != BT_STATUS_SUCCESS) {
LOG_ERROR("%s btc_transfer_context failed\n", __func__);
}
}
static void btc_ble_set_adv_data(esp_ble_adv_data_t *adv_data,
tBTA_SET_ADV_DATA_CMPL_CBACK p_adv_data_cback)
{
tBTA_BLE_AD_MASK data_mask = 0;
btc_to_bta_adv_data(adv_data, &gl_bta_adv_data, &data_mask);
if (!adv_data->set_scan_rsp) {
btc_to_bta_adv_data(adv_data, &gl_bta_adv_data, &data_mask);
BTA_DmBleSetAdvConfig(data_mask, &gl_bta_adv_data, p_adv_data_cback);
} else {
BTA_DmBleSetScanRsp(data_mask, &gl_bta_adv_data, p_adv_data_cback);
btc_to_bta_adv_data(adv_data, &gl_bta_scan_rsp_data, &data_mask);
BTA_DmBleSetScanRsp(data_mask, &gl_bta_scan_rsp_data, p_adv_data_cback);
}
}
static void btc_ble_set_scan_param(esp_ble_scan_params_t *ble_scan_params,
tBLE_SCAN_PARAM_SETUP_CBACK scan_param_setup_cback)
{
//tBTA_BLE_AD_MASK data_mask = 0;
BTA_DmSetBleScanParams (ESP_DEFAULT_GATT_IF,
ble_scan_params->scan_interval,
ble_scan_params->scan_window,
ble_scan_params->scan_type,
scan_param_setup_cback);
//btc_to_bta_adv_data(scan_rsp_data, &gl_bta_scan_rsp_data, &data_mask);
//BTA_DmBleSetScanRsp(data_mask, &gl_bta_scan_rsp_data, p_scan_rsp_data_cback);
}
void btc_ble_start_advertising (esp_ble_adv_params_t *ble_adv_params)
static void btc_ble_start_advertising (esp_ble_adv_params_t *ble_adv_params)
{
tBTA_DM_DISC disc_mode = 0;
tBTA_DM_CONN conn_mode = 0;
@ -421,20 +386,21 @@ static void btc_scan_params_callback(tGATT_IF gatt_if, tBTM_STATUS status)
}
}
static void btc_ble_set_scan_params(esp_ble_scan_params_t *scan_params,
tBLE_SCAN_PARAM_SETUP_CBACK scan_param_setup_cback)
static void btc_ble_set_scan_params(esp_ble_scan_params_t *scan_params, tBLE_SCAN_PARAM_SETUP_CBACK scan_param_setup_cback)
{
if (BLE_ISVALID_PARAM(scan_params->scan_interval, BTM_BLE_SCAN_INT_MIN, BTM_BLE_SCAN_INT_MAX) &&
BLE_ISVALID_PARAM(scan_params->scan_window, BTM_BLE_SCAN_WIN_MIN, BTM_BLE_SCAN_WIN_MAX) &&
(scan_params->scan_type == BTM_BLE_SCAN_MODE_ACTI || scan_params->scan_type == BTM_BLE_SCAN_MODE_PASS)) {
BTA_DmSetBleScanFilterParams(0 /*client_if*/,
BTA_DmSetBleScanFilterParams(ESP_DEFAULT_GATT_IF, /*client_if*/
scan_params->scan_interval,
scan_params->scan_window,
scan_params->scan_type,
scan_params->own_addr_type,
scan_params->scan_filter_policy,
scan_param_setup_cback);
}
} else {
btc_scan_params_callback(ESP_DEFAULT_GATT_IF, BTM_ILLEGAL_VALUE);
}
}
static void btc_search_callback(tBTA_DM_SEARCH_EVT event, tBTA_DM_SEARCH *p_data)
@ -647,7 +613,7 @@ void btc_gap_ble_call_handler(btc_msg_t *msg)
break;
}
case BTC_GAP_BLE_ACT_SET_SCAN_PARAM:
btc_ble_set_scan_param(&arg->set_scan_param.scan_params, btc_set_scan_param_callback);
btc_ble_set_scan_params(&arg->set_scan_param.scan_params, btc_scan_params_callback);
break;
case BTC_GAP_BLE_ACT_START_SCAN:
btc_ble_start_scanning(arg->start_scan.duration, btc_search_callback);

View file

@ -59,7 +59,7 @@ int uuidType(unsigned char *p_uuid)
return LEN_UUID_128;
}
int btc128_to_bta_uuid(tBT_UUID *p_dest, uint8_t *p_src)
void btc128_to_bta_uuid(tBT_UUID *p_dest, uint8_t *p_src)
{
int i = 0;

View file

@ -232,8 +232,6 @@ void btc_gatts_call_handler(btc_msg_t *msg)
}
case BTC_GATTS_ACT_OPEN: {
// Ensure device is in inquiry database
int addr_type = 0;
int device_type = 0;
tBTA_GATT_TRANSPORT transport = BTA_GATT_TRANSPORT_LE;
//TODO : implement address type and device type

View file

@ -21,7 +21,7 @@
#include "esp_gatt_defs.h"
#include "esp_gattc_api.h"
int btc128_to_bta_uuid(tBT_UUID *p_dest, uint8_t *p_src);
void btc128_to_bta_uuid(tBT_UUID *p_dest, uint8_t *p_src);
void btc_to_bta_uuid(tBT_UUID *p_dest, esp_bt_uuid_t *p_src);
void btc_to_bta_gatt_id(tBTA_GATT_ID *p_dest, esp_gatt_id_t *p_src);
void btc_to_bta_srvc_id(tBTA_GATT_SRVC_ID *p_dest, esp_gatt_srvc_id_t *p_src);

View file

@ -30,21 +30,21 @@ typedef struct {
static const interop_entry_t interop_database[] = {
// Nexus Remote (Spike)
// Note: May affect other Asus brand devices
{{0x08, 0x62, 0x66, 0, 0, 0}, 3, INTEROP_DISABLE_LE_SECURE_CONNECTIONS},
{{0x38, 0x2c, 0x4a, 0xc9, 0, 0}, 4, INTEROP_DISABLE_LE_SECURE_CONNECTIONS},
{{0x38, 0x2c, 0x4a, 0xe6, 0, 0}, 4, INTEROP_DISABLE_LE_SECURE_CONNECTIONS},
{{0x54, 0xa0, 0x50, 0xd9, 0, 0}, 4, INTEROP_DISABLE_LE_SECURE_CONNECTIONS},
{{0xac, 0x9e, 0x17, 0, 0, 0}, 3, INTEROP_DISABLE_LE_SECURE_CONNECTIONS},
{{0xf0, 0x79, 0x59, 0, 0, 0}, 3, INTEROP_DISABLE_LE_SECURE_CONNECTIONS},
{{{0x08, 0x62, 0x66, 0, 0, 0}}, 3, INTEROP_DISABLE_LE_SECURE_CONNECTIONS},
{{{0x38, 0x2c, 0x4a, 0xc9, 0, 0}}, 4, INTEROP_DISABLE_LE_SECURE_CONNECTIONS},
{{{0x38, 0x2c, 0x4a, 0xe6, 0, 0}}, 4, INTEROP_DISABLE_LE_SECURE_CONNECTIONS},
{{{0x54, 0xa0, 0x50, 0xd9, 0, 0}}, 4, INTEROP_DISABLE_LE_SECURE_CONNECTIONS},
{{{0xac, 0x9e, 0x17, 0, 0, 0}}, 3, INTEROP_DISABLE_LE_SECURE_CONNECTIONS},
{{{0xf0, 0x79, 0x59, 0, 0, 0}}, 3, INTEROP_DISABLE_LE_SECURE_CONNECTIONS},
// Motorola Key Link
{{0x1c, 0x96, 0x5a, 0, 0, 0}, 3, INTEROP_DISABLE_LE_SECURE_CONNECTIONS},
{{{0x1c, 0x96, 0x5a, 0, 0, 0}}, 3, INTEROP_DISABLE_LE_SECURE_CONNECTIONS},
// Flic smart button
{{0x80, 0xe4, 0xda, 0x70, 0, 0}, 4, INTEROP_DISABLE_LE_SECURE_CONNECTIONS},
{{{0x80, 0xe4, 0xda, 0x70, 0, 0}}, 4, INTEROP_DISABLE_LE_SECURE_CONNECTIONS},
// BMW car kits (Harman/Becker)
{{0x9c, 0xdf, 0x03, 0, 0, 0}, 3, INTEROP_AUTO_RETRY_PAIRING}
{{{0x9c, 0xdf, 0x03, 0, 0, 0}}, 3, INTEROP_AUTO_RETRY_PAIRING}
};
#endif /*_INTEROP_DATABASE_H_*/

View file

@ -89,11 +89,6 @@ static const packet_fragmenter_callbacks_t packet_fragmenter_callbacks;
static int hci_layer_init_env(void);
static void hci_layer_deinit_env(void);
static void hci_host_thread_handler(void *arg);
static int hci_send_async_command(bt_vendor_opcode_t opcode, void *param);
static void event_finish_startup(void *context);
static void firmware_config_callback(bool success);
static void event_postload(void);
static void sco_config_callback(bool success);
static void event_command_ready(fixed_queue_t *queue);
static void event_packet_ready(fixed_queue_t *queue);
static void restart_comamnd_waiting_response_timer(
@ -320,24 +315,8 @@ static void transmit_downward(uint16_t type, void *data)
hci_host_task_post();
}
// Postload functions
static void event_postload(void)
{
if (hci_send_async_command(BT_VND_OP_SCO_CFG, NULL) == -1) {
// If couldn't configure sco, we won't get the sco configuration callback
// so go pretend to do it now
sco_config_callback(false);
}
}
static void sco_config_callback(UNUSED_ATTR bool success)
{
LOG_INFO("%s postload finished.", __func__);
}
// Command/packet transmitting functions
static void event_command_ready(fixed_queue_t *queue)
{
waiting_command_t *wait_entry = NULL;
@ -594,10 +573,6 @@ static waiting_command_t *get_waiting_command(command_opcode_t opcode)
return NULL;
}
static int hci_send_async_command(bt_vendor_opcode_t opcode, void *param)
{
}
static void init_layer_interface()
{
if (!interface_created) {

View file

@ -28,7 +28,7 @@
#include "freertos/xtensa_api.h"
#include "rom/ets_sys.h"
#define RTC_TIMER_TICKS_TO_MS(ticks) ((ticks/625)<<1 + (ticks-(ticks/625)*625)/312)
#define RTC_TIMER_TICKS_TO_MS(ticks) (((ticks/625)<<1) + (ticks-(ticks/625)*625)/312)
#define BT_ALARM_START_WAIT_TICKS 100
@ -49,7 +49,7 @@ static struct alarm_t *alarm_cbs_lookfor_available(void)
for (i = 0; i < ALARM_CBS_NUM; i++) {
if (alarm_cbs[i].alarm_hdl == NULL) { //available
LOG_DEBUG(">>>> %d %08x<<<<\n", i, &alarm_cbs[i]);
LOG_DEBUG("%s %d %p\n", __func__, i, &alarm_cbs[i]);
return &alarm_cbs[i];
}
}
@ -67,7 +67,7 @@ static void alarm_cb_handler(TimerHandle_t xTimer)
}
alarm = pvTimerGetTimerID(xTimer);
LOG_DEBUG("TimerID %08x, Name %s\n", alarm, pcTimerGetTimerName(xTimer));
LOG_DEBUG("TimerID %p, Name %s\n", alarm, pcTimerGetTimerName(xTimer));
if (alarm->cb) {
alarm->cb(alarm->cb_data);
}

View file

@ -651,7 +651,6 @@ void BTM_ReadDevInfo (BD_ADDR remote_bda, tBT_DEVICE_TYPE *p_dev_type, tBLE_ADDR
BOOLEAN BTM_ReadConnectedTransportAddress(BD_ADDR remote_bda, tBT_TRANSPORT transport)
{
tBTM_SEC_DEV_REC *p_dev_rec = btm_find_dev(remote_bda);
tACL_CONN *p = btm_bda_to_acl(remote_bda, transport);
/* if no device can be located, return */
if (p_dev_rec == NULL) {
@ -1392,58 +1391,6 @@ void btm_ble_link_encrypted(BD_ADDR bd_addr, UINT8 encr_enable)
gatt_notify_enc_cmpl(p_dev_rec->ble.pseudo_addr);
}
/*******************************************************************************
** Function btm_enc_proc_ltk
** Description send LTK reply when it's ready.
*******************************************************************************/
static void btm_enc_proc_ltk(tSMP_ENC *p)
{
UINT8 i;
BTM_TRACE_DEBUG ("btm_enc_proc_ltk");
if (p && p->param_len == BT_OCTET16_LEN) {
for (i = 0; i < (BT_OCTET16_LEN - btm_cb.key_size); i ++) {
p->param_buf[BT_OCTET16_LEN - i - 1] = 0;
}
btsnd_hcic_ble_ltk_req_reply(btm_cb.enc_handle, p->param_buf);
}
}
/*******************************************************************************
** Function btm_enc_proc_slave_y
** Description calculate LTK when Y is ready
*******************************************************************************/
static void btm_enc_proc_slave_y(tSMP_ENC *p)
{
UINT16 div, y;
UINT8 *pp = p->param_buf;
tBTM_CB *p_cb = &btm_cb;
tSMP_ENC output;
tBTM_SEC_DEV_REC *p_dev_rec;
BTM_TRACE_DEBUG ("btm_enc_proc_slave_y");
if (p != NULL) {
STREAM_TO_UINT16(y, pp);
div = p_cb->ediv ^ y;
p_dev_rec = btm_find_dev_by_handle (p_cb->enc_handle);
if ( p_dev_rec &&
p_dev_rec->ble.keys.div == div ) {
BTM_TRACE_DEBUG ("LTK request OK");
/* calculating LTK , LTK = E er(div) */
SMP_Encrypt(p_cb->devcb.ble_encryption_key_value, BT_OCTET16_LEN, (UINT8 *)&div, 2, &output);
btm_enc_proc_ltk(&output);
} else {
BTM_TRACE_DEBUG ("LTK request failed - send negative reply");
btsnd_hcic_ble_ltk_req_neg_reply(p_cb->enc_handle);
if (p_dev_rec) {
btm_ble_link_encrypted(p_dev_rec->bd_addr, 0);
}
}
}
}
/*******************************************************************************
**
** Function btm_ble_ltk_request_reply
@ -1458,7 +1405,6 @@ void btm_ble_ltk_request_reply(BD_ADDR bda, BOOLEAN use_stk, BT_OCTET16 stk)
{
tBTM_SEC_DEV_REC *p_rec = btm_find_dev (bda);
tBTM_CB *p_cb = &btm_cb;
tSMP_ENC output;
if (p_rec == NULL) {
BTM_TRACE_ERROR("btm_ble_ltk_request_reply received for unknown device");
@ -1855,7 +1801,7 @@ UINT8 btm_proc_smp_cback(tSMP_EVT event, BD_ADDR bd_addr, tSMP_EVT_DATA *p_data)
case SMP_COMPLT_EVT:
if (btm_cb.api.p_le_callback) {
/* the callback function implementation may change the IO capability... */
BTM_TRACE_DEBUG ("btm_cb.api.p_le_callback=0x%x", btm_cb.api.p_le_callback );
BTM_TRACE_DEBUG ("btm_cb.api.p_le_callback=%p", btm_cb.api.p_le_callback );
(*btm_cb.api.p_le_callback) (event, bd_addr, (tBTM_LE_EVT_DATA *)p_data);
}
@ -1975,7 +1921,7 @@ BOOLEAN BTM_BleDataSignature (BD_ADDR bd_addr, UINT8 *p_text, UINT16 len,
btm_ble_increment_sign_ctr(bd_addr, TRUE);
}
BTM_TRACE_DEBUG("%s p_mac = %d", __func__, p_mac);
BTM_TRACE_DEBUG("%s p_mac = %p", __func__, p_mac);
BTM_TRACE_DEBUG("p_mac[0] = 0x%02x p_mac[1] = 0x%02x p_mac[2] = 0x%02x p_mac[3] = 0x%02x",
*p_mac, *(p_mac + 1), *(p_mac + 2), *(p_mac + 3));
BTM_TRACE_DEBUG("p_mac[4] = 0x%02x p_mac[5] = 0x%02x p_mac[6] = 0x%02x p_mac[7] = 0x%02x",

View file

@ -118,7 +118,7 @@ void btm_ble_advfilt_enq_op_q(UINT8 action, UINT8 ocf, tBTM_BLE_FILT_CB_EVT cb_e
btm_ble_adv_filt_cb.op_q.p_scan_cfg_cback[btm_ble_adv_filt_cb.op_q.next_idx] = p_cmpl_cback;
btm_ble_adv_filt_cb.op_q.p_filt_param_cback[btm_ble_adv_filt_cb.op_q.next_idx]
= p_filt_param_cback;
BTM_TRACE_DEBUG("btm_ble_advfilt_enq_op_q: act_ocf:%d, action:%d, ocf:%d,cb_evt;%d, cback:%x",
BTM_TRACE_DEBUG("btm_ble_advfilt_enq_op_q: act_ocf:%d, action:%d, ocf:%d,cb_evt;%d, cback:%p",
btm_ble_adv_filt_cb.op_q.action_ocf[btm_ble_adv_filt_cb.op_q.next_idx], action,
ocf, cb_evt, p_cmpl_cback);
btm_ble_adv_filt_cb.op_q.next_idx = (btm_ble_adv_filt_cb.op_q.next_idx + 1)

View file

@ -59,7 +59,7 @@ void btm_ble_cont_energy_cmpl_cback (tBTM_VSC_CMPL *p_params)
STREAM_TO_UINT32(total_idle_time, p);
STREAM_TO_UINT32(total_energy_used, p);
BTM_TRACE_DEBUG("energy_info status=%d,tx_t=%ld, rx_t=%ld, ener_used=%ld, idle_t=%ld",
BTM_TRACE_DEBUG("energy_info status=%d,tx_t=%u, rx_t=%u, ener_used=%u, idle_t=%u",
status, total_tx_time, total_rx_time, total_energy_used, total_idle_time);
if (NULL != ble_energy_info_cb.p_ener_cback)

View file

@ -474,6 +474,7 @@ tBTM_STATUS BTM_BleBroadcast(BOOLEAN start)
return status;
}
#if BLE_VND_INCLUDED == TRUE
/*******************************************************************************
**
** Function btm_vsc_brcm_features_complete
@ -485,7 +486,6 @@ tBTM_STATUS BTM_BleBroadcast(BOOLEAN start)
*******************************************************************************/
static void btm_ble_vendor_capability_vsc_cmpl_cback (tBTM_VSC_CMPL *p_vcs_cplt_params)
{
#if BLE_VND_INCLUDED == TRUE
UINT8 status = 0xFF;
UINT8 *p;
@ -549,8 +549,8 @@ static void btm_ble_vendor_capability_vsc_cmpl_cback (tBTM_VSC_CMPL *p_vcs_cplt_
if (p_ctrl_le_feature_rd_cmpl_cback != NULL) {
p_ctrl_le_feature_rd_cmpl_cback(status);
}
#endif
}
#endif
/*******************************************************************************
**
@ -1064,7 +1064,6 @@ tBTM_STATUS BTM_BleSetAdvParamsStartAdv(UINT16 adv_int_min, UINT16 adv_int_max,
{
tBTM_LE_RANDOM_CB *p_addr_cb = &btm_cb.ble_ctr_cb.addr_mgnt_cb;
tBTM_BLE_INQ_CB *p_cb = &btm_cb.ble_ctr_cb.inq_var;
tBTM_STATUS status = BTM_SUCCESS;
BTM_TRACE_EVENT ("BTM_BleSetAdvParamsStartAdv\n");
@ -1103,7 +1102,7 @@ tBTM_STATUS BTM_BleSetAdvParamsStartAdv(UINT16 adv_int_min, UINT16 adv_int_max,
chnl_map,
p_cb->afp);
btm_ble_start_adv();
return btm_ble_start_adv();
}

View file

@ -462,7 +462,6 @@ void btm_consolidate_dev(tBTM_SEC_DEV_REC *p_target_rec)
#if BLE_INCLUDED == TRUE
tBTM_SEC_DEV_REC *p_dev_rec = &btm_cb.sec_dev_rec[0];
tBTM_SEC_DEV_REC temp_rec = *p_target_rec;
BD_ADDR dummy_bda = {0};
BTM_TRACE_DEBUG("%s\n", __func__);

View file

@ -261,9 +261,6 @@ void btm_dev_timeout (TIMER_LIST_ENT *p_tle)
*******************************************************************************/
static void btm_decode_ext_features_page (UINT8 page_number, const UINT8 *p_features)
{
UINT8 last;
UINT8 first;
BTM_TRACE_DEBUG ("btm_decode_ext_features_page page: %d", page_number);
switch (page_number) {
/* Extended (Legacy) Page 0 */

View file

@ -103,10 +103,8 @@ static UINT16 btm_sec_set_serv_level4_flags (UINT16 cur_security, BOOLEAN is_or
static BOOLEAN btm_sec_queue_encrypt_request (BD_ADDR bd_addr, tBT_TRANSPORT transport,
tBTM_SEC_CALLBACK *p_callback, void *p_ref_data);
static void btm_sec_clean_pending_req_queue (BD_ADDR remote_bda, tBT_TRANSPORT transport) ;
static void btm_sec_check_pending_enc_req (tBTM_SEC_DEV_REC *p_dev_rec, tBT_TRANSPORT transport,
UINT8 encr_enable);
static BOOLEAN btm_sec_acceptor_rejects_bonding (tBTM_SEC_DEV_REC *p_dev_rec);
static BOOLEAN btm_sec_use_smp_br_chnl(tBTM_SEC_DEV_REC *p_dev_rec);
static BOOLEAN btm_sec_is_master(tBTM_SEC_DEV_REC *p_dev_rec);
@ -2050,11 +2048,11 @@ tBTM_STATUS btm_sec_l2cap_access_req (BD_ADDR bd_addr, UINT16 psm, UINT16 handle
is_originator = FALSE;
}
BTM_TRACE_DEBUG ("%s() conn_type: 0x%x, 0x%x\n", __func__, conn_type, p_ref_data);
BTM_TRACE_DEBUG ("%s() conn_type: 0x%x, %p\n", __func__, conn_type, p_ref_data);
#else
is_originator = conn_type;
BTM_TRACE_DEBUG ("%s() is_originator:%d, 0x%x\n", __func__, is_originator, p_ref_data);
BTM_TRACE_DEBUG ("%s() is_originator:%d, %p\n", __func__, is_originator, p_ref_data);
#endif
/* Find or get oldest record */
@ -2932,7 +2930,7 @@ void btm_sec_rmt_name_request_complete (UINT8 *p_bd_addr, UINT8 *p_bd_name, UINT
}
if (p_dev_rec) {
BTM_TRACE_EVENT ("Security Manager: rmt_name_complete PairState: %s RemName: %s status: %d State:%d p_dev_rec: 0x%08x \n",
BTM_TRACE_EVENT ("Security Manager: rmt_name_complete PairState: %s RemName: %s status: %d State:%d p_dev_rec: %p \n",
btm_pair_state_descr (btm_cb.pairing_state), p_bd_name,
status, p_dev_rec->sec_state, p_dev_rec);
} else {
@ -2981,7 +2979,7 @@ void btm_sec_rmt_name_request_complete (UINT8 *p_bd_addr, UINT8 *p_bd_name, UINT
/* If we were delaying asking UI for a PIN because name was not resolved, ask now */
if ( (btm_cb.pairing_state == BTM_PAIR_STATE_WAIT_LOCAL_PIN) && p_bd_addr
&& (memcmp (btm_cb.pairing_bda, p_bd_addr, BD_ADDR_LEN) == 0) ) {
BTM_TRACE_EVENT ("btm_sec_rmt_name_request_complete() delayed pin now being requested flags:0x%x, (p_pin_callback=0x%p)\n", btm_cb.pairing_flags, btm_cb.api.p_pin_callback);
BTM_TRACE_EVENT ("btm_sec_rmt_name_request_complete() delayed pin now being requested flags:0x%x, (p_pin_callback=%p)\n", btm_cb.pairing_flags, btm_cb.api.p_pin_callback);
if (((btm_cb.pairing_flags & BTM_PAIR_FLAGS_WE_STARTED_DD) == 0) &&
((btm_cb.pairing_flags & BTM_PAIR_FLAGS_PIN_REQD) == 0) &&
@ -3194,7 +3192,7 @@ void btm_io_capabilities_req (UINT8 *p)
p_dev_rec->sm4 |= BTM_SM4_TRUE;
BTM_TRACE_EVENT("%s: State: %s Flags: 0x%04x p_cur_service: 0x%08x\n",
BTM_TRACE_EVENT("%s: State: %s Flags: 0x%04x p_cur_service: %p\n",
__FUNCTION__, btm_pair_state_descr(btm_cb.pairing_state),
btm_cb.pairing_flags, p_dev_rec->p_cur_service);
@ -4939,7 +4937,7 @@ void btm_sec_pin_code_request (UINT8 *p_bda)
|| (!p_dev_rec->is_originator
&& ((p_dev_rec->dev_class[1] & BTM_COD_MAJOR_CLASS_MASK) == BTM_COD_MAJOR_PERIPHERAL)
&& (p_dev_rec->dev_class[2] & BTM_COD_MINOR_KEYBOARD)) ) {
BTM_TRACE_WARNING("btm_sec_pin_code_request(): Pairing disabled:%d; PIN callback:%x, Dev Rec:%x!\n",
BTM_TRACE_WARNING("btm_sec_pin_code_request(): Pairing disabled:%d; PIN callback:%p, Dev Rec:%p!\n",
p_cb->pairing_disabled, p_cb->api.p_pin_callback, p_dev_rec);
btsnd_hcic_pin_code_neg_reply (p_bda);
@ -5821,36 +5819,6 @@ void btm_sec_set_peer_sec_caps(tACL_CONN *p_acl_cb, tBTM_SEC_DEV_REC *p_dev_rec)
}
}
/*******************************************************************************
**
** Function btm_sec_clean_pending_req_queue
**
** Description This function cleans up the pending security request when the
** link to the target device dropped.
**
** Returns void
**
*******************************************************************************/
static void btm_sec_clean_pending_req_queue (BD_ADDR remote_bda, tBT_TRANSPORT transport)
{
tBTM_SEC_QUEUE_ENTRY *p_e;
BUFFER_Q *bq = &btm_cb.sec_pending_q;
p_e = (tBTM_SEC_QUEUE_ENTRY *)GKI_getfirst(bq);
if (p_e != NULL) {
if (memcmp(p_e->bd_addr, remote_bda, BD_ADDR_LEN) == 0
#if BLE_INCLUDED == TRUE
&& p_e->transport == transport
#endif
) {
(*p_e->p_callback) (remote_bda, transport, p_e->p_ref_data, BTM_ERR_PROCESSING);
GKI_remove_from_queue(bq, (void *)p_e);
}
p_e = (tBTM_SEC_QUEUE_ENTRY *) GKI_getnext ((void *)p_e);
}
}
/*******************************************************************************
**
** Function btm_sec_is_serv_level0

View file

@ -127,7 +127,7 @@ UINT16 GAP_ConnOpen (char *p_serv_name, UINT8 service_id, BOOLEAN is_server,
{
tGAP_CCB *p_ccb;
UINT16 cid;
tBT_UUID bt_uuid = {2, {GAP_PROTOCOL_ID}};
//tBT_UUID bt_uuid = {2, {GAP_PROTOCOL_ID}};
GAP_TRACE_EVENT ("GAP_CONN - Open Request");
@ -718,7 +718,7 @@ static void gap_connect_ind (BD_ADDR bd_addr, UINT16 l2cap_cid, UINT16 psm, UIN
{
UINT16 xx;
tGAP_CCB *p_ccb;
tBT_UUID bt_uuid = {2, {GAP_PROTOCOL_ID}};
//tBT_UUID bt_uuid = {2, {GAP_PROTOCOL_ID}};
/* See if we have a CCB listening for the connection */
for (xx = 0, p_ccb = gap_cb.conn.ccb_pool; xx < GAP_MAX_CONNECTIONS; xx++, p_ccb++) {

View file

@ -477,7 +477,6 @@ static void gatt_cl_start_config_ccc(tGATT_PROFILE_CLCB *p_clcb)
*******************************************************************************/
void GATT_ConfigServiceChangeCCC (BD_ADDR remote_bda, BOOLEAN enable, tBT_TRANSPORT transport)
{
UINT16 conn_id = GATT_INVALID_CONN_ID;
tGATT_PROFILE_CLCB *p_clcb = gatt_profile_find_clcb_by_bd_addr (remote_bda, transport);
if (p_clcb == NULL) {

View file

@ -920,7 +920,7 @@ void gatt_process_read_rsp(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8 op_code,
gatt_end_operation(p_clcb, GATT_SUCCESS, (void *)p_clcb->p_attr_buf);
}
} else { /* exception, should not happen */
GATT_TRACE_ERROR("attr offset = %d p_attr_buf = %d ", offset, p_clcb->p_attr_buf);
GATT_TRACE_ERROR("attr offset = %d p_attr_buf = %p ", offset, p_clcb->p_attr_buf);
gatt_end_operation(p_clcb, GATT_NO_RESOURCES, (void *)p_clcb->p_attr_buf);
}
}

View file

@ -96,7 +96,7 @@ void gatt_dequeue_sr_cmd (tGATT_TCB *p_tcb)
/* Double check in case any buffers are queued */
GATT_TRACE_DEBUG("gatt_dequeue_sr_cmd" );
if (p_tcb->sr_cmd.p_rsp_msg) {
GATT_TRACE_ERROR("free p_tcb->sr_cmd.p_rsp_msg = %d", p_tcb->sr_cmd.p_rsp_msg);
GATT_TRACE_ERROR("%s free msg %p", __func__, p_tcb->sr_cmd.p_rsp_msg);
GKI_freebuf (p_tcb->sr_cmd.p_rsp_msg);
}

View file

@ -228,7 +228,7 @@ UINT16 L2CA_ErtmConnectReq (UINT16 psm, BD_ADDR p_bd_addr, tL2CAP_ERTM_INFO *p_e
tL2C_RCB *p_rcb;
//counter_add("l2cap.conn.req", 1);
L2CAP_TRACE_API ("L2CA_ErtmConnectReq() PSM: 0x%04x BDA: %08x%04x p_ertm_info: 0x%08x allowed:0x%x preferred:%d", psm,
L2CAP_TRACE_API ("L2CA_ErtmConnectReq() PSM: 0x%04x BDA: %08x%04x p_ertm_info: %p allowed:0x%x preferred:%d", psm,
(p_bd_addr[0] << 24) + (p_bd_addr[1] << 16) + (p_bd_addr[2] << 8) + p_bd_addr[3],
(p_bd_addr[4] << 8) + p_bd_addr[5], p_ertm_info,
(p_ertm_info) ? p_ertm_info->allowed_modes : 0,
@ -252,7 +252,7 @@ UINT16 L2CA_ErtmConnectReq (UINT16 psm, BD_ADDR p_bd_addr, tL2CAP_ERTM_INFO *p_e
if ( ((p_lcb = l2cu_allocate_lcb (p_bd_addr, FALSE, BT_TRANSPORT_BR_EDR)) == NULL)
/* currently use BR/EDR for ERTM mode l2cap connection */
|| (l2cu_create_conn(p_lcb, BT_TRANSPORT_BR_EDR) == FALSE) ) {
L2CAP_TRACE_WARNING ("L2CAP - conn not started for PSM: 0x%04x p_lcb: 0x%08x", psm, p_lcb);
L2CAP_TRACE_WARNING ("L2CAP - conn not started for PSM: 0x%04x p_lcb: %p", psm, p_lcb);
return (0);
}
}
@ -390,7 +390,7 @@ BOOLEAN L2CA_ErtmConnectRsp (BD_ADDR p_bd_addr, UINT8 id, UINT16 lcid, UINT16 re
tL2C_CCB *p_ccb;
//counter_add("l2cap.conn.rsp", 1);
L2CAP_TRACE_API ("L2CA_ErtmConnectRsp() CID: 0x%04x Result: %d Status: %d BDA: %08x%04x p_ertm_info:0x%08x",
L2CAP_TRACE_API ("L2CA_ErtmConnectRsp() CID: 0x%04x Result: %d Status: %d BDA: %08x%04x p_ertm_info:%p",
lcid, result, status,
(p_bd_addr[0] << 24) + (p_bd_addr[1] << 16) + (p_bd_addr[2] << 8) + p_bd_addr[3],
(p_bd_addr[4] << 8) + p_bd_addr[5], p_ertm_info);
@ -1824,7 +1824,7 @@ UINT16 L2CA_FlushChannel (UINT16 lcid, UINT16 num_to_flush)
}
if (num_to_flush != L2CAP_FLUSH_CHANS_GET) {
L2CAP_TRACE_API ("L2CA_FlushChannel (FLUSH) CID: 0x%04x NumToFlush: %d QC: %u pFirst: 0x%08x",
L2CAP_TRACE_API ("L2CA_FlushChannel (FLUSH) CID: 0x%04x NumToFlush: %d QC: %u pFirst: %p",
lcid, num_to_flush, GKI_queue_length(&p_ccb->xmit_hold_q), GKI_getfirst(&p_ccb->xmit_hold_q));
} else {
L2CAP_TRACE_API ("L2CA_FlushChannel (QUERY) CID: 0x%04x", lcid);

View file

@ -257,7 +257,6 @@ void l2cble_notify_le_connection (BD_ADDR bda)
void l2cble_scanner_conn_comp (UINT16 handle, BD_ADDR bda, tBLE_ADDR_TYPE type,
UINT16 conn_interval, UINT16 conn_latency, UINT16 conn_timeout)
{
int i;
tL2C_LCB *p_lcb;
tBTM_SEC_DEV_REC *p_dev_rec = btm_find_or_alloc_dev (bda);
@ -358,7 +357,6 @@ void l2cble_scanner_conn_comp (UINT16 handle, BD_ADDR bda, tBLE_ADDR_TYPE type,
void l2cble_advertiser_conn_comp (UINT16 handle, BD_ADDR bda, tBLE_ADDR_TYPE type,
UINT16 conn_interval, UINT16 conn_latency, UINT16 conn_timeout)
{
int i;
tL2C_LCB *p_lcb;
tBTM_SEC_DEV_REC *p_dev_rec;
UNUSED(type);
@ -456,7 +454,6 @@ void l2cble_conn_comp(UINT16 handle, UINT8 role, BD_ADDR bda, tBLE_ADDR_TYPE typ
static void l2cble_start_conn_update (tL2C_LCB *p_lcb)
{
UINT16 min_conn_int, max_conn_int, slave_latency, supervision_tout;
tBTM_SEC_DEV_REC *p_dev_rec = btm_find_or_alloc_dev(p_lcb->remote_bd_addr);
tACL_CONN *p_acl_cb = btm_bda_to_acl(p_lcb->remote_bd_addr, BT_TRANSPORT_LE);
if (p_lcb->conn_update_mask & L2C_BLE_UPDATE_PENDING) {

View file

@ -1255,7 +1255,7 @@ static void process_stream_frame (tL2C_CCB *p_ccb, BT_HDR *p_buf)
/* Check if tx-sequence is the expected one */
if (tx_seq != p_ccb->fcrb.next_seq_expected) {
L2CAP_TRACE_WARNING ("Rx L2CAP PDU: CID: 0x%04x Lost frames Exp: %u Got: %u p_rx_sdu: 0x%08x",
L2CAP_TRACE_WARNING ("Rx L2CAP PDU: CID: 0x%04x Lost frames Exp: %u Got: %u p_rx_sdu: %p",
p_ccb->local_cid, p_ccb->fcrb.next_seq_expected, tx_seq, p_ccb->fcrb.p_rx_sdu);
/* Lost one or more packets, so flush the SAR queue */

View file

@ -280,7 +280,7 @@ void l2c_link_sec_comp (BD_ADDR p_bda, tBT_TRANSPORT transport, void *p_ref_data
UNUSED(transport);
L2CAP_TRACE_DEBUG ("l2c_link_sec_comp: %d, 0x%x", status, p_ref_data);
L2CAP_TRACE_DEBUG ("l2c_link_sec_comp: %d, %p", status, p_ref_data);
if (status == BTM_SUCCESS_NO_SECURITY) {
status = BTM_SUCCESS;

View file

@ -1192,7 +1192,7 @@ void l2cu_enqueue_ccb (tL2C_CCB *p_ccb)
}
if ( (!p_ccb->in_use) || (p_q == NULL) ) {
L2CAP_TRACE_ERROR ("l2cu_enqueue_ccb CID: 0x%04x ERROR in_use: %u p_lcb: 0x%08x",
L2CAP_TRACE_ERROR ("l2cu_enqueue_ccb CID: 0x%04x ERROR in_use: %u p_lcb: %p",
p_ccb->local_cid, p_ccb->in_use, p_ccb->p_lcb);
return;
}
@ -1278,7 +1278,7 @@ void l2cu_dequeue_ccb (tL2C_CCB *p_ccb)
}
if ( (!p_ccb->in_use) || (p_q == NULL) || (p_q->p_first_ccb == NULL) ) {
L2CAP_TRACE_ERROR ("l2cu_dequeue_ccb CID: 0x%04x ERROR in_use: %u p_lcb: 0x%08x p_q: 0x%08x p_q->p_first_ccb: 0x%08x",
L2CAP_TRACE_ERROR ("l2cu_dequeue_ccb CID: 0x%04x ERROR in_use: %u p_lcb: %p p_q: %p p_q->p_first_ccb: %p",
p_ccb->local_cid, p_ccb->in_use, p_ccb->p_lcb, p_q, p_q ? p_q->p_first_ccb : 0);
return;
}
@ -2423,7 +2423,7 @@ void l2cu_resubmit_pending_sec_req (BD_ADDR p_bda)
tL2C_CCB *p_next_ccb;
int xx;
L2CAP_TRACE_DEBUG ("l2cu_resubmit_pending_sec_req p_bda: 0x%08x", p_bda);
L2CAP_TRACE_DEBUG ("l2cu_resubmit_pending_sec_req p_bda: %p", p_bda);
/* If we are called with a BDA, only resubmit for that BDA */
if (p_bda) {

View file

@ -398,6 +398,8 @@ BOOLEAN SDP_FindServiceUUIDInRec(tSDP_DISC_REC *p_rec, tBT_UUID *p_uuid)
p_attr = p_attr->p_next_attr;
}
return FALSE;
#else
return FALSE;
#endif
}
@ -451,6 +453,8 @@ BOOLEAN SDP_FindServiceUUIDInRec_128bit(tSDP_DISC_REC *p_rec, tBT_UUID *p_uuid)
p_attr = p_attr->p_next_attr;
}
return FALSE;
#else
return FALSE;
#endif
}
@ -935,6 +939,7 @@ UINT8 SDP_GetNumDiRecords( tSDP_DISCOVERY_DB *p_db )
#endif
}
#if SDP_CLIENT_ENABLED == TRUE
/*******************************************************************************
**
** Function SDP_AttrStringCopy
@ -960,6 +965,7 @@ static void SDP_AttrStringCopy(char *dst, tSDP_DISC_ATTR *p_attr, UINT16 dst_siz
dst[0] = '\0';
}
}
#endif
/*******************************************************************************
**

View file

@ -914,9 +914,9 @@ BOOLEAN SDP_DeleteAttribute (UINT32 handle, UINT16 attr_id)
#if (SDP_RAW_DATA_INCLUDED == TRUE)
INT32 SDP_ReadRecord(UINT32 handle, UINT8 *p_data, INT32 *p_data_len)
{
INT32 len = 0; /* Number of bytes in the entry */
INT32 offset = -1; /* default to not found */
#if SDP_SERVER_ENABLED == TRUE
INT32 len = 0; /* Number of bytes in the entry */
tSDP_RECORD *p_rec;
UINT16 start = 0;
UINT16 end = 0xffff;

View file

@ -154,7 +154,7 @@ static BOOLEAN cmac_aes_k_calculate(BT_OCTET16 key, UINT8 *p_signature, UINT16 t
p_mac = output.param_buf + (BT_OCTET16_LEN - tlen);
memcpy(p_signature, p_mac, tlen);
SMP_TRACE_DEBUG("tlen = %d p_mac = %d", tlen, p_mac);
SMP_TRACE_DEBUG("tlen = %d p_mac = %p", tlen, p_mac);
SMP_TRACE_DEBUG("p_mac[0] = 0x%02x p_mac[1] = 0x%02x p_mac[2] = 0x%02x p_mac[3] = 0x%02x",
*p_mac, *(p_mac + 1), *(p_mac + 2), *(p_mac + 3));
SMP_TRACE_DEBUG("p_mac[4] = 0x%02x p_mac[5] = 0x%02x p_mac[6] = 0x%02x p_mac[7] = 0x%02x",

View file

@ -30,8 +30,6 @@ COMPONENT_ADD_INCLUDEDIRS := bluedroid/bta/include \
bluedroid/include \
include
CFLAGS += -Wno-error=unused-label -Wno-error=return-type -Wno-error=missing-braces -Wno-error=pointer-sign -Wno-error=parentheses -Wno-error=format
LIBS := btdm_app
COMPONENT_ADD_LDFLAGS := -lbt -L $(COMPONENT_PATH)/lib \
@ -70,8 +68,6 @@ COMPONENT_SRCDIRS := bluedroid/bta/dm \
bluedroid \
.
include $(IDF_PATH)/make/component_common.mk
ALL_LIB_FILES := $(patsubst %,$(COMPONENT_PATH)/lib/lib%.a,$(LIBS))
$(COMPONENT_LIBRARY): $(ALL_LIB_FILES)

View file

@ -6,5 +6,7 @@ COMPONENT_ADD_INCLUDEDIRS := include/lwip include/lwip/port include/lwip/posix
COMPONENT_SRCDIRS := api apps/sntp apps core/ipv4 core/ipv6 core netif port/freertos port/netif port
CFLAGS += -Wno-address -Wno-unused-variable -Wno-unused-but-set-variable
CFLAGS += -Wno-address # lots of LWIP source files evaluate macros that check address of stack variables
api/tcpip.o apps/dhcpserver.o: CFLAGS += -Wno-unused-variable
apps/dhcpserver.o core/pbuf.o core/tcp_in.o: CFLAGS += -Wno-unused-but-set-variable

View file

@ -244,7 +244,12 @@ The following variables can be set inside ``component.mk`` to control the build
settings. Component-specific additions can be made via ``CXXFLAGS
+=``. It is also possible (although not recommended) to override
this variable completely for a component.
- ``FLAGS_basename`` allows you to set compilation flags to apply to a single source file only. For example, this can useful for disabling warnings in a single upstream source file. The ``basename`` portion is the directory (relative to ``COMPONENT_PATH``) and the base filename (without extension) of the source file. For example, if a file inside ``COMPONENT_PATH`` is ``library/alpha/widget.c`` then you can set variable ``FLAGS_library/alpha/widget := -DTEST`` to pass the TEST macro when compiling this source file only.
To apply compilation flags to a single source file, you can add a variable override as a target, ie::
apps/dhcpserver.o: CFLAGS += -Wno-unused-variable
This can be useful if there is upstream code that emits warnings.
Component Configuration
-----------------------

View file

@ -51,17 +51,17 @@ static void blufi_data_recv(uint8_t *data, int len)
char *p = NULL;
LOG_DEBUG("the data is:%s\n", data);
p = strstr(data, HEADER_SSID);
p = strstr((char *)data, HEADER_SSID);
if (p) {
LOG_ERROR("SSID: %s\n", p + strlen(HEADER_SSID) + 1);
strcpy(tmp_ssid, p + strlen(HEADER_SSID) + 1);
}
p = strstr(data, HEADER_PASSWD);
p = strstr((char *)data, HEADER_PASSWD);
if (p) {
LOG_ERROR("PASSWORD: %s\n", p + strlen(HEADER_PASSWD) + 1);
strcpy(tmp_passwd, p + strlen(HEADER_PASSWD) + 1);
}
p = strstr(data, HEADER_CONFIRM);
p = strstr((char *)data, HEADER_CONFIRM);
if (p) {
LOG_ERROR("CONFIRM\n");
wifi_set_blue_config(tmp_ssid, tmp_passwd);

View file

@ -6,5 +6,3 @@
# lib(subdirectory_name).a in the build directory. This behaviour is entirely configurable,
# please read the ESP-IDF documents if you need to do this.
#
include $(IDF_PATH)/make/component_common.mk

View file

@ -38,7 +38,6 @@
#define TEST_DEVICE_NAME "ESP_GATTS_DEMO"
#define TEST_MANUFACTURER_DATA_LEN 17
static uint16_t test_service_uuid = GATTS_SERVICE_UUID_TEST;
static uint8_t test_service_uuid128[32] = {
/* LSB <--------------------------------------------------------------------------------> MSB */
//first uuid, 16bit, [12],[13] is the value
@ -47,7 +46,7 @@ static uint8_t test_service_uuid128[32] = {
0xfb, 0x34, 0x9b, 0x5f, 0x80, 0x00, 0x00, 0x80, 0x00, 0x10, 0x00, 0x00, 0xAB, 0xCD, 0xAB, 0xCD,
};
static uint8_t test_manufacturer[TEST_MANUFACTURER_DATA_LEN] = {0x12, 0x23, 0x45, 0x56};
//static uint8_t test_manufacturer[TEST_MANUFACTURER_DATA_LEN] = {0x12, 0x23, 0x45, 0x56};
static esp_ble_adv_data_t test_adv_data = {
.set_scan_rsp = false,
.include_name = true,

View file

@ -36,7 +36,6 @@
* When counter value reaches thresh1 or thresh0 value, it will trigger interrupt.
* When counter value reaches l_lim value or h_lim value, counter value will be reset to zero and trigger interrupt.
*/
static const char* TAG = "PCNT_TEST";
#define PCNT_TEST_UNIT PCNT_UNIT_0
#define PCNT_H_LIM_VAL (10)
#define PCNT_L_LIM_VAL (-10)

View file

@ -12,24 +12,42 @@
EXAMPLE_NUM=1
RESULT=0
RESULT_WARNINGS=22 # magic number result code for "warnings found"
set -e
for example in ${IDF_PATH}/examples/*; do
[ -f ${example}/Makefile ] || continue
echo "Building ${example} as ${EXAMPLE_NUM}..."
mkdir ${EXAMPLE_NUM}
cp -r ${example} ${EXAMPLE_NUM}
pushd ${EXAMPLE_NUM}/`basename ${example}`
mkdir -p example_builds/${EXAMPLE_NUM}
cp -r ${example} example_builds/${EXAMPLE_NUM}
pushd example_builds/${EXAMPLE_NUM}/`basename ${example}`
# be stricter in the CI build than the default IDF settings
export EXTRA_CFLAGS="-Werror -Werror=deprecated-declarations"
export EXTRA_CXXFLAGS=${EXTRA_CFLAGS}
# build non-verbose first, only build verbose if there's an error
(make clean defconfig && make all ) || (RESULT=$?; make V=1)
# build non-verbose first
BUILDLOG=$(mktemp -t examplebuild.XXXX.log)
(
set -e
make clean defconfig
make all 2>&1 | tee $BUILDLOG
) || (RESULT=$?; make V=1) # only build verbose if there's an error
popd
EXAMPLE_NUM=$(( $EXAMPLE_NUM + 1 ))
if [ $RESULT -eq 0 ] && grep -q ": warning:" $BUILDLOG; then
echo "Build will fail, due to warnings in this example"
RESULT=$RESULT_WARNINGS
fi
rm -f $BUILDLOG
done
if [ $RESULT -eq $RESULT_WARNINGS ]; then
echo "Build would have passed, except for warnings."
fi
exit $RESULT

View file

@ -157,15 +157,15 @@ define GenerateCompileTargets
# $(1) - directory containing source files, relative to $(COMPONENT_PATH)
$(1)/%.o: $$(COMPONENT_PATH)/$(1)/%.c $(COMMON_MAKEFILES) $(COMPONENT_MAKEFILE) | $(1)
$$(summary) CC $$@
$$(CC) $$(CFLAGS) $$(CPPFLAGS) $$(FLAGS_$$(subst .o,,$$(@))) $$(addprefix -I ,$$(COMPONENT_INCLUDES)) $$(addprefix -I ,$$(COMPONENT_EXTRA_INCLUDES)) -I$(1) -c $$< -o $$@
$$(CC) $$(CFLAGS) $$(CPPFLAGS) $$(addprefix -I ,$$(COMPONENT_INCLUDES)) $$(addprefix -I ,$$(COMPONENT_EXTRA_INCLUDES)) -I$(1) -c $$< -o $$@
$(1)/%.o: $$(COMPONENT_PATH)/$(1)/%.cpp $(COMMON_MAKEFILES) $(COMPONENT_MAKEFILE) | $(1)
$$(summary) CXX $$@
$$(CXX) $$(CXXFLAGS) $$(CPPFLAGS) $$(FLAGS_$$(subst .o,,$$(@))) $$(addprefix -I,$$(COMPONENT_INCLUDES)) $$(addprefix -I,$$(COMPONENT_EXTRA_INCLUDES)) -I$(1) -c $$< -o $$@
$$(CXX) $$(CXXFLAGS) $$(CPPFLAGS) $$(addprefix -I,$$(COMPONENT_INCLUDES)) $$(addprefix -I,$$(COMPONENT_EXTRA_INCLUDES)) -I$(1) -c $$< -o $$@
$(1)/%.o: $$(COMPONENT_PATH)/$(1)/%.S $(COMMON_MAKEFILES) $(COMPONENT_MAKEFILE) | $(1)
$$(summary) AS $$@
$$(CC) $$(CPPFLAGS) $$(FLAGS_$$(subst .o,,$$(@))) $$(addprefix -I ,$$(COMPONENT_INCLUDES)) $$(addprefix -I ,$$(COMPONENT_EXTRA_INCLUDES)) -I$(1) -c $$< -o $$@
$$(CC) $$(CPPFLAGS) $$(addprefix -I ,$$(COMPONENT_INCLUDES)) $$(addprefix -I ,$$(COMPONENT_EXTRA_INCLUDES)) -I$(1) -c $$< -o $$@
# CWD is build dir, create the build subdirectory if it doesn't exist
$(1):