From bdc10744fb338ae197692713a0b48a7ccc36f566 Mon Sep 17 00:00:00 2001 From: JF Date: Sun, 26 Apr 2020 10:25:59 +0200 Subject: Add Nimble in libs directory --- .../dis/include/services/dis/ble_svc_dis.h | 113 +++++++ .../mynewt-nimble/nimble/host/services/dis/pkg.yml | 34 +++ .../nimble/host/services/dis/src/ble_svc_dis.c | 331 +++++++++++++++++++++ .../nimble/host/services/dis/syscfg.yml | 109 +++++++ 4 files changed, 587 insertions(+) create mode 100644 src/libs/mynewt-nimble/nimble/host/services/dis/include/services/dis/ble_svc_dis.h create mode 100644 src/libs/mynewt-nimble/nimble/host/services/dis/pkg.yml create mode 100644 src/libs/mynewt-nimble/nimble/host/services/dis/src/ble_svc_dis.c create mode 100644 src/libs/mynewt-nimble/nimble/host/services/dis/syscfg.yml (limited to 'src/libs/mynewt-nimble/nimble/host/services/dis') diff --git a/src/libs/mynewt-nimble/nimble/host/services/dis/include/services/dis/ble_svc_dis.h b/src/libs/mynewt-nimble/nimble/host/services/dis/include/services/dis/ble_svc_dis.h new file mode 100644 index 00000000..d095e959 --- /dev/null +++ b/src/libs/mynewt-nimble/nimble/host/services/dis/include/services/dis/ble_svc_dis.h @@ -0,0 +1,113 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +#ifndef H_BLE_SVC_DIS_ +#define H_BLE_SVC_DIS_ + +/** + * Example: + * + * char firmware_revision[20] = '?.?.?'; + * struct image_version iv; + * if (!imgr_my_version(&iv)) { + * snprintf(firmware_revision, sizeof(firmware_revision), + * "%u.%u.%u", iv.iv_major, iv.iv_minor, iv.iv_revision); + * } + * ble_svc_dis_manufacturer_name_set("MyNewt"); + * ble_svc_dis_firmware_revision_set(firmware_revision); + * + */ + +#define BLE_SVC_DIS_UUID16 0x180A +#define BLE_SVC_DIS_CHR_UUID16_SYSTEM_ID 0x2A23 +#define BLE_SVC_DIS_CHR_UUID16_MODEL_NUMBER 0x2A24 +#define BLE_SVC_DIS_CHR_UUID16_SERIAL_NUMBER 0x2A25 +#define BLE_SVC_DIS_CHR_UUID16_FIRMWARE_REVISION 0x2A26 +#define BLE_SVC_DIS_CHR_UUID16_HARDWARE_REVISION 0x2A27 +#define BLE_SVC_DIS_CHR_UUID16_SOFTWARE_REVISION 0x2A28 +#define BLE_SVC_DIS_CHR_UUID16_MANUFACTURER_NAME 0x2A29 + +/** + * Structure holding data for the main characteristics + */ +struct ble_svc_dis_data { + /** + * Model number. + * Represent the model number that is assigned by the device vendor. + */ + const char *model_number; + /** + * Serial number. + * Represent the serial number for a particular instance of the device. + */ + const char *serial_number; + /** + * Firmware revision. + * Represent the firmware revision for the firmware within the device. + */ + const char *firmware_revision; + /** + * Hardware revision. + * Represent the hardware revision for the hardware within the device. + */ + const char *hardware_revision; + /** + * Software revision. + * Represent the software revision for the software within the device. + */ + const char *software_revision; + /** + * Manufacturer name. + * Represent the name of the manufacturer of the device. + */ + const char *manufacturer_name; + /** + * System ID. + * Represent the System Id of the device. + */ + const char *system_id; +}; + +/** + * Variable holding data for the main characteristics. + */ +extern struct ble_svc_dis_data ble_svc_dis_data; + +/** + * Service initialisation. + * Automatically called during package initialisation. + */ +void ble_svc_dis_init(void); + +const char *ble_svc_dis_model_number(void); +int ble_svc_dis_model_number_set(const char *value); +const char *ble_svc_dis_serial_number(void); +int ble_svc_dis_serial_number_set(const char *value); +const char *ble_svc_dis_firmware_revision(void); +int ble_svc_dis_firmware_revision_set(const char *value); +const char *ble_svc_dis_hardware_revision(void); +int ble_svc_dis_hardware_revision_set(const char *value); +const char *ble_svc_dis_software_revision(void); +int ble_svc_dis_software_revision_set(const char *value); +const char *ble_svc_dis_manufacturer_name(void); +int ble_svc_dis_manufacturer_name_set(const char *value); +const char *ble_svc_dis_system_id(void); +int ble_svc_dis_system_id_set(const char *value); + +#endif diff --git a/src/libs/mynewt-nimble/nimble/host/services/dis/pkg.yml b/src/libs/mynewt-nimble/nimble/host/services/dis/pkg.yml new file mode 100644 index 00000000..b914ca90 --- /dev/null +++ b/src/libs/mynewt-nimble/nimble/host/services/dis/pkg.yml @@ -0,0 +1,34 @@ + +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +pkg.name: nimble/host/services/dis +pkg.description: Device Information Service Implementation. +pkg.author: "Apache Mynewt " +pkg.homepage: "http://mynewt.apache.org/" +pkg.keywords: + - ble + - bluetooth + - dis + - nimble + +pkg.deps: + - nimble/host + +pkg.init: + ble_svc_dis_init: 'MYNEWT_VAL(BLE_SVC_DIS_SYSINIT_STAGE)' diff --git a/src/libs/mynewt-nimble/nimble/host/services/dis/src/ble_svc_dis.c b/src/libs/mynewt-nimble/nimble/host/services/dis/src/ble_svc_dis.c new file mode 100644 index 00000000..0079a04c --- /dev/null +++ b/src/libs/mynewt-nimble/nimble/host/services/dis/src/ble_svc_dis.c @@ -0,0 +1,331 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +#include +#include +#include "sysinit/sysinit.h" +#include "host/ble_hs.h" +#include "services/dis/ble_svc_dis.h" + +/* Device information */ +struct ble_svc_dis_data ble_svc_dis_data = { + .model_number = MYNEWT_VAL(BLE_SVC_DIS_MODEL_NUMBER_DEFAULT), + .serial_number = MYNEWT_VAL(BLE_SVC_DIS_SERIAL_NUMBER_DEFAULT), + .firmware_revision = MYNEWT_VAL(BLE_SVC_DIS_FIRMWARE_REVISION_DEFAULT), + .hardware_revision = MYNEWT_VAL(BLE_SVC_DIS_HARDWARE_REVISION_DEFAULT), + .software_revision = MYNEWT_VAL(BLE_SVC_DIS_SOFTWARE_REVISION_DEFAULT), + .manufacturer_name = MYNEWT_VAL(BLE_SVC_DIS_MANUFACTURER_NAME_DEFAULT), + .system_id = MYNEWT_VAL(BLE_SVC_DIS_SYSTEM_ID_DEFAULT), +}; + +/* Access function */ +#if (MYNEWT_VAL(BLE_SVC_DIS_MODEL_NUMBER_READ_PERM) >= 0) || \ + (MYNEWT_VAL(BLE_SVC_DIS_SERIAL_NUMBER_READ_PERM) >= 0) || \ + (MYNEWT_VAL(BLE_SVC_DIS_HARDWARE_REVISION_READ_PERM) >= 0) || \ + (MYNEWT_VAL(BLE_SVC_DIS_FIRMWARE_REVISION_READ_PERM) >= 0) || \ + (MYNEWT_VAL(BLE_SVC_DIS_SOFTWARE_REVISION_READ_PERM) >= 0) || \ + (MYNEWT_VAL(BLE_SVC_DIS_MANUFACTURER_NAME_READ_PERM) >= 0) || \ + (MYNEWT_VAL(BLE_SVC_DIS_SYSTEM_ID_READ_PERM) >= 0) +static int +ble_svc_dis_access(uint16_t conn_handle, uint16_t attr_handle, + struct ble_gatt_access_ctxt *ctxt, void *arg); +#endif + +static const struct ble_gatt_svc_def ble_svc_dis_defs[] = { + { /*** Service: Device Information Service (DIS). */ + .type = BLE_GATT_SVC_TYPE_PRIMARY, + .uuid = BLE_UUID16_DECLARE(BLE_SVC_DIS_UUID16), + .characteristics = (struct ble_gatt_chr_def[]) { { +#if (MYNEWT_VAL(BLE_SVC_DIS_MODEL_NUMBER_READ_PERM) >= 0) + /*** Characteristic: Model Number String */ + .uuid = BLE_UUID16_DECLARE(BLE_SVC_DIS_CHR_UUID16_MODEL_NUMBER), + .access_cb = ble_svc_dis_access, + .flags = BLE_GATT_CHR_F_READ | + MYNEWT_VAL(BLE_SVC_DIS_MODEL_NUMBER_READ_PERM), + }, { +#endif +#if (MYNEWT_VAL(BLE_SVC_DIS_SERIAL_NUMBER_READ_PERM) >= 0) + /*** Characteristic: Serial Number String */ + .uuid = BLE_UUID16_DECLARE(BLE_SVC_DIS_CHR_UUID16_SERIAL_NUMBER), + .access_cb = ble_svc_dis_access, + .flags = BLE_GATT_CHR_F_READ | + MYNEWT_VAL(BLE_SVC_DIS_SERIAL_NUMBER_READ_PERM), + }, { +#endif +#if (MYNEWT_VAL(BLE_SVC_DIS_HARDWARE_REVISION_READ_PERM) >= 0) + /*** Characteristic: Hardware Revision String */ + .uuid = BLE_UUID16_DECLARE(BLE_SVC_DIS_CHR_UUID16_HARDWARE_REVISION), + .access_cb = ble_svc_dis_access, + .flags = BLE_GATT_CHR_F_READ | + MYNEWT_VAL(BLE_SVC_DIS_HARDWARE_REVISION_READ_PERM), + }, { +#endif +#if (MYNEWT_VAL(BLE_SVC_DIS_FIRMWARE_REVISION_READ_PERM) >= 0) + /*** Characteristic: Firmware Revision String */ + .uuid = BLE_UUID16_DECLARE(BLE_SVC_DIS_CHR_UUID16_FIRMWARE_REVISION), + .access_cb = ble_svc_dis_access, + .flags = BLE_GATT_CHR_F_READ | + MYNEWT_VAL(BLE_SVC_DIS_FIRMWARE_REVISION_READ_PERM), + }, { +#endif +#if (MYNEWT_VAL(BLE_SVC_DIS_SOFTWARE_REVISION_READ_PERM) >= 0) + /*** Characteristic: Software Revision String */ + .uuid = BLE_UUID16_DECLARE(BLE_SVC_DIS_CHR_UUID16_SOFTWARE_REVISION), + .access_cb = ble_svc_dis_access, + .flags = BLE_GATT_CHR_F_READ | + MYNEWT_VAL(BLE_SVC_DIS_SOFTWARE_REVISION_READ_PERM), + }, { +#endif +#if (MYNEWT_VAL(BLE_SVC_DIS_MANUFACTURER_NAME_READ_PERM) >= 0) + /*** Characteristic: Manufacturer Name */ + .uuid = BLE_UUID16_DECLARE(BLE_SVC_DIS_CHR_UUID16_MANUFACTURER_NAME), + .access_cb = ble_svc_dis_access, + .flags = BLE_GATT_CHR_F_READ | + MYNEWT_VAL(BLE_SVC_DIS_MANUFACTURER_NAME_READ_PERM), + }, { +#endif +#if (MYNEWT_VAL(BLE_SVC_DIS_SYSTEM_ID_READ_PERM) >= 0) + /*** Characteristic: System Id */ + .uuid = BLE_UUID16_DECLARE(BLE_SVC_DIS_CHR_UUID16_SYSTEM_ID), + .access_cb = ble_svc_dis_access, + .flags = BLE_GATT_CHR_F_READ | + MYNEWT_VAL(BLE_SVC_DIS_SYSTEM_ID_READ_PERM), + }, { +#endif + + 0, /* No more characteristics in this service */ + }, } + }, + + { + 0, /* No more services. */ + }, +}; + +/** + * Simple read access callback for the device information service + * characteristic. + */ +#if (MYNEWT_VAL(BLE_SVC_DIS_MODEL_NUMBER_READ_PERM) >= 0) || \ + (MYNEWT_VAL(BLE_SVC_DIS_SERIAL_NUMBER_READ_PERM) >= 0) || \ + (MYNEWT_VAL(BLE_SVC_DIS_HARDWARE_REVISION_READ_PERM) >= 0) || \ + (MYNEWT_VAL(BLE_SVC_DIS_FIRMWARE_REVISION_READ_PERM) >= 0) || \ + (MYNEWT_VAL(BLE_SVC_DIS_SOFTWARE_REVISION_READ_PERM) >= 0) || \ + (MYNEWT_VAL(BLE_SVC_DIS_MANUFACTURER_NAME_READ_PERM) >= 0) || \ + (MYNEWT_VAL(BLE_SVC_DIS_SYSTEM_ID_READ_PERM) >= 0) +static int +ble_svc_dis_access(uint16_t conn_handle, uint16_t attr_handle, + struct ble_gatt_access_ctxt *ctxt, void *arg) +{ + uint16_t uuid = ble_uuid_u16(ctxt->chr->uuid); + const char *info = NULL; + + switch(uuid) { +#if (MYNEWT_VAL(BLE_SVC_DIS_MODEL_NUMBER_READ_PERM) >= 0) + case BLE_SVC_DIS_CHR_UUID16_MODEL_NUMBER: + info = ble_svc_dis_data.model_number; +#ifdef MYNEWT_VAL_BLE_SVC_DIS_MODEL_NUMBER_NAME_DEFAULT + if (info == NULL) { + info = MYNEWT_VAL(BLE_SVC_DIS_MODEL_NUMBER_DEFAULT); + } +#endif + break; +#endif +#if (MYNEWT_VAL(BLE_SVC_DIS_SERIAL_NUMBER_READ_PERM) >= 0) + case BLE_SVC_DIS_CHR_UUID16_SERIAL_NUMBER: + info = ble_svc_dis_data.serial_number; +#ifdef MYNEWT_VAL_BLE_SVC_DIS_SERIAL_NUMBER_DEFAULT + if (info == NULL) { + info = MYNEWT_VAL(BLE_SVC_DIS_SERIAL_NUMBER_DEFAULT); + } +#endif + break; +#endif +#if (MYNEWT_VAL(BLE_SVC_DIS_FIRMWARE_REVISION_READ_PERM) >= 0) + case BLE_SVC_DIS_CHR_UUID16_FIRMWARE_REVISION: + info = ble_svc_dis_data.firmware_revision; +#ifdef MYNEWT_VAL_BLE_SVC_DIS_FIRMWARE_REVISION_DEFAULT + if (info == NULL) { + info = MYNEWT_VAL(BLE_SVC_DIS_FIRMWARE_REVISION_DEFAULT); + } +#endif + break; +#endif +#if (MYNEWT_VAL(BLE_SVC_DIS_HARDWARE_REVISION_READ_PERM) >= 0) + case BLE_SVC_DIS_CHR_UUID16_HARDWARE_REVISION: + info = ble_svc_dis_data.hardware_revision; +#ifdef MYNEWT_VAL_BLE_SVC_DIS_HARDWARE_REVISION_DEFAULT + if (info == NULL) { + info = MYNEWT_VAL(BLE_SVC_DIS_HARDWARE_REVISION_DEFAULT); + } +#endif + break; +#endif +#if (MYNEWT_VAL(BLE_SVC_DIS_SOFTWARE_REVISION_READ_PERM) >= 0) + case BLE_SVC_DIS_CHR_UUID16_SOFTWARE_REVISION: + info = ble_svc_dis_data.software_revision; +#ifdef MYNEWT_VAL_BLE_SVC_DIS_SOFTWARE_REVISION_DEFAULT + if (info == NULL) { + info = MYNEWT_VAL(BLE_SVC_DIS_SOFTWARE_REVISION_DEFAULT); + } +#endif + break; +#endif +#if (MYNEWT_VAL(BLE_SVC_DIS_MANUFACTURER_NAME_READ_PERM) >= 0) + case BLE_SVC_DIS_CHR_UUID16_MANUFACTURER_NAME: + info = ble_svc_dis_data.manufacturer_name; +#ifdef MYNEWT_VAL_BLE_SVC_DIS_MANUFACTURER_NAME_DEFAULT + if (info == NULL) { + info = MYNEWT_VAL(BLE_SVC_DIS_MANUFACTURER_NAME_DEFAULT); + } +#endif + break; +#endif +#if (MYNEWT_VAL(BLE_SVC_DIS_SYSTEM_ID_READ_PERM) >= 0) + case BLE_SVC_DIS_CHR_UUID16_SYSTEM_ID: + info = ble_svc_dis_data.system_id; +#ifdef MYNEWT_VAL_BLE_SVC_DIS_SYSTEM_ID_DEFAULT + if (info == NULL) { + info = MYNEWT_VAL(BLE_SVC_DIS_SYSTEM_ID_DEFAULT); + } +#endif + break; +#endif + default: + assert(0); + return BLE_ATT_ERR_UNLIKELY; + } + + if (info != NULL) { + int rc = os_mbuf_append(ctxt->om, info, strlen(info)); + return rc == 0 ? 0 : BLE_ATT_ERR_INSUFFICIENT_RES; + } + + return 0; +} +#endif + +const char * +ble_svc_dis_model_number(void) +{ + return ble_svc_dis_data.model_number; +} + +int +ble_svc_dis_model_number_set(const char *value) +{ + ble_svc_dis_data.model_number = value; + return 0; +} + +const char * +ble_svc_dis_serial_number(void) +{ + return ble_svc_dis_data.serial_number; +} + +int +ble_svc_dis_serial_number_set(const char *value) +{ + ble_svc_dis_data.serial_number = value; + return 0; +} + +const char * +ble_svc_dis_firmware_revision(void) +{ + return ble_svc_dis_data.firmware_revision; +} + +int +ble_svc_dis_firmware_revision_set(const char *value) +{ + ble_svc_dis_data.firmware_revision = value; + return 0; +} + +const char * +ble_svc_dis_hardware_revision(void) +{ + return ble_svc_dis_data.hardware_revision; +} + +int +ble_svc_dis_hardware_revision_set(const char *value) +{ + ble_svc_dis_data.hardware_revision = value; + return 0; +} + +const char * +ble_svc_dis_software_revision(void) +{ + return ble_svc_dis_data.software_revision; +} + +int +ble_svc_dis_software_revision_set(const char *value) +{ + ble_svc_dis_data.software_revision = value; + return 0; +} + +const char * +ble_svc_dis_manufacturer_name(void) +{ + return ble_svc_dis_data.manufacturer_name; +} + +int +ble_svc_dis_manufacturer_name_set(const char *value) +{ + ble_svc_dis_data.manufacturer_name = value; + return 0; +} + +const char * +ble_svc_dis_system_id(void) +{ + return ble_svc_dis_data.system_id; +} + +int +ble_svc_dis_system_id_set(const char *value) +{ + ble_svc_dis_data.system_id = value; + return 0; +} + +/** + * Initialize the DIS package. + */ +void +ble_svc_dis_init(void) +{ + int rc; + + /* Ensure this function only gets called by sysinit. */ + SYSINIT_ASSERT_ACTIVE(); + + rc = ble_gatts_count_cfg(ble_svc_dis_defs); + SYSINIT_PANIC_ASSERT(rc == 0); + + rc = ble_gatts_add_svcs(ble_svc_dis_defs); + SYSINIT_PANIC_ASSERT(rc == 0); +} diff --git a/src/libs/mynewt-nimble/nimble/host/services/dis/syscfg.yml b/src/libs/mynewt-nimble/nimble/host/services/dis/syscfg.yml new file mode 100644 index 00000000..b306d3bb --- /dev/null +++ b/src/libs/mynewt-nimble/nimble/host/services/dis/syscfg.yml @@ -0,0 +1,109 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +syscfg.defs: + BLE_SVC_DIS_DEFAULT_READ_PERM: + description: > + Defines default permissions for reading characteristics. Can be + zero to allow read without extra permissions or combination of: + BLE_GATT_CHR_F_READ_ENC + BLE_GATT_CHR_F_READ_AUTHEN + BLE_GATT_CHR_F_READ_AUTHOR + Set to '-1' to remove this characteristic. + value: -1 + BLE_SVC_DIS_MODEL_NUMBER_READ_PERM: + description: > + Defines permissions for reading "Model Number" characteristics. + Can be set to BLE_SVC_DIS_DEFAULT_READ_PERM or use any of the + possible values defined for that setting. + value: 0 + BLE_SVC_DIS_MODEL_NUMBER_DEFAULT: + description: > + Defines a default value for "Model number" if not set with + 'ble_svc_dis_model_number_set'. + value: '"Apache Mynewt NimBLE"' + BLE_SVC_DIS_SERIAL_NUMBER_READ_PERM: + description: > + Defines permissions for reading "Serial Number" characteristics. + Can be set to BLE_SVC_DIS_DEFAULT_READ_PERM or use any of the + possible values defined for that setting. + value: MYNEWT_VAL(BLE_SVC_DIS_DEFAULT_READ_PERM) + BLE_SVC_DIS_SERIAL_NUMBER_DEFAULT: + description: > + Defines a default value for "Serial number" if not set with + 'ble_svc_dis_serial_number_set'. + value: NULL + BLE_SVC_DIS_HARDWARE_REVISION_READ_PERM: + description: > + Defines permissions for reading "Hardware Revision" characteristics. + Can be set to BLE_SVC_DIS_DEFAULT_READ_PERM or use any of the + possible values defined for that setting. + value: MYNEWT_VAL(BLE_SVC_DIS_DEFAULT_READ_PERM) + BLE_SVC_DIS_HARDWARE_REVISION_DEFAULT: + description: > + Defines a default value for "Hardware revision" if not set with + 'ble_svc_dis_hardware_revision_set'. + value: NULL + BLE_SVC_DIS_FIRMWARE_REVISION_READ_PERM: + description: > + Defines permissions for reading "Firmware Revision" characteristics. + Can be set to BLE_SVC_DIS_DEFAULT_READ_PERM or use any of the + possible values defined for that setting. + value: MYNEWT_VAL(BLE_SVC_DIS_DEFAULT_READ_PERM) + BLE_SVC_DIS_FIRMWARE_REVISION_DEFAULT: + description: > + Defines a default value for "Software revision" if not set with + 'ble_svc_dis_firmware_revision_set'. + value: NULL + BLE_SVC_DIS_SOFTWARE_REVISION_READ_PERM: + description: > + Defines permissions for reading "Software Revision" characteristics. + Can be set to BLE_SVC_DIS_DEFAULT_READ_PERM or use any of the + possible values defined for that setting. + value: MYNEWT_VAL(BLE_SVC_DIS_DEFAULT_READ_PERM) + BLE_SVC_DIS_SOFTWARE_REVISION_DEFAULT: + description: > + Defines a default value for "Software revision" if not set with + 'ble_svc_dis_software_revision_set'. + value: NULL + BLE_SVC_DIS_MANUFACTURER_NAME_READ_PERM: + description: > + Defines permissions for reading "Manufacturer name" characteristics. + Can be set to BLE_SVC_DIS_DEFAULT_READ_PERM or use any of the + possible values defined for that setting. + value: MYNEWT_VAL(BLE_SVC_DIS_DEFAULT_READ_PERM) + BLE_SVC_DIS_MANUFACTURER_NAME_DEFAULT: + description: > + Defines a default value for "Manufacturer name" if not set with + 'ble_svc_dis_manufacturer_name_set'. + value: NULL + BLE_SVC_DIS_SYSTEM_ID_READ_PERM: + description: > + Defines permissions for reading "System ID" characteristics. + Can be set to BLE_SVC_DIS_DEFAULT_READ_PERM or use any of the + possible values defined for that setting. + value: MYNEWT_VAL(BLE_SVC_DIS_DEFAULT_READ_PERM) + BLE_SVC_DIS_SYSTEM_ID_DEFAULT: + description: > + Defines a default value for "System ID" if not set with + 'ble_svc_dis_manufacturer_name_set'. + value: NULL + BLE_SVC_DIS_SYSINIT_STAGE: + description: > + Sysinit stage for the device information BLE service. + value: 303 -- cgit v1.2.3