]> granicus.if.org Git - esp-idf/commitdiff
components/bt: Some errors in comment
authorbaohongde <baohongde@espressif.com>
Fri, 16 Nov 2018 03:27:22 +0000 (11:27 +0800)
committerbaohongde <baohongde@espressif.com>
Fri, 16 Nov 2018 07:27:28 +0000 (15:27 +0800)
components/bt/bluedroid/api/include/api/esp_gap_ble_api.h
components/bt/bluedroid/api/include/api/esp_hf_client_api.h
components/bt/bluedroid/api/include/api/esp_spp_api.h
components/bt/bluedroid/btc/core/btc_main.c
components/bt/bluedroid/btc/profile/std/gap/btc_gap_ble.c
components/bt/bluedroid/stack/btm/btm_ble.c
components/bt/bluedroid/stack/btm/btm_ble_privacy.c
components/bt/bluedroid/stack/l2cap/l2c_ble.c

index b624365cb9310fcf257a8d71824b501cb0f0b949..224607a70f26da09157a8f3e5ef2d2088d73d30f 100644 (file)
@@ -303,9 +303,9 @@ typedef struct {
                                                     Value of 0xFFFF indicates no specific minimum.
                                                     Values not defined above are reserved for future use.*/
 
-    int                     max_interval;           /*!< Advertising data show slave preferred connection max interval. 
+    int                     max_interval;           /*!< Advertising data show slave preferred connection max interval.
                                                     The connection interval in the following manner:
-                                                    connIntervalmax = Conn_Interval_Max * 1.25 ms 
+                                                    connIntervalmax = Conn_Interval_Max * 1.25 ms
                                                     Conn_Interval_Max range: 0x0006 to 0x0C80
                                                     Conn_Interval_Max shall be equal to or greater than the Conn_Interval_Min.
                                                     Value of 0xFFFF indicates no specific maximum.
@@ -366,8 +366,8 @@ typedef struct {
                                                       Range: 0x0004 to 0x4000 Default: 0x0010 (10 ms)
                                                       Time = N * 0.625 msec
                                                       Time Range: 2.5 msec to 10240 msec */
-    esp_ble_scan_duplicate_t  scan_duplicate;       /*!< The Scan_Duplicates parameter controls whether the Link Layer should filter out 
-                                                        duplicate advertising reports (BLE_SCAN_DUPLICATE_ENABLE) to the Host, or if the Link Layer should generate 
+    esp_ble_scan_duplicate_t  scan_duplicate;       /*!< The Scan_Duplicates parameter controls whether the Link Layer should filter out
+                                                        duplicate advertising reports (BLE_SCAN_DUPLICATE_ENABLE) to the Host, or if the Link Layer should generate
                                                         advertising reports for each packet received */
 } esp_ble_scan_params_t;
 
@@ -962,8 +962,7 @@ esp_err_t esp_ble_gap_get_local_used_addr(esp_bd_addr_t local_used_addr, uint8_t
  * @param[in]       type   - finding ADV data type
  * @param[out]      length - return the length of ADV data not including type
  *
- * @return          - ESP_OK : success
- *                  - other  : failed
+ * @return          pointer of ADV data
  *
  */
 uint8_t *esp_ble_resolve_adv_data(uint8_t *adv_data, uint8_t type, uint8_t *length);
index 67ec894e0f8630482b77f4b2952650ef3f2827d3..dfc06ed5d1c3c33746805484edcd39470f31780e 100644 (file)
@@ -251,9 +251,9 @@ typedef union {
 } esp_hf_client_cb_param_t;
 
 /**
- * @brief           HFP client incoming data callback function, the callback is useful in case of 
+ * @brief           HFP client incoming data callback function, the callback is useful in case of
  *                  Voice Over HCI.
- * @param[in]       buf : pointer to incoming data(payload of HCI synchronous data packet), the 
+ * @param[in]       buf : pointer to incoming data(payload of HCI synchronous data packet), the
  *                  buffer is allocated inside bluetooth protocol stack and will be released after
  *                  invoke of the callback is finished.
  * @param[in]       len : size(in bytes) in buf
@@ -261,13 +261,13 @@ typedef union {
 typedef void (* esp_hf_client_incoming_data_cb_t)(const uint8_t *buf, uint32_t len);
 
 /**
- * @brief           HFP client outgoing data callback function, the callback is useful in case of 
- *                  Voice Over HCI. Once audio connection is set up and the application layer has 
- *                  prepared data to send, the lower layer will call this function to read data 
+ * @brief           HFP client outgoing data callback function, the callback is useful in case of
+ *                  Voice Over HCI. Once audio connection is set up and the application layer has
+ *                  prepared data to send, the lower layer will call this function to read data
  *                  and then send. This callback is supposed to be implemented as non-blocking,
  *                  and if data is not enough, return value 0 is supposed.
- *                  
- * @param[in]       buf : pointer to incoming data(payload of HCI synchronous data packet), the 
+ *
+ * @param[in]       buf : pointer to incoming data(payload of HCI synchronous data packet), the
  *                  buffer is allocated inside bluetooth protocol stack and will be released after
  *                  invoke of the callback is finished.
  * @param[in]       len : size(in bytes) in buf
@@ -326,7 +326,7 @@ esp_err_t esp_hf_client_deinit(void);
 
 /**
  *
- * @brief           Connect to remote bluetooth HFP audio gateway(AG) device, must after esp_a2d_hf_client_init()
+ * @brief           Connect to remote bluetooth HFP audio gateway(AG) device, must after esp_hf_client_init()
  *
  * @param[in]       remote_bda: remote bluetooth device address
  *
@@ -606,7 +606,7 @@ void esp_hf_client_outgoing_data_ready(void);
 
 /**
  * @brief           Initialize the down sampling converter. This is a utility function that can
- *                  only be used in the case that Voice Over HCI is enabled. 
+ *                  only be used in the case that Voice Over HCI is enabled.
  *
  * @param[in]       src_sps: original samples per second(source audio data, i.e. 48000, 32000,
  *                  16000, 44100, 22050, 11025)
index d7f3577480bf15ff0d9943bb2115298b17438537..31bcf1c687f6c3230b35c734912b51a9a86d63d7 100644 (file)
@@ -190,8 +190,7 @@ esp_err_t esp_spp_register_callback(esp_spp_cb_t callback);
 /**
  * @brief       This function is called to init SPP.
  *
- * @param[in]   mode: Choose the mode of SPP, ESP_SPP_MODE_CB or ESP_SPP_MODE_CB.
- *                    Now only supports ESP_SPP_MODE_CB mode, we will continue to update.
+ * @param[in]   mode: Choose the mode of SPP, ESP_SPP_MODE_CB or ESP_SPP_MODE_VFS.
  *
  * @return
  *              - ESP_OK: success
index 3000addbce815b1c6fd87bd76d6e8fc6774863a2..75a2cd45cf89d30f94757d2208430fe7fd19e499 100644 (file)
@@ -64,7 +64,7 @@ static void btc_init_bluetooth(void)
     bte_main_boot_entry(btc_init_callback);
 #if (SMP_INCLUDED)
     btc_config_init();
-    //load the ble local key whitch has been store in the flash
+    //load the ble local key which has been stored in the flash
     btc_dm_load_ble_local_keys();
 #endif /* #if (SMP_INCLUDED) */
 }
index a64b66debff45c6317d98d4036f595a1f5c81de3..c3c74350315844bfad94d11e43acfb65133b3e47 100644 (file)
@@ -831,7 +831,7 @@ static void btc_ble_set_rand_addr (BD_ADDR rand_addr, tBTA_SET_RAND_ADDR_CBACK *
             BTA_DmSetRandAddress(rand_addr, btc_set_rand_addr_callback);
         } else {
             btc_set_rand_addr_callback(BTM_INVALID_STATIC_RAND_ADDR);
-            BTC_TRACE_ERROR("Invalid random address, the high bit should be 0b11, all bits of the random part shall not be to 1 or 0");
+            BTC_TRACE_ERROR("Invalid random address, the high bit should be 0b11, bits of the random part shall not be all 1 or 0");
         }
     } else {
         btc_set_rand_addr_callback(BTM_INVALID_STATIC_RAND_ADDR);
index bdd991c955447cb8b92eaacc63d334dee8bc5fdd..803fe4387704fd529d59630197bcd95be1dd319e 100644 (file)
@@ -43,7 +43,7 @@
 //#include "osi/include/log.h"
 
 #if SMP_INCLUDED == TRUE
-// The temp variable to pass parameter between functions when in the connected event comeback.
+// The temp variable to pass parameter between functions when in the connected event callback.
 static BOOLEAN temp_enhanced = FALSE;
 extern BOOLEAN aes_cipher_msg_auth_code(BT_OCTET16 key, UINT8 *input, UINT16 length,
                                         UINT16 tlen, UINT8 *p_signature);
@@ -629,7 +629,7 @@ void BTM_ReadDevInfo (BD_ADDR remote_bda, tBT_DEVICE_TYPE *p_dev_type, tBLE_ADDR
 
     *p_addr_type = BLE_ADDR_PUBLIC;
 
-    if (!p_dev_rec) {  
+    if (!p_dev_rec) {
         *p_dev_type = BT_DEVICE_TYPE_BREDR;
         /* Check with the BT manager if details about remote device are known */
         if (p_inq_info != NULL) {
@@ -1471,7 +1471,7 @@ tBTM_STATUS btm_ble_set_encryption (BD_ADDR bd_addr, void *p_ref_data, UINT8 lin
         if(link_role == BTM_ROLE_SLAVE && (p_rec->ble.key_type & BTM_LE_KEY_PENC)) {
             p_rec->ble.skip_update_conn_param = true;
         } else {
-            p_rec->ble.skip_update_conn_param = false;    
+            p_rec->ble.skip_update_conn_param = false;
         }
         if (SMP_Pair(bd_addr) == SMP_STARTED) {
             cmd = BTM_CMD_STARTED;
@@ -1620,7 +1620,7 @@ void btm_ble_link_encrypted(BD_ADDR bd_addr, UINT8 encr_enable)
     /* to notify GATT to send data if any request is pending */
     gatt_notify_enc_cmpl(p_dev_rec->ble.pseudo_addr);
 }
-#endif  ///SMP_INCLUDED == TRUE 
+#endif  ///SMP_INCLUDED == TRUE
 
 
 /*******************************************************************************
@@ -1946,10 +1946,10 @@ void btm_ble_conn_complete(UINT8 *p, UINT16 evt_len, BOOLEAN enhanced)
 
         /* It will cause that scanner doesn't send scan request to advertiser
         * which has sent IRK to us and we have stored the IRK in controller.
-        * It is a design problem of hardware. The temporal solution is not to 
-        * send the key to the controller and then resolve the random address in host.
-        * so we need send the real address information to controller to connect. 
-        * Once the connection is successful, resolve device address whether it is 
+        * It is a hardware limitation. The preliminary solution is not to
+        * send key to the controller, but to resolve the random address in host.
+        * so we need send the real address information to controller to connect.
+        * Once the connection is successful, resolve device address whether it is
         * slave or master*/
 
         /* if (!match && role == HCI_ROLE_SLAVE && BTM_BLE_IS_RESOLVE_BDA(bda)) { */
index 38afb74be009a4abf8c5035b2faf1a062c3053df..176456f0b456497cd0ce9b2768d26d345c89b746 100644 (file)
@@ -771,8 +771,8 @@ BOOLEAN btm_ble_resolving_list_load_dev(tBTM_SEC_DEV_REC *p_dev_rec)
                     }
                     /* It will cause that scanner doesn't send scan request to advertiser
                      * which has sent IRK to us and we have stored the IRK in controller.
-                     * It is a design problem of hardware. The temporal solution is not to 
-                     * send the key to the controller and then resolve the random address in host. */
+                     * It is a hardware limitation. The preliminary solution is not to
+                     * send key to the controller, but to resolve the random address in host. */
                     /*
                     BTM_TRACE_DEBUG("%s:adding device to controller resolving list\n", __func__);
                     UINT8 *peer_irk = p_dev_rec->ble.keys.irk;
index 552477a0570b2d67196608804c7b4ffef53edfe3..b307785fe54628a8637f87de0d956857761076f4 100644 (file)
@@ -813,17 +813,17 @@ BOOLEAN l2cble_init_direct_conn (tL2C_LCB *p_lcb)
             memcpy(peer_addr, p_dev_rec->ble.current_addr, 6);
         } else {
             /* find security device information but not find the real address information
-             * This state may be directly open whithout scanning. In this case, you must 
+             * This state may be directly open without scanning. In this case, you must
              * use the current adv address of the device to open*/
-        } 
+        }
     } else {
         //not find security device information, We think this is a new device, connect directly
     }
 
     /* It will cause that scanner doesn't send scan request to advertiser
     * which has sent IRK to us and we have stored the IRK in controller.
-    * It is a design problem of hardware. The temporal solution is not to 
-    * send the key to the controller and then resolve the random address in host.
+    * It is a hardware limitation. The preliminary solution is not to
+    * send key to the controller, but to resolve the random address in host.
     * so we need send the real address information to controller. */
     /*
     if (p_dev_rec->ble.in_controller_list & BTM_RESOLVING_LIST_BIT) {