Home
last modified time | relevance | path

Searched refs:read_len (Results 1 – 25 of 28) sorted by relevance

12

/Zephyr-latest/tests/bsim/bluetooth/host/att/long_read/
Dmain.c42 ssize_t read_len; in read_mtu_validation_chrc() local
54 read_len = buf_len; in read_mtu_validation_chrc()
56 __ASSERT_NO_MSG(read_len > 0); in read_mtu_validation_chrc()
60 read_len -= 1; in read_mtu_validation_chrc()
72 memset(buf, 0, read_len); in read_mtu_validation_chrc()
77 __ASSERT_NO_MSG(read_len >= 2); in read_mtu_validation_chrc()
78 sys_put_le16(read_len, buf); in read_mtu_validation_chrc()
80 return read_len; in read_mtu_validation_chrc()
/Zephyr-latest/subsys/shell/backends/
Dshell_rpmsg.c136 size_t read_len; in read() local
157 read_len = rx->len - sh_rpmsg->rx_consumed; in read()
158 if (read_len > length) { in read()
159 read_len = length; in read()
163 *cnt = read_len; in read()
164 memcpy(data, &((char *)rx->data)[sh_rpmsg->rx_consumed], read_len); in read()
170 sh_rpmsg->rx_consumed += read_len; in read()
Dshell_websocket.c335 size_t read_len; in sh_read() local
350 read_len = ws->rx_len; in sh_read()
351 if (read_len > length) { in sh_read()
352 read_len = length; in sh_read()
355 memcpy(data, ws->rx_buf, read_len); in sh_read()
356 *cnt = read_len; in sh_read()
358 ws->rx_len -= read_len; in sh_read()
360 memmove(ws->rx_buf, ws->rx_buf + read_len, ws->rx_len); in sh_read()
Dshell_telnet.c738 size_t read_len; in telnet_read() local
755 read_len = sh_telnet->rx_len; in telnet_read()
756 if (read_len > length) { in telnet_read()
757 read_len = length; in telnet_read()
760 memcpy(data, sh_telnet->rx_buf, read_len); in telnet_read()
761 *cnt = read_len; in telnet_read()
763 sh_telnet->rx_len -= read_len; in telnet_read()
765 memmove(sh_telnet->rx_buf, sh_telnet->rx_buf + read_len, in telnet_read()
/Zephyr-latest/drivers/sensor/bosch/bmi160/
Demul_bmi160.h40 uint8_t read_len = msgs[1].len; in emul_bmi160_i2c_is_touching_reg() local
42 return (start_reg <= reg) && (reg < start_reg + read_len); in emul_bmi160_i2c_is_touching_reg()
/Zephyr-latest/tests/bsim/bluetooth/host/att/timeout/
Dmain.c47 ssize_t read_len; in read_chrc() local
57 read_len = buf_len; in read_chrc()
59 __ASSERT_NO_MSG(read_len >= 2); in read_chrc()
60 sys_put_le16(read_len, buf); in read_chrc()
62 return read_len; in read_chrc()
/Zephyr-latest/subsys/llext/
Dbuf_loader.c16 size_t read_len = end - buf_l->pos; in llext_buf_read() local
18 memcpy(buf, buf_l->buf + buf_l->pos, read_len); in llext_buf_read()
/Zephyr-latest/subsys/bluetooth/mesh/
Dsettings.c65 void *out, size_t read_len) in bt_mesh_settings_set() argument
69 len = read_cb(cb_arg, out, read_len); in bt_mesh_settings_set()
77 if (len != read_len) { in bt_mesh_settings_set()
78 LOG_ERR("Unexpected value length (%zd != %zu)", len, read_len); in bt_mesh_settings_set()
Dsettings.h57 void *out, size_t read_len);
/Zephyr-latest/drivers/serial/
Dserial_test.c175 int read_len = ring_buf_get(data->read_queue, rx_data, size); in fifo_read() local
177 LOG_HEXDUMP_DBG(rx_data, read_len, ""); in fifo_read()
178 return read_len; in fifo_read()
367 uint32_t read_len; in async_rx_run() local
378 read_len = ring_buf_get(data->read_queue, &data->read_buf[data->read_position], in async_rx_run()
381 if (read_len != 0) { in async_rx_run()
385 .data.rx.len = read_len, in async_rx_run()
391 data->read_position += read_len; in async_rx_run()
/Zephyr-latest/drivers/w1/
Dw1_net.c370 uint8_t *read_buf, size_t read_len) in write_read() argument
384 if (read_buf == NULL && read_len > 0) { in write_read()
387 return w1_read_block(dev, read_buf, read_len); in write_read()
392 uint8_t *read_buf, size_t read_len) in w1_write_read() argument
397 ret = write_read(dev, config, write_buf, write_len, read_buf, read_len); in w1_write_read()
Dw1_shell.c124 size_t read_len; in cmd_w1_read_block() local
133 read_len = strtoul(argv[2], &end_ptr, 0); in cmd_w1_read_block()
138 if (read_len > BUF_SIZE) { in cmd_w1_read_block()
144 ret = w1_read_block(dev, msg_buf, read_len); in cmd_w1_read_block()
151 for (int i = 0; i < read_len; i++) { in cmd_w1_read_block()
/Zephyr-latest/drivers/sensor/tdk/icm42688/
Dicm42688_rtio_stream.c127 uint32_t read_len = MIN(fifo_count, buf_avail); in icm42688_fifo_count_cb() local
128 uint32_t pkts = read_len / packet_size; in icm42688_fifo_count_cb()
130 read_len = pkts * packet_size; in icm42688_fifo_count_cb()
131 ((struct icm42688_fifo_data *)buf)->fifo_count = read_len; in icm42688_fifo_count_cb()
133 __ASSERT_NO_MSG(read_len % pkt_size == 0); in icm42688_fifo_count_cb()
157 rtio_sqe_prep_read(read_fifo_data, spi_iodev, RTIO_PRIO_NORM, read_buf, read_len, in icm42688_fifo_count_cb()
/Zephyr-latest/drivers/sensor/adi/adxl367/
Dadxl367_stream.c330 uint32_t read_len = MIN(fifo_bytes, buf_avail); in adxl367_process_fifo_samples_cb() local
333 unsigned int read_bits = read_len * 8; in adxl367_process_fifo_samples_cb()
339 read_len = read_len_bits / 8; in adxl367_process_fifo_samples_cb()
351 read_len = read_len_bits / 8; in adxl367_process_fifo_samples_cb()
359 uint32_t pkts = read_len / packet_size; in adxl367_process_fifo_samples_cb()
361 read_len = pkts * packet_size; in adxl367_process_fifo_samples_cb()
364 ((struct adxl367_fifo_data *)buf)->fifo_byte_count = read_len; in adxl367_process_fifo_samples_cb()
366 __ASSERT_NO_MSG(read_len % pkt_size == 0); in adxl367_process_fifo_samples_cb()
401 rtio_sqe_prep_read(read_fifo_data, data->iodev, RTIO_PRIO_NORM, read_buf, read_len, in adxl367_process_fifo_samples_cb()
/Zephyr-latest/drivers/sensor/adi/adxl362/
Dadxl362_stream.c199 uint32_t read_len = MIN(fifo_bytes, buf_avail); in adxl362_process_fifo_samples_cb() local
200 uint32_t pkts = read_len / sample_set_size; in adxl362_process_fifo_samples_cb()
202 read_len = pkts * sample_set_size; in adxl362_process_fifo_samples_cb()
204 ((struct adxl362_fifo_data *)buf)->fifo_byte_count = read_len; in adxl362_process_fifo_samples_cb()
206 __ASSERT_NO_MSG(read_len % sample_set_size == 0); in adxl362_process_fifo_samples_cb()
241 rtio_sqe_prep_read(read_fifo_data, data->iodev, RTIO_PRIO_NORM, read_buf, read_len, in adxl362_process_fifo_samples_cb()
/Zephyr-latest/drivers/sensor/explorir_m/
Dexplorir_m.c159 int rc, read_len; in explorir_m_uart_isr() local
176 read_len = EXPLORIR_M_BUFFER_LENGTH - data->read_index; in explorir_m_uart_isr()
177 rc = uart_fifo_read(uart_dev, &data->read_buffer[data->read_index], read_len); in explorir_m_uart_isr()
179 if (rc < 0 || rc == read_len) { in explorir_m_uart_isr()
/Zephyr-latest/drivers/sensor/adi/adxl372/
Dadxl372_stream.c244 uint32_t read_len = MIN(fifo_bytes, buf_avail); in adxl372_process_fifo_samples_cb() local
245 uint32_t pkts = read_len / sample_set_size; in adxl372_process_fifo_samples_cb()
247 read_len = pkts * sample_set_size; in adxl372_process_fifo_samples_cb()
249 ((struct adxl372_fifo_data *)buf)->fifo_byte_count = read_len; in adxl372_process_fifo_samples_cb()
251 __ASSERT_NO_MSG(read_len % pkt_size == 0); in adxl372_process_fifo_samples_cb()
286 rtio_sqe_prep_read(read_fifo_data, data->iodev, RTIO_PRIO_NORM, read_buf, read_len, in adxl372_process_fifo_samples_cb()
/Zephyr-latest/drivers/ethernet/
Deth_w5500.c214 uint16_t read_len; in w5500_rx() local
243 read_len = rx_len; in w5500_rx()
255 if (read_len > frag_len) { in w5500_rx()
258 frame_len = read_len; in w5500_rx()
265 read_len -= (uint16_t)frame_len; in w5500_rx()
267 } while (read_len > 0); in w5500_rx()
/Zephyr-latest/tests/bluetooth/common/testlib/src/
Datt_read.c40 uint16_t read_len) in att_read_cb() argument
55 LOG_DBG("Adding %u bytes to result", read_len); in att_read_cb()
56 *ctx->result_size += read_len; in att_read_cb()
64 MIN(read_len, net_buf_simple_tailroom(ctx->result_data)); in att_read_cb()
/Zephyr-latest/subsys/net/l2/openthread/
Dopenthread.c256 uint16_t read_len; in ot_receive_handler() local
271 read_len = otMessageRead(aMessage, offset, pkt_buf->data, in ot_receive_handler()
273 if (!read_len) { in ot_receive_handler()
277 net_buf_add(pkt_buf, read_len); in ot_receive_handler()
279 offset += read_len; in ot_receive_handler()
/Zephyr-latest/drivers/sensor/fcx_mldx5/
Dfcx_mldx5.c190 int rc, read_len; in fcx_mldx5_uart_isr() local
207 read_len = FCX_MLDX5_MAX_FRAME_LEN - data->frame_len; in fcx_mldx5_uart_isr()
208 rc = read_len > 0 ? uart_fifo_read(uart_dev, &data->frame[data->frame_len], read_len) in fcx_mldx5_uart_isr()
/Zephyr-latest/drivers/sensor/adi/adxl345/
Dadxl345_stream.c169 uint32_t read_len = MIN(fifo_bytes, buf_avail); in adxl345_process_fifo_samples_cb() local
172 uint32_t pkts = read_len / sample_set_size; in adxl345_process_fifo_samples_cb()
174 read_len = pkts * sample_set_size; in adxl345_process_fifo_samples_cb()
177 ((struct adxl345_fifo_data *)buf)->fifo_byte_count = read_len; in adxl345_process_fifo_samples_cb()
/Zephyr-latest/samples/bluetooth/encrypted_advertising/central/src/
Dcentral_ead.c194 struct bt_gatt_read_params *params, const void *data, uint16_t read_len) in gatt_read_cb() argument
197 gatt_read_len = read_len; in gatt_read_cb()
201 memcpy(gatt_read_res, data, read_len); in gatt_read_cb()
/Zephyr-latest/subsys/bluetooth/host/
Dadv.c139 uint8_t read_len = 0; in ad_stream_read() local
141 while (read_len < buf_len) { in ad_stream_read()
149 buf[read_len] = current_ltv->data_len + 1; in ad_stream_read()
151 read_len++; in ad_stream_read()
153 buf[read_len] = current_ltv->type; in ad_stream_read()
155 read_len++; in ad_stream_read()
159 const size_t size_to_copy = MIN(buf_len - read_len, remaining_data_len); in ad_stream_read()
161 (void)memcpy(&buf[read_len], in ad_stream_read()
165 read_len += size_to_copy; in ad_stream_read()
169 __ASSERT_NO_MSG(stream->remaining_size >= read_len); in ad_stream_read()
[all …]
/Zephyr-latest/include/zephyr/drivers/
Dw1.h577 uint8_t *read_buf, size_t read_len);

12