mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
component/bt: fix some typos and comments
This commit is contained in:
parent
3acd445f94
commit
cfb18ba537
@ -238,38 +238,14 @@ void btc_dm_sec_cb_handler(btc_msg_t *msg)
|
||||
btc_dm_sec_args_t *arg = (btc_dm_sec_args_t *)(msg->arg);
|
||||
tBTA_DM_SEC *p_data = &(arg->sec);
|
||||
// tBTA_SERVICE_MASK service_mask;
|
||||
LOG_DEBUG("btif_dm_upstreams_cback ev: %d\n", msg->act);
|
||||
LOG_DEBUG("btc_dm_upstreams_cback ev: %d\n", msg->act);
|
||||
|
||||
switch (msg->act) {
|
||||
case BTA_DM_ENABLE_EVT:
|
||||
#if KARL_NOT_IGNORE
|
||||
/* for each of the enabled services in the mask, trigger the profile
|
||||
* enable */
|
||||
service_mask = btif_get_enabled_services_mask();
|
||||
for (int i = 0; i <= BTA_MAX_SERVICE_ID; i++) {
|
||||
if (service_mask &
|
||||
(tBTA_SERVICE_MASK)(BTA_SERVICE_ID_TO_SERVICE_MASK(i))) {
|
||||
btif_in_execute_service_request(i, TRUE);
|
||||
}
|
||||
}
|
||||
btif_enable_bluetooth_evt(p_data->enable.status);
|
||||
#endif /* KARL_NOT_IGNORE */
|
||||
btc_storage_load_bonded_devices();
|
||||
btc_enable_bluetooth_evt(p_data->enable.status);
|
||||
break;
|
||||
case BTA_DM_DISABLE_EVT:
|
||||
#if KARL_NOT_IGNORE
|
||||
/* for each of the enabled services in the mask, trigger the profile
|
||||
* disable */
|
||||
service_mask = btif_get_enabled_services_mask();
|
||||
for (int i = 0; i <= BTA_MAX_SERVICE_ID; i++) {
|
||||
if (service_mask &
|
||||
(tBTA_SERVICE_MASK)(BTA_SERVICE_ID_TO_SERVICE_MASK(i))) {
|
||||
btif_in_execute_service_request(i, FALSE);
|
||||
}
|
||||
}
|
||||
btif_disable_bluetooth_evt();
|
||||
#endif /* KARL_NOT_IGNORE */
|
||||
btc_disable_bluetooth_evt();
|
||||
break;
|
||||
case BTA_DM_PIN_REQ_EVT:
|
||||
|
@ -113,7 +113,7 @@ bt_status_t btc_queue_connect(uint16_t uuid, const bt_bdaddr_t *bda, btc_connect
|
||||
}
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function btif_queue_advance
|
||||
** Function btc_queue_advance
|
||||
**
|
||||
** Description Clear the queue's busy status and advance to the next
|
||||
** scheduled connection.
|
||||
|
@ -79,7 +79,7 @@ static bt_status_t btc_in_fetch_bonded_devices(int add)
|
||||
int linkkey_type;
|
||||
if (btc_config_get_int(name, "LinkKeyType", &linkkey_type)) {
|
||||
//int pin_len;
|
||||
//btif_config_get_int(name, "PinLength", &pin_len))
|
||||
//btc_config_get_int(name, "PinLength", &pin_len))
|
||||
bt_bdaddr_t bd_addr;
|
||||
string_to_bdaddr(name, &bd_addr);
|
||||
if (add) {
|
||||
@ -110,7 +110,7 @@ static bt_status_t btc_in_fetch_bonded_devices(int add)
|
||||
**
|
||||
** Function btc_storage_load_bonded_devices
|
||||
**
|
||||
** Description BTIF storage API - Loads all the bonded devices from NVRAM
|
||||
** Description BTC storage API - Loads all the bonded devices from NVRAM
|
||||
** and adds to the BTA.
|
||||
** Additionally, this API also invokes the adaper_properties_cb
|
||||
** and remote_device_properties_cb for each of the bonded devices.
|
||||
@ -130,7 +130,7 @@ bt_status_t btc_storage_load_bonded_devices(void)
|
||||
**
|
||||
** Function btc_storage_remove_bonded_device
|
||||
**
|
||||
** Description BTIF storage API - Deletes the bonded device from NVRAM
|
||||
** Description BTC storage API - Deletes the bonded device from NVRAM
|
||||
**
|
||||
** Returns BT_STATUS_SUCCESS if the deletion was successful,
|
||||
** BT_STATUS_FAIL otherwise
|
||||
|
@ -34,7 +34,7 @@ void btc_dm_sec_evt(tBTA_DM_SEC_EVT event, tBTA_DM_SEC *data);
|
||||
void btc_dm_sec_cb_handler(btc_msg_t *msg);
|
||||
void btc_dm_sec_arg_deep_copy(btc_msg_t *msg, void *dst, void *src);
|
||||
|
||||
bt_status_t btc_dm_enable_service(tBTA_SERVICE_ID service_id); // todo: replace bt_status_t
|
||||
bt_status_t btc_dm_enable_service(tBTA_SERVICE_ID service_id);
|
||||
bt_status_t btc_dm_disable_service(tBTA_SERVICE_ID service_id);
|
||||
|
||||
#endif /* __BTC_DM_H__ */
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Filename: btC_profile_queue.h
|
||||
* Filename: btc_profile_queue.h
|
||||
*
|
||||
* Description: Bluetooth remote device connection queuing
|
||||
*
|
||||
|
@ -45,7 +45,7 @@ typedef BOOLEAN (* btc_sm_handler_t)(btc_sm_event_t event, void *data);
|
||||
/*****************************************************************************
|
||||
** Functions
|
||||
**
|
||||
** NOTE: THESE APIs SHOULD BE INVOKED ONLY IN THE BTIF CONTEXT
|
||||
** NOTE: THESE APIs SHOULD BE INVOKED ONLY IN THE BTC CONTEXT
|
||||
**
|
||||
******************************************************************************/
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
||||
**
|
||||
** Function btc_storage_add_bonded_device
|
||||
**
|
||||
** Description BTIF storage API - Adds the newly bonded device to NVRAM
|
||||
** Description BTC storage API - Adds the newly bonded device to NVRAM
|
||||
** along with the link-key, Key type and Pin key length
|
||||
**
|
||||
** Returns BT_STATUS_SUCCESS if the store was successful,
|
||||
@ -39,7 +39,7 @@ bt_status_t btc_storage_add_bonded_device(bt_bdaddr_t *remote_bd_addr,
|
||||
**
|
||||
** Function btc_storage_remove_bonded_device
|
||||
**
|
||||
** Description BTIF storage API - Deletes the bonded device from NVRAM
|
||||
** Description BTC storage API - Deletes the bonded device from NVRAM
|
||||
**
|
||||
** Returns BT_STATUS_SUCCESS if the deletion was successful,
|
||||
** BT_STATUS_FAIL otherwise
|
||||
@ -51,7 +51,7 @@ bt_status_t btc_storage_remove_bonded_device(bt_bdaddr_t *remote_bd_addr);
|
||||
**
|
||||
** Function btc_storage_remove_bonded_device
|
||||
**
|
||||
** Description BTIF storage API - Deletes the bonded device from NVRAM
|
||||
** Description BTC storage API - Deletes the bonded device from NVRAM
|
||||
**
|
||||
** Returns BT_STATUS_SUCCESS if the deletion was successful,
|
||||
** BT_STATUS_FAIL otherwise
|
||||
|
@ -1108,13 +1108,6 @@ BOOLEAN btc_av_stream_ready(void)
|
||||
LOG_DEBUG("btc_av_stream_ready : sm hdl %d, state %d, flags %x\n",
|
||||
(int)btc_av_cb.sm_handle, state, btc_av_cb.flags);
|
||||
|
||||
#if 0 /* karl */
|
||||
/* also make sure main adapter is enabled */
|
||||
if (btif_is_enabled() == 0) {
|
||||
LOG_INFO("main adapter not enabled");
|
||||
return FALSE;
|
||||
}
|
||||
#endif
|
||||
/* check if we are remotely suspended or stop is pending */
|
||||
if (btc_av_cb.flags & (BTC_AV_FLAG_REMOTE_SUSPEND | BTC_AV_FLAG_PENDING_STOP)) {
|
||||
return FALSE;
|
||||
|
@ -27,7 +27,6 @@
|
||||
|
||||
#include "esp_a2dp_api.h"
|
||||
#include "btc_task.h"
|
||||
// #include "btif_common.h"
|
||||
#include "btc_common.h"
|
||||
#include "btc_sm.h"
|
||||
#include "bta_av_api.h"
|
||||
@ -115,7 +114,7 @@ void btc_dispatch_sm_event(btc_av_sm_event_t event, void *p_data, int len);
|
||||
**
|
||||
** Function btc_av_init
|
||||
**
|
||||
** Description Initializes btif AV if not already done
|
||||
** Description Initializes btc AV if not already done
|
||||
**
|
||||
** Returns bt_status_t
|
||||
**
|
||||
|
@ -60,7 +60,7 @@ typedef UINT8 tBTC_AV_CHNL;
|
||||
|
||||
typedef UINT8 tBTC_AV_HNDL;
|
||||
|
||||
/* Operation id list for BTIF_AvRemoteCmd */
|
||||
/* Operation id list for BTC_AvRemoteCmd */
|
||||
#define BTC_AV_ID_SELECT 0x00 /* select */
|
||||
#define BTC_AV_ID_UP 0x01 /* up */
|
||||
#define BTC_AV_ID_DOWN 0x02 /* down */
|
||||
@ -130,7 +130,7 @@ typedef UINT8 tBTC_AV_STATE;
|
||||
|
||||
typedef UINT8 tBTC_AV_RC_HNDL;
|
||||
|
||||
/* Command codes for BTIF_AvVendorCmd */
|
||||
/* Command codes for BTC_AvVendorCmd */
|
||||
#define BTC_AV_CMD_CTRL 0
|
||||
#define BTC_AV_CMD_STATUS 1
|
||||
#define BTC_AV_CMD_SPEC_INQ 2
|
||||
@ -171,7 +171,7 @@ typedef UINT8 tBTC_AV_CHANNEL_MODE;
|
||||
* Structure used to configure the AV codec capabilities/config
|
||||
*/
|
||||
typedef struct {
|
||||
tBTC_AV_CODEC_ID id; /* Codec ID (in terms of BTIF) */
|
||||
tBTC_AV_CODEC_ID id; /* Codec ID (in terms of BTC) */
|
||||
UINT8 info[AVDT_CODEC_SIZE]; /* Codec info (can be config or capabilities) */
|
||||
} tBTC_AV_CODEC_INFO;
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
*
|
||||
* Filename: btc_media.h
|
||||
*
|
||||
* Description: This is the audio module for the BTIF system.
|
||||
* Description: This is the audio module for the BTC system.
|
||||
*
|
||||
*******************************************************************************/
|
||||
|
||||
@ -93,7 +93,7 @@ typedef struct {
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function btif_av_task
|
||||
** Function btc_av_task
|
||||
**
|
||||
** Description
|
||||
**
|
||||
@ -173,7 +173,7 @@ extern BOOLEAN btc_media_task_aa_tx_flush_req(void);
|
||||
**
|
||||
** Function btc_media_aa_readbuf
|
||||
**
|
||||
** Description Read an audio GKI buffer from the BTIF media TX queue
|
||||
** Description Read an audio GKI buffer from the BTC media TX queue
|
||||
**
|
||||
** Returns pointer on a GKI aa buffer ready to send
|
||||
**
|
||||
@ -197,7 +197,7 @@ UINT8 btc_media_sink_enque_buf(BT_HDR *p_buf);
|
||||
**
|
||||
** Function btc_media_aa_writebuf
|
||||
**
|
||||
** Description Enqueue a Advance Audio media GKI buffer to be processed by btif media task.
|
||||
** Description Enqueue a Advance Audio media GKI buffer to be processed by btc media task.
|
||||
**
|
||||
** Returns TRUE is success
|
||||
**
|
||||
@ -208,7 +208,7 @@ extern void btc_media_aa_writebuf(BT_HDR *pBuf, UINT32 timestamp, UINT16 seq_num
|
||||
**
|
||||
** Function btc_media_av_writebuf
|
||||
**
|
||||
** Description Enqueue a video media GKI buffer to be processed by btif media task.
|
||||
** Description Enqueue a video media GKI buffer to be processed by btc media task.
|
||||
**
|
||||
** Returns TRUE is success
|
||||
**
|
||||
@ -242,7 +242,7 @@ extern BOOLEAN btc_media_task_audio_feeding_init_req(tBTC_MEDIA_INIT_AUDIO_FEEDI
|
||||
extern void dump_codec_info(unsigned char *p_codec);
|
||||
|
||||
/**
|
||||
* Local adaptation helper functions between btif and media task
|
||||
* Local adaptation helper functions between btc and media task
|
||||
*/
|
||||
|
||||
bool btc_a2dp_start_media_task(void);
|
||||
|
Loading…
x
Reference in New Issue
Block a user