Lines Matching refs:len

132 			uint16_t len, uint16_t offset)  in read_str()  argument
134 return bt_gatt_attr_read(conn, attr, buf, len, offset, attr->user_data, in read_str()
140 uint16_t len, uint16_t offset) in read_pnp_id() argument
142 return bt_gatt_attr_read(conn, attr, buf, len, offset, &dis_pnp_id, sizeof(dis_pnp_id)); in read_pnp_id()
148 uint16_t len, uint16_t offset) in read_system_id() argument
150 return bt_gatt_attr_read(conn, attr, buf, len, offset, dis_system_id, in read_system_id()
170 uint16_t *index, uint16_t len, uint16_t offset) in read_udi_subval() argument
177 if (*bytes_read == len) { in read_udi_subval()
187 if (*index >= offset && *bytes_read < len) { in read_udi_subval()
198 uint16_t len, uint16_t offset) in read_udi() argument
213 &bytes_read, &index, len, offset); in read_udi()
215 &bytes_read, &index, len, offset); in read_udi()
217 &bytes_read, &index, len, offset); in read_udi()
219 buf_i, &bytes_read, &index, len, offset); in read_udi()
294 int16_t len = read_cb((void *)new, (void *)old, CONFIG_BT_DIS_STR_MAX); in dis_update_udi_value() local
296 if (len < 0) { in dis_update_udi_value()
297 LOG_ERR("Failed to read UDI %s from storage (err %zd)", logkey, len); in dis_update_udi_value()
299 old[len] = '\0'; in dis_update_udi_value()
308 ssize_t len; in dis_set() local
314 len = read_cb(store, &dis_manuf, sizeof(dis_manuf) - 1); in dis_set()
315 if (len < 0) { in dis_set()
316 LOG_ERR("Failed to read manufacturer from storage (err %zd)", len); in dis_set()
318 dis_manuf[len] = '\0'; in dis_set()
325 len = read_cb(store, &dis_model, sizeof(dis_model) - 1); in dis_set()
326 if (len < 0) { in dis_set()
327 LOG_ERR("Failed to read model from storage (err %zd)", len); in dis_set()
329 dis_model[len] = '\0'; in dis_set()
337 len = read_cb(store, &dis_serial_number, sizeof(dis_serial_number) - 1); in dis_set()
338 if (len < 0) { in dis_set()
339 LOG_ERR("Failed to read serial number from storage (err %zd)", len); in dis_set()
341 dis_serial_number[len] = '\0'; in dis_set()
350 len = read_cb(store, &dis_fw_rev, sizeof(dis_fw_rev) - 1); in dis_set()
351 if (len < 0) { in dis_set()
352 LOG_ERR("Failed to read firmware revision from storage (err %zd)", len); in dis_set()
354 dis_fw_rev[len] = '\0'; in dis_set()
363 len = read_cb(store, &dis_hw_rev, sizeof(dis_hw_rev) - 1); in dis_set()
364 if (len < 0) { in dis_set()
365 LOG_ERR("Failed to read hardware revision from storage (err %zd)", len); in dis_set()
367 dis_hw_rev[len] = '\0'; in dis_set()
376 len = read_cb(store, &dis_sw_rev, sizeof(dis_sw_rev) - 1); in dis_set()
377 if (len < 0) { in dis_set()
378 LOG_ERR("Failed to read software revision from storage (err %zd)", len); in dis_set()
380 dis_sw_rev[len] = '\0'; in dis_set()
412 len = read_cb(store, &oui, sizeof(oui)); in dis_set()
413 if (len < 0) { in dis_set()
414 LOG_ERR("Failed to read System ID OUI from storage (err %zd)", len); in dis_set()
424 len = read_cb(store, &identifier, sizeof(identifier)); in dis_set()
425 if (len < 0) { in dis_set()
426 LOG_ERR("Failed to read System ID identifier from storage (err %zd)", len); in dis_set()
436 len = read_cb(store, &dis_ieee_rcdl, sizeof(dis_ieee_rcdl) - 1); in dis_set()
437 if (len < 0) { in dis_set()
440 len); in dis_set()
442 dis_ieee_rcdl[len] = '\0'; in dis_set()