ble Fix typo and add some comment

This commit is contained in:
gengyuchao 2020-01-07 21:46:12 +08:00 committed by bot
parent efc514fa0a
commit 7e54ac08e6
2 changed files with 13 additions and 13 deletions

View file

@ -73,14 +73,14 @@ extern "C" {
#define ESP_GATT_UUID_CHAR_PRESENT_FORMAT 0x2904 /* Characteristic Presentation Format*/ #define ESP_GATT_UUID_CHAR_PRESENT_FORMAT 0x2904 /* Characteristic Presentation Format*/
#define ESP_GATT_UUID_CHAR_AGG_FORMAT 0x2905 /* Characteristic Aggregate Format*/ #define ESP_GATT_UUID_CHAR_AGG_FORMAT 0x2905 /* Characteristic Aggregate Format*/
#define ESP_GATT_UUID_CHAR_VALID_RANGE 0x2906 /* Characteristic Valid Range */ #define ESP_GATT_UUID_CHAR_VALID_RANGE 0x2906 /* Characteristic Valid Range */
#define ESP_GATT_UUID_EXT_RPT_REF_DESCR 0x2907 #define ESP_GATT_UUID_EXT_RPT_REF_DESCR 0x2907 /* External Report Reference */
#define ESP_GATT_UUID_RPT_REF_DESCR 0x2908 #define ESP_GATT_UUID_RPT_REF_DESCR 0x2908 /* Report Reference */
#define ESP_GATT_UUID_NUM_DIGITALS_DESCR 0x2909 #define ESP_GATT_UUID_NUM_DIGITALS_DESCR 0x2909 /* Number of Digitals */
#define ESP_GATT_UUID_VALUE_TRIGGER_DESCR 0x290A #define ESP_GATT_UUID_VALUE_TRIGGER_DESCR 0x290A /* Value Trigger Setting */
#define ESP_GATT_UUID_ENV_SENS_CONFIG_DESCR 0x290B #define ESP_GATT_UUID_ENV_SENSING_CONFIG_DESCR 0x290B /* Environmental Sensing Configuration */
#define ESP_GATT_UUID_ENV_SENS_MEAS_DESCR 0x290C #define ESP_GATT_UUID_ENV_SENSING_MEASUREMENT_DESCR 0x290C /* Environmental Sensing Measurement */
#define ESP_GATT_UUID_ENV_SENS_TRIGGER_DESCR 0x290D #define ESP_GATT_UUID_ENV_SENSING_TRIGGER_DESCR 0x290D /* Environmental Sensing Trigger Setting */
#define ESP_GATT_UUID_TIME_TRIGGER_DESCR 0x290E #define ESP_GATT_UUID_TIME_TRIGGER_DESCR 0x290E /* Time Trigger Setting */
/* GAP Profile Attributes */ /* GAP Profile Attributes */
#define ESP_GATT_UUID_GAP_DEVICE_NAME 0x2A00 #define ESP_GATT_UUID_GAP_DEVICE_NAME 0x2A00
@ -449,7 +449,7 @@ typedef struct {
* @brief service element * @brief service element
*/ */
typedef struct { typedef struct {
bool is_primary; /*!< The service flag, true if the service is primary service, else is secondly service */ bool is_primary; /*!< The service flag, true if the service is primary service, else is secondary service */
uint16_t start_handle; /*!< The start handle of the service */ uint16_t start_handle; /*!< The start handle of the service */
uint16_t end_handle; /*!< The end handle of the service */ uint16_t end_handle; /*!< The end handle of the service */
esp_bt_uuid_t uuid; /*!< The uuid of the service */ esp_bt_uuid_t uuid; /*!< The uuid of the service */

View file

@ -384,9 +384,9 @@ static void btc_gatts_act_create_attr_tab(esp_gatts_attr_db_t *gatts_attr_db,
case ESP_GATT_UUID_RPT_REF_DESCR: case ESP_GATT_UUID_RPT_REF_DESCR:
case ESP_GATT_UUID_NUM_DIGITALS_DESCR: case ESP_GATT_UUID_NUM_DIGITALS_DESCR:
case ESP_GATT_UUID_VALUE_TRIGGER_DESCR: case ESP_GATT_UUID_VALUE_TRIGGER_DESCR:
case ESP_GATT_UUID_ENV_SENS_CONFIG_DESCR: case ESP_GATT_UUID_ENV_SENSING_CONFIG_DESCR:
case ESP_GATT_UUID_ENV_SENS_MEAS_DESCR: case ESP_GATT_UUID_ENV_SENSING_MEASUREMENT_DESCR:
case ESP_GATT_UUID_ENV_SENS_TRIGGER_DESCR: case ESP_GATT_UUID_ENV_SENSING_TRIGGER_DESCR:
case ESP_GATT_UUID_TIME_TRIGGER_DESCR: { case ESP_GATT_UUID_TIME_TRIGGER_DESCR: {
uint16_t svc_hal = btc_creat_tab_env.svc_start_hdl; uint16_t svc_hal = btc_creat_tab_env.svc_start_hdl;
tBT_UUID bta_char_uuid; tBT_UUID bta_char_uuid;
@ -449,7 +449,7 @@ static esp_gatt_status_t btc_gatts_check_valid_attr_tab(esp_gatts_attr_db_t *gat
case ESP_GATT_UUID_PRI_SERVICE: case ESP_GATT_UUID_PRI_SERVICE:
case ESP_GATT_UUID_SEC_SERVICE: case ESP_GATT_UUID_SEC_SERVICE:
if (++svc_num > 1) { if (++svc_num > 1) {
BTC_TRACE_ERROR("Each service table can only created one primary service or secondly service."); BTC_TRACE_ERROR("Each service table can only created one primary service or secondary service.");
return ESP_GATT_ERROR; return ESP_GATT_ERROR;
} }
break; break;