dis.h
Go to the documentation of this file.
1
62 #ifndef __DIS_H__
63 #define __DIS_H__
64
65 #include "gr55xx_sys.h"
66 #include "custom_config.h"
67 #include <stdint.h>
68
73 #define DIS_CONNECTION_MAX (10 < CFG_MAX_CONNECTIONS ?\
74 10 : CFG_MAX_CONNECTIONS)
76 #define DIS_SYS_ID_LEN 8
77 #define DIS_PNP_ID_LEN 7
78 #define DIS_VAL_MAX_LEN 128
79 #define DIS_IEEE_CERTIF_MIN_LEN 6
86 #define DIS_CHAR_SYSTEM_ID_SUP 0x00000006
87 #define DIS_CHAR_MODEL_NUMBER_SUP 0x00000018
88 #define DIS_CHAR_SERIAL_NUMBER_SUP 0x00000060
89 #define DIS_CHAR_FIRMWARE_REV_SUP 0x00000180
90 #define DIS_CHAR_HARDWARE_REV_SUP 0x00000600
91 #define DIS_CHAR_SOFTWARE_REV_SUP 0x00001800
92 #define DIS_CHAR_MANUFACTURER_NAME_SUP 0x00006000
93 #define DIS_CHAR_11073_CERT_DATA_SUP 0x00018000
94 #define DIS_CHAR_PNP_ID_SUP 0x00060000
95 #define DIS_CHAR_FULL 0x0007ffff
102 #define DIS_11073_BODY_EMPTY 0
103 #define DIS_11073_BODY_IEEE 1
104 #define DIS_11073_BODY_CONTINUA 2
105 #define DIS_11073_BODY_EXP 254
114 typedef struct
115 {
116 uint8_t length;
117 char *p_str;
118 } dis_string_t;
119
122 typedef struct
123 {
124 uint8_t manufacturer_id[5];
125 uint8_t org_unique_id[3];
126 } dis_sys_id_t;
127
129 typedef struct
130 {
131 char *p_list;
133 uint8_t list_len;
134 } dis_reg_cert_data_list_t;
135
137 typedef struct
138 {
139 uint8_t vendor_id_source;
140 uint16_t vendor_id;
141 uint16_t product_id;
142 uint16_t product_version;
143 } dis_pnp_id_t;
144
147 typedef struct
148 {
149 uint32_t char_mask;
150 dis_string_t manufact_name_str;
151 dis_string_t model_num_str;
152 dis_string_t serial_num_str;
153 dis_string_t hw_rev_str;
154 dis_string_t fw_rev_str;
155 dis_string_t sw_rev_str;
156 dis_sys_id_t *p_sys_id;
157 dis_reg_cert_data_list_t reg_cert_data_list;
158 dis_pnp_id_t *p_pnp_id;
159 } dis_init_t;
175 sdk_err_t dis_service_init(dis_init_t *p_dis_init);
178 #endif
179
dis_init_t::reg_cert_data_list
dis_reg_cert_data_list_t reg_cert_data_list
Definition: dis.h:157
dis_sys_id_t
System ID parameters. The first field is the LSOs and the second field contains the MSOs.
Definition: dis.h:123
dis_init_t::model_num_str
dis_string_t model_num_str
Definition: dis.h:151
dis_init_t::manufact_name_str
dis_string_t manufact_name_str
Definition: dis.h:150
dis_pnp_id_t::vendor_id
uint16_t vendor_id
Definition: dis.h:140
dis_init_t::char_mask
uint32_t char_mask
Definition: dis.h:149
dis_pnp_id_t::product_version
uint16_t product_version
Definition: dis.h:142
dis_init_t::sw_rev_str
dis_string_t sw_rev_str
Definition: dis.h:155
gr55xx_sys.h
GR55XX System API.
dis_string_t::p_str
char * p_str
Definition: dis.h:117
dis_reg_cert_data_list_t::list_len
uint8_t list_len
Definition: dis.h:133
dis_string_t
UTF-8 string data type.
Definition: dis.h:115
dis_pnp_id_t::vendor_id_source
uint8_t vendor_id_source
Definition: dis.h:139
dis_pnp_id_t::product_id
uint16_t product_id
Definition: dis.h:141
sdk_err_t
uint16_t sdk_err_t
SDK API result type.
Definition: ble_error.h:243
dis_init_t::serial_num_str
dis_string_t serial_num_str
Definition: dis.h:152
dis_reg_cert_data_list_t::p_list
char * p_list
Definition: dis.h:131
dis_pnp_id_t
PnP ID parameters.
Definition: dis.h:138
dis_init_t
Device Information Service init structure. This contains all options and data needed for initializati...
Definition: dis.h:148
dis_init_t::p_pnp_id
dis_pnp_id_t * p_pnp_id
Definition: dis.h:158
dis_reg_cert_data_list_t
IEEE 11073-20601 Regulatory Certification Data List Structure.
Definition: dis.h:130
dis_string_t::length
uint8_t length
Definition: dis.h:116
dis_service_init
sdk_err_t dis_service_init(dis_init_t *p_dis_init)
Initialize a Device Information Service instance and add in the database.
dis_init_t::p_sys_id
dis_sys_id_t * p_sys_id
Definition: dis.h:156
dis_init_t::hw_rev_str
dis_string_t hw_rev_str
Definition: dis.h:153
dis_init_t::fw_rev_str
dis_string_t fw_rev_str
Definition: dis.h:154