aboutsummaryrefslogtreecommitdiff
path: root/inc/bluetooth/profile/server/dis_config.h
blob: 3c3652319a75abf3371b67c97f64dc71567f275b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
#ifndef _DIS_CONFIG_H_
#define _DIS_CONFIG_H_



/** @defgroup DIS Device Information Service
  * @brief Device information service
  * @{
  */


/** @defgroup DIS_CONFIG Device Information Service Config
  * @brief Device information service config
  * @{
  */

/** @defgroup DIS_Common_Exported_Macros Device Information Service Config Common Exported Macros
  * @{
  */


/** @defgroup DIS_Config_Supported_Features Device Information Service Config Supported Features
  * @brief
    The Device Information Service may expose one or more of the characteristics, user can
    config DIS_CHAR_XXX_SUPPORT to 1 to support it, otherwise set it to 0.
  * @{
  */

/** @details
    Set DIS_CHAR_MANUFACTURER_NAME_SUPPORT to 1 to support Manufacturer Name String characteristic,
    otherwise set it to 0.
*/
#define DIS_CHAR_MANUFACTURER_NAME_SUPPORT          1

/** @details
    Set DIS_CHAR_MODEL_NUMBER_SUPPORT to 1 to support Model Number String characteristic,
    otherwise set it to 0.
*/
#define DIS_CHAR_MODEL_NUMBER_SUPPORT               1

/** @details
    Set DIS_CHAR_SERIAL_NUMBER_SUPPORT to 1 to support Serial Number String characteristic,
    otherwise set it to 0.
*/
#define DIS_CHAR_SERIAL_NUMBER_SUPPORT              1

/** @details
    Set DIS_CHAR_FIRMWARE_REVISION_SUPPORT to 1 to support Firmware Revision String characteristic,
    otherwise set it to 0.
*/
#define DIS_CHAR_FIRMWARE_REVISION_SUPPORT          1

/** @details
    Set DIS_CHAR_HARDWARE_REVISION_SUPPORT to 1 to support Hardware Revision String characteristic,
    otherwise set it to 0.
*/
#define DIS_CHAR_HARDWARE_REVISION_SUPPORT          1

/** @details
    Set DIS_CHAR_SOFTWARE_REVISION_SUPPORT to 1 to support Software Revision String characteristic,
    otherwise set it to 0.
*/
#define DIS_CHAR_SOFTWARE_REVISION_SUPPORT          1


/** @details
    Set DIS_CHAR_SYSTEM_ID_SUPPORT to 1 to support System ID characteristic,
    otherwise set it to 0.
*/
#define DIS_CHAR_SYSTEM_ID_SUPPORT                  1


/** @details
    Set DIS_CHAR_IEEE_CERTIF_DATA_LIST_SUPPORT to 1 to support IEEE 11073-20601 Regulatory Certification Data List characteristic,
    otherwise set it to 0.
*/
#define DIS_CHAR_IEEE_CERTIF_DATA_LIST_SUPPORT      1

/** @details
    Set DIS_CHAR_PNP_ID_SUPPORT to 1 to support PnP ID characteristic,
    otherwise set it to 0.
*/
#define DIS_CHAR_PNP_ID_SUPPORT                     1
/**
  * @}
  */



/** @defgroup DIS_Config_Max_Char_Value_Length Device Information Service Config Supported Value Length
  * @brief
    The max length of characteristic value can be configured here.
  * @{
  */
#ifdef DIS_CHAR_MANUFACTURER_NAME_SUPPORT
#define DIS_CHAR_MANUFACTURER_NAME_STR_MAX_LENGTH   20 /**< Max length of Manufacturer Name String characteristic value*/
#endif

#ifdef DIS_CHAR_MODEL_NUMBER_SUPPORT
#define DIS_CHAR_MODEL_NUMBER_STR_MAX_LENGTH        20  /**< Max length of Model Number String characteristic value*/
#endif

#ifdef DIS_CHAR_SERIAL_NUMBER_SUPPORT
#define DIS_CHAR_SERIAL_NUMBER_STR_MAX_LENGTH       20 /**< Max length of Serial Number String characteristic value*/
#endif

#ifdef DIS_CHAR_FIRMWARE_REVISION_SUPPORT
#define DIS_CHAR_FIRMWARE_REVISION_STR_MAX_LENGTH   20 /**< Max length of Firmware Revision String characteristic value*/
#endif

#ifdef DIS_CHAR_HARDWARE_REVISION_SUPPORT
#define DIS_CHAR_HARDWARE_REVISION_STR_MAX_LENGTH   20 /**< Max length of Hardware Revision String scharacteristic value*/
#endif

#ifdef DIS_CHAR_SOFTWARE_REVISION_SUPPORT
#define DIS_CHAR_SOFTWARE_REVISION_STR_MAX_LENGTH   20 /**< Max length of Software Revision String characteristic value*/
#endif


#ifdef DIS_CHAR_IEEE_CERTIF_DATA_LIST_SUPPORT
#define DIS_CHAR_IEEE_CERTIF_DATA_LIST_MAX_LENGTH  30 /**< Max length of IEEE 11073-20601 Regulatory Certification Data List characteristic value*/
#endif
/**
  * @}
  */



/** @defgroup DIS_Config_Char_Value_Index Device Information Service Config Characteristic Value Index
  * @brief
    Attribute index value of each characteristic shall be configured by characteristic supported. If some
  * @{
  */
#define GATT_SVC_DIS_MANU_NAME_INDEX        2   /**< Attribute index of Manufacturer Name String characteristic */
#define GATT_SVC_DIS_MODEL_NUM_INDEX        4   /**< Attribute index of Model Number String characteristic */
#define GATT_SVC_DIS_SERIAL_NUM_INDEX       6   /**< Attribute index of Serial Number String characteristic */
#define GATT_SVC_DIS_HARDWARE_REV_INDEX     8   /**< Attribute index of Hardware Revision String characteristic */
#define GATT_SVC_DIS_FIRMWARE_REV_INDEX     10  /**< Attribute index of Firmware Revision String characteristic */
#define GATT_SVC_DIS_SOFTWARE_REV_INDEX     12  /**< Attribute index of Software Revision String characteristic */
#define GATT_SVC_DIS_SYSTEM_ID_INDEX        14  /**< Attribute index of System ID characteristic */
#define GATT_SVC_DIS_IEEE_CERT_STR_INDEX    16  /**< Attribute index of IEEE 11073-20601 Regulatory Certification Data List characteristic */
#define GATT_SVC_DIS_PNP_ID_INDEX           18  /**< Attribute index of Pnp ID characteristic */
/**
  * @}
  */


/** @} End of DIS_Common_Exported_Macros */

/** @} End of DIS_CONFIG */

/** @} End of DIS */


#endif