Merge branch 'bugfix/bt_example_typos' into 'master'

Minor: Fix some typos in Bluetooth examples

See merge request espressif/esp-idf!5662
This commit is contained in:
Angus Gratton
2019-07-31 15:33:03 +08:00
8 changed files with 15 additions and 15 deletions

View File

@@ -24,7 +24,7 @@
#include "ble_ancs.h" #include "ble_ancs.h"
#define BLE_ANCS_TAG "BLE_ANCS" #define BLE_ANCS_TAG "BLE_ANCS"
#define EXCAMPLE_DEVICE_NAME "ESP_BLE_ANCS" #define EXAMPLE_DEVICE_NAME "ESP_BLE_ANCS"
#define PROFILE_A_APP_ID 0 #define PROFILE_A_APP_ID 0
#define PROFILE_NUM 1 #define PROFILE_NUM 1
#define ADV_CONFIG_FLAG (1 << 0) #define ADV_CONFIG_FLAG (1 << 0)
@@ -331,7 +331,7 @@ static void gattc_profile_event_handler(esp_gattc_cb_event_t event, esp_gatt_if_
switch (event) { switch (event) {
case ESP_GATTC_REG_EVT: case ESP_GATTC_REG_EVT:
ESP_LOGI(BLE_ANCS_TAG, "REG_EVT"); ESP_LOGI(BLE_ANCS_TAG, "REG_EVT");
esp_ble_gap_set_device_name(EXCAMPLE_DEVICE_NAME); esp_ble_gap_set_device_name(EXAMPLE_DEVICE_NAME);
esp_ble_gap_config_local_icon (ESP_BLE_APPEARANCE_GENERIC_WATCH); esp_ble_gap_config_local_icon (ESP_BLE_APPEARANCE_GENERIC_WATCH);
//generate a resolvable random address //generate a resolvable random address
esp_ble_gap_config_local_privacy(true); esp_ble_gap_config_local_privacy(true);

View File

@@ -25,7 +25,7 @@
#define HEART_PROFILE_NUM 1 #define HEART_PROFILE_NUM 1
#define HEART_PROFILE_APP_IDX 0 #define HEART_PROFILE_APP_IDX 0
#define ESP_HEART_RATE_APP_ID 0x55 #define ESP_HEART_RATE_APP_ID 0x55
#define EXCAMPLE_DEVICE_NAME "ESP_BLE_SECURITY" #define EXAMPLE_DEVICE_NAME "ESP_BLE_SECURITY"
#define HEART_RATE_SVC_INST_ID 0 #define HEART_RATE_SVC_INST_ID 0
#define GATTS_DEMO_CHAR_VAL_LEN_MAX 0x40 #define GATTS_DEMO_CHAR_VAL_LEN_MAX 0x40
@@ -400,7 +400,7 @@ static void gatts_profile_event_handler(esp_gatts_cb_event_t event,
ESP_LOGV(GATTS_TABLE_TAG, "event = %x\n",event); ESP_LOGV(GATTS_TABLE_TAG, "event = %x\n",event);
switch (event) { switch (event) {
case ESP_GATTS_REG_EVT: case ESP_GATTS_REG_EVT:
esp_ble_gap_set_device_name(EXCAMPLE_DEVICE_NAME); esp_ble_gap_set_device_name(EXAMPLE_DEVICE_NAME);
//generate a resolvable random address //generate a resolvable random address
esp_ble_gap_config_local_privacy(true); esp_ble_gap_config_local_privacy(true);
esp_ble_gatts_create_attr_tab(heart_rate_gatt_db, gatts_if, esp_ble_gatts_create_attr_tab(heart_rate_gatt_db, gatts_if,

View File

@@ -26,7 +26,7 @@
#define SPP_TAG "SPP_ACCEPTOR_DEMO" #define SPP_TAG "SPP_ACCEPTOR_DEMO"
#define SPP_SERVER_NAME "SPP_SERVER" #define SPP_SERVER_NAME "SPP_SERVER"
#define EXCAMPLE_DEVICE_NAME "ESP_SPP_ACCEPTOR" #define EXAMPLE_DEVICE_NAME "ESP_SPP_ACCEPTOR"
#define SPP_SHOW_DATA 0 #define SPP_SHOW_DATA 0
#define SPP_SHOW_SPEED 1 #define SPP_SHOW_SPEED 1
#define SPP_SHOW_MODE SPP_SHOW_SPEED /*Choose show mode: show data or speed*/ #define SPP_SHOW_MODE SPP_SHOW_SPEED /*Choose show mode: show data or speed*/
@@ -56,7 +56,7 @@ static void esp_spp_cb(esp_spp_cb_event_t event, esp_spp_cb_param_t *param)
switch (event) { switch (event) {
case ESP_SPP_INIT_EVT: case ESP_SPP_INIT_EVT:
ESP_LOGI(SPP_TAG, "ESP_SPP_INIT_EVT"); ESP_LOGI(SPP_TAG, "ESP_SPP_INIT_EVT");
esp_bt_dev_set_device_name(EXCAMPLE_DEVICE_NAME); esp_bt_dev_set_device_name(EXAMPLE_DEVICE_NAME);
esp_bt_gap_set_scan_mode(ESP_BT_CONNECTABLE, ESP_BT_GENERAL_DISCOVERABLE); esp_bt_gap_set_scan_mode(ESP_BT_CONNECTABLE, ESP_BT_GENERAL_DISCOVERABLE);
esp_spp_start_srv(sec_mask,role_slave, 0, SPP_SERVER_NAME); esp_spp_start_srv(sec_mask,role_slave, 0, SPP_SERVER_NAME);
break; break;

View File

@@ -25,7 +25,7 @@
#include "sys/time.h" #include "sys/time.h"
#define SPP_TAG "SPP_INITIATOR_DEMO" #define SPP_TAG "SPP_INITIATOR_DEMO"
#define EXCAMPLE_DEVICE_NAME "ESP_SPP_INITIATOR" #define EXAMPLE_DEVICE_NAME "ESP_SPP_INITIATOR"
#define SPP_SHOW_DATA 0 #define SPP_SHOW_DATA 0
#define SPP_SHOW_SPEED 1 #define SPP_SHOW_SPEED 1
@@ -103,7 +103,7 @@ static void esp_spp_cb(esp_spp_cb_event_t event, esp_spp_cb_param_t *param)
switch (event) { switch (event) {
case ESP_SPP_INIT_EVT: case ESP_SPP_INIT_EVT:
ESP_LOGI(SPP_TAG, "ESP_SPP_INIT_EVT"); ESP_LOGI(SPP_TAG, "ESP_SPP_INIT_EVT");
esp_bt_dev_set_device_name(EXCAMPLE_DEVICE_NAME); esp_bt_dev_set_device_name(EXAMPLE_DEVICE_NAME);
esp_bt_gap_set_scan_mode(ESP_BT_CONNECTABLE, ESP_BT_GENERAL_DISCOVERABLE); esp_bt_gap_set_scan_mode(ESP_BT_CONNECTABLE, ESP_BT_GENERAL_DISCOVERABLE);
esp_bt_gap_start_discovery(inq_mode, inq_len, inq_num_rsps); esp_bt_gap_start_discovery(inq_mode, inq_len, inq_num_rsps);

View File

@@ -38,7 +38,7 @@
#define SPP_TAG "SPP_ACCEPTOR_DEMO" #define SPP_TAG "SPP_ACCEPTOR_DEMO"
#define SPP_SERVER_NAME "SPP_SERVER" #define SPP_SERVER_NAME "SPP_SERVER"
#define EXCAMPLE_DEVICE_NAME "ESP_SPP_ACCEPTOR" #define EXAMPLE_DEVICE_NAME "ESP_SPP_ACCEPTOR"
static const esp_spp_mode_t esp_spp_mode = ESP_SPP_MODE_VFS; static const esp_spp_mode_t esp_spp_mode = ESP_SPP_MODE_VFS;
@@ -75,7 +75,7 @@ static void esp_spp_cb(uint16_t e, void *p)
switch (event) { switch (event) {
case ESP_SPP_INIT_EVT: case ESP_SPP_INIT_EVT:
ESP_LOGI(SPP_TAG, "ESP_SPP_INIT_EVT"); ESP_LOGI(SPP_TAG, "ESP_SPP_INIT_EVT");
esp_bt_dev_set_device_name(EXCAMPLE_DEVICE_NAME); esp_bt_dev_set_device_name(EXAMPLE_DEVICE_NAME);
esp_bt_gap_set_scan_mode(ESP_BT_CONNECTABLE, ESP_BT_GENERAL_DISCOVERABLE); esp_bt_gap_set_scan_mode(ESP_BT_CONNECTABLE, ESP_BT_GENERAL_DISCOVERABLE);
esp_spp_start_srv(sec_mask,role_slave, 0, SPP_SERVER_NAME); esp_spp_start_srv(sec_mask,role_slave, 0, SPP_SERVER_NAME);
break; break;

View File

@@ -37,7 +37,7 @@
#include "sys/unistd.h" #include "sys/unistd.h"
#define SPP_TAG "SPP_INITIATOR_DEMO" #define SPP_TAG "SPP_INITIATOR_DEMO"
#define EXCAMPLE_DEVICE_NAME "ESP_SPP_INITIATOR" #define EXAMPLE_DEVICE_NAME "ESP_SPP_INITIATOR"
static const esp_spp_mode_t esp_spp_mode = ESP_SPP_MODE_VFS; static const esp_spp_mode_t esp_spp_mode = ESP_SPP_MODE_VFS;
@@ -113,7 +113,7 @@ static void esp_spp_cb(uint16_t e, void *p)
switch (event) { switch (event) {
case ESP_SPP_INIT_EVT: case ESP_SPP_INIT_EVT:
ESP_LOGI(SPP_TAG, "ESP_SPP_INIT_EVT"); ESP_LOGI(SPP_TAG, "ESP_SPP_INIT_EVT");
esp_bt_dev_set_device_name(EXCAMPLE_DEVICE_NAME); esp_bt_dev_set_device_name(EXAMPLE_DEVICE_NAME);
esp_bt_gap_set_scan_mode(ESP_BT_CONNECTABLE, ESP_BT_GENERAL_DISCOVERABLE); esp_bt_gap_set_scan_mode(ESP_BT_CONNECTABLE, ESP_BT_GENERAL_DISCOVERABLE);
esp_bt_gap_start_discovery(inq_mode, inq_len, inq_num_rsps); esp_bt_gap_start_discovery(inq_mode, inq_len, inq_num_rsps);

View File

@@ -134,7 +134,7 @@ blehr_tx_hrate_stop(void)
xTimerStop( blehr_tx_timer, 1000 / portTICK_PERIOD_MS ); xTimerStop( blehr_tx_timer, 1000 / portTICK_PERIOD_MS );
} }
/* Reset heartrate measurment */ /* Reset heart rate measurement */
static void static void
blehr_tx_hrate_reset(void) blehr_tx_hrate_reset(void)
{ {

View File

@@ -93,7 +93,7 @@ bleprph_advertise(void)
BLE_HS_ADV_F_BREDR_UNSUP; BLE_HS_ADV_F_BREDR_UNSUP;
/* Indicate that the TX power level field should be included; have the /* Indicate that the TX power level field should be included; have the
* stack fill this value automatically. This is done by assiging the * stack fill this value automatically. This is done by assigning the
* special value BLE_HS_ADV_TX_PWR_LVL_AUTO. * special value BLE_HS_ADV_TX_PWR_LVL_AUTO.
*/ */
fields.tx_pwr_lvl_is_present = 1; fields.tx_pwr_lvl_is_present = 1;
@@ -135,7 +135,7 @@ bleprph_advertise(void)
* *
* @param event The type of event being signalled. * @param event The type of event being signalled.
* @param ctxt Various information pertaining to the event. * @param ctxt Various information pertaining to the event.
* @param arg Application-specified argument; unuesd by * @param arg Application-specified argument; unused by
* bleprph. * bleprph.
* *
* @return 0 if the application successfully handled the * @return 0 if the application successfully handled the