@@ -118,7 +118,7 @@ static const struct mjs_c_struct_member gattc_discovery_result_arg_def[] = {
118
118
MJS_STRUCT_FIELD_TYPE_UINT16 , NULL },
119
119
{"prop" , offsetof(struct mgos_bt_gattc_discovery_result_arg , prop ),
120
120
MJS_STRUCT_FIELD_TYPE_UINT8 , NULL },
121
- {NULL , 0 , MJS_STRUCT_FIELD_TYPE_INVALID , NULL },
121
+ {NULL },
122
122
};
123
123
124
124
const struct mjs_c_struct_member * mgos_bt_gattc_js_get_discovery_result_arg_def (
@@ -133,7 +133,7 @@ static const struct mjs_c_struct_member gattc_read_result_def[] = {
133
133
MJS_STRUCT_FIELD_TYPE_UINT16 , NULL },
134
134
{"data" , offsetof(struct mgos_bt_gattc_read_result , data ),
135
135
MJS_STRUCT_FIELD_TYPE_MG_STR , NULL },
136
- {NULL , 0 , MJS_STRUCT_FIELD_TYPE_INVALID , NULL },
136
+ {NULL },
137
137
};
138
138
139
139
const struct mjs_c_struct_member * mgos_bt_gattc_js_get_read_result_def (void ) {
@@ -149,23 +149,27 @@ static const struct mjs_c_struct_member gatts_read_arg_def[] = {
149
149
MJS_STRUCT_FIELD_TYPE_CUSTOM , bt_uuid_to_str },
150
150
{"char_uuid" , offsetof(struct mgos_bt_gatts_read_arg , char_uuid ),
151
151
MJS_STRUCT_FIELD_TYPE_CUSTOM , bt_uuid_to_str },
152
+ {"desc_uuid" , offsetof(struct mgos_bt_gatts_read_arg , desc_uuid ),
153
+ MJS_STRUCT_FIELD_TYPE_CUSTOM , bt_uuid_to_str },
152
154
{"handle" , offsetof(struct mgos_bt_gatts_read_arg , handle ),
153
155
MJS_STRUCT_FIELD_TYPE_UINT16 , NULL },
154
156
{"transId" , offsetof(struct mgos_bt_gatts_read_arg , trans_id ),
155
157
MJS_STRUCT_FIELD_TYPE_INT , NULL },
156
158
{"offset" , offsetof(struct mgos_bt_gatts_read_arg , offset ),
157
159
MJS_STRUCT_FIELD_TYPE_UINT16 , NULL },
158
- {NULL , 0 , MJS_STRUCT_FIELD_TYPE_INVALID , NULL },
160
+ {NULL },
159
161
};
160
162
161
163
const struct mjs_c_struct_member * mgos_bt_gatts_js_get_read_arg_def (void ) {
162
164
return gatts_read_arg_def ;
163
165
}
164
166
165
167
static const struct mjs_c_struct_member gatts_write_arg_def [] = {
166
- {"svc_uuid" , offsetof(struct mgos_bt_gatts_read_arg , svc_uuid ),
168
+ {"svc_uuid" , offsetof(struct mgos_bt_gatts_write_arg , svc_uuid ),
167
169
MJS_STRUCT_FIELD_TYPE_CUSTOM , bt_uuid_to_str },
168
- {"char_uuid" , offsetof(struct mgos_bt_gatts_read_arg , char_uuid ),
170
+ {"char_uuid" , offsetof(struct mgos_bt_gatts_write_arg , char_uuid ),
171
+ MJS_STRUCT_FIELD_TYPE_CUSTOM , bt_uuid_to_str },
172
+ {"desc_uuid" , offsetof(struct mgos_bt_gatts_write_arg , desc_uuid ),
169
173
MJS_STRUCT_FIELD_TYPE_CUSTOM , bt_uuid_to_str },
170
174
{"handle" , offsetof(struct mgos_bt_gatts_write_arg , handle ),
171
175
MJS_STRUCT_FIELD_TYPE_UINT16 , NULL },
@@ -175,7 +179,7 @@ static const struct mjs_c_struct_member gatts_write_arg_def[] = {
175
179
MJS_STRUCT_FIELD_TYPE_UINT16 , NULL },
176
180
{"data" , offsetof(struct mgos_bt_gatts_write_arg , data ),
177
181
MJS_STRUCT_FIELD_TYPE_MG_STR , NULL },
178
- {NULL , 0 , MJS_STRUCT_FIELD_TYPE_INVALID , NULL },
182
+ {NULL },
179
183
};
180
184
181
185
const struct mjs_c_struct_member * mgos_bt_gatts_js_get_write_arg_def (void ) {
@@ -189,15 +193,15 @@ static mjs_val_t nm_to_int(struct mjs *mjs, void *ap) {
189
193
}
190
194
191
195
static const struct mjs_c_struct_member gatts_notify_mode_arg_def [] = {
192
- {"svc_uuid" , offsetof(struct mgos_bt_gatts_read_arg , svc_uuid ),
196
+ {"svc_uuid" , offsetof(struct mgos_bt_gatts_notify_mode_arg , svc_uuid ),
193
197
MJS_STRUCT_FIELD_TYPE_CUSTOM , bt_uuid_to_str },
194
- {"char_uuid" , offsetof(struct mgos_bt_gatts_read_arg , char_uuid ),
198
+ {"char_uuid" , offsetof(struct mgos_bt_gatts_notify_mode_arg , char_uuid ),
195
199
MJS_STRUCT_FIELD_TYPE_CUSTOM , bt_uuid_to_str },
196
200
{"handle" , offsetof(struct mgos_bt_gatts_notify_mode_arg , handle ),
197
201
MJS_STRUCT_FIELD_TYPE_UINT16 , NULL },
198
202
{"mode" , offsetof(struct mgos_bt_gatts_notify_mode_arg , mode ),
199
203
MJS_STRUCT_FIELD_TYPE_CUSTOM , nm_to_int },
200
- {NULL , 0 , MJS_STRUCT_FIELD_TYPE_INVALID , NULL },
204
+ {NULL },
201
205
};
202
206
203
207
const struct mjs_c_struct_member * mgos_bt_gatts_js_get_notify_mode_arg_def (
0 commit comments