Home
last modified time | relevance | path

Searched refs:bytes_read (Results 1 – 25 of 33) sorted by relevance

12

/Zephyr-Core-3.6.0/subsys/mgmt/mcumgr/grp/fs_mgmt/src/
Dfs_mgmt_hash_checksum_sha256.c32 ssize_t bytes_read = 0; in fs_mgmt_hash_checksum_sha256() local
52 bytes_read = fs_read(file, buffer, read_size); in fs_mgmt_hash_checksum_sha256()
54 if (bytes_read < 0) { in fs_mgmt_hash_checksum_sha256()
57 } else if (bytes_read > 0) { in fs_mgmt_hash_checksum_sha256()
58 if (tc_sha256_update(&sha, buffer, bytes_read) != TC_CRYPTO_SUCCESS) { in fs_mgmt_hash_checksum_sha256()
62 *out_len += bytes_read; in fs_mgmt_hash_checksum_sha256()
64 } while (bytes_read > 0 && *out_len < len); in fs_mgmt_hash_checksum_sha256()
79 ssize_t bytes_read = 0; in fs_mgmt_hash_checksum_sha256() local
108 bytes_read = fs_read(file, buffer, read_size); in fs_mgmt_hash_checksum_sha256()
110 if (bytes_read < 0) { in fs_mgmt_hash_checksum_sha256()
[all …]
Dfs_mgmt_hash_checksum_crc32.c24 ssize_t bytes_read = 0; in fs_mgmt_hash_checksum_crc32() local
37 bytes_read = fs_read(file, buffer, read_size); in fs_mgmt_hash_checksum_crc32()
39 if (bytes_read < 0) { in fs_mgmt_hash_checksum_crc32()
42 } else if (bytes_read > 0) { in fs_mgmt_hash_checksum_crc32()
43 crc32 = crc32_ieee_update(crc32, buffer, bytes_read); in fs_mgmt_hash_checksum_crc32()
44 *out_len += bytes_read; in fs_mgmt_hash_checksum_crc32()
46 } while (bytes_read > 0 && *out_len < len); in fs_mgmt_hash_checksum_crc32()
Dfs_mgmt.c209 ssize_t bytes_read = 0; in fs_mgmt_file_download() local
320 bytes_read = fs_read(&fs_mgmt_ctxt.file, file_data, MCUMGR_GRP_FS_DL_CHUNK_SIZE); in fs_mgmt_file_download()
322 if (bytes_read < 0) { in fs_mgmt_file_download()
329 fs_mgmt_ctxt.off += bytes_read; in fs_mgmt_file_download()
334 zcbor_bstr_encode_ptr(zse, file_data, bytes_read) && in fs_mgmt_file_download()
/Zephyr-Core-3.6.0/doc/hardware/arch/
Dsemihost.rst31 long file_len, bytes_read, fd;
42 bytes_read = semihost_read(fd, buffer, MIN(file_len, sizeof(buffer)));
43 if (bytes_read < 0) {
47 do_data_processing(buffer, bytes_read);
49 file_len -= bytes_read;
/Zephyr-Core-3.6.0/kernel/
Dpipes.c32 size_t *bytes_read, size_t min_xfer,
110 size_t bytes_read; in z_impl_k_pipe_flush() local
116 (void) pipe_get_internal(key, pipe, NULL, (size_t) -1, &bytes_read, 0U, in z_impl_k_pipe_flush()
134 size_t bytes_read; in z_impl_k_pipe_buffer_flush() local
142 &bytes_read, 0U, K_NO_WAIT); in z_impl_k_pipe_buffer_flush()
533 size_t *bytes_read, size_t min_xfer, in pipe_get_internal() argument
574 *bytes_read = 0; in pipe_get_internal()
663 *bytes_read = num_bytes_read; in pipe_get_internal()
691 *bytes_read = bytes_to_read - dest_desc->bytes_to_xfer; in pipe_get_internal()
700 size_t *bytes_read, size_t min_xfer, k_timeout_t timeout) in z_impl_k_pipe_get() argument
[all …]
/Zephyr-Core-3.6.0/drivers/modem/
Dmodem_iface_uart_interrupt.c105 uint8_t *buf, size_t size, size_t *bytes_read) in modem_iface_uart_read() argument
114 *bytes_read = 0; in modem_iface_uart_read()
119 *bytes_read = ring_buf_get(&data->rx_rb, buf, size); in modem_iface_uart_read()
121 if (data->hw_flow_control && *bytes_read == 0) { in modem_iface_uart_read()
Dmodem_receiver.c166 uint8_t *buf, size_t size, size_t *bytes_read) in mdm_receiver_recv() argument
173 *bytes_read = 0; in mdm_receiver_recv()
177 *bytes_read = ring_buf_get(&ctx->rx_rb, buf, size); in mdm_receiver_recv()
Dmodem_iface_uart_async.c85 uint8_t *buf, size_t size, size_t *bytes_read) in modem_iface_uart_async_read() argument
94 *bytes_read = 0; in modem_iface_uart_async_read()
100 *bytes_read = ring_buf_get(&data->rx_rb, buf, size); in modem_iface_uart_async_read()
Dmodem_receiver.h63 uint8_t *buf, size_t size, size_t *bytes_read);
Dmodem_context.h31 size_t *bytes_read);
Dmodem_cmd_handler.c286 size_t bytes_read = 0; in cmd_handler_process_iface_data() local
320 &bytes_read); in cmd_handler_process_iface_data()
321 if (ret < 0 || bytes_read == 0) { in cmd_handler_process_iface_data()
326 net_buf_add(frag, bytes_read); in cmd_handler_process_iface_data()
Dwncm14a2a.c1021 size_t bytes_read = 0; in wncm14a2a_read_rx() local
1030 &bytes_read); in wncm14a2a_read_rx()
1031 if (ret < 0 || bytes_read == 0) { in wncm14a2a_read_rx()
1036 hexdump(uart_buffer, bytes_read); in wncm14a2a_read_rx()
1048 rx_len = net_buf_append_bytes(*buf, bytes_read, uart_buffer, in wncm14a2a_read_rx()
1052 if (rx_len < bytes_read) { in wncm14a2a_read_rx()
1054 rx_len, bytes_read); in wncm14a2a_read_rx()
/Zephyr-Core-3.6.0/samples/tfm_integration/psa_protected_storage/src/
Dmain.c48 size_t bytes_read; in main() local
51 status = psa_ps_get(uid1, 0, sizeof(TEST_STRING_1), &stored_data, &bytes_read); in main()
/Zephyr-Core-3.6.0/drivers/serial/
Duart_sam.c243 int bytes_read; in uart_sam_fifo_read() local
245 bytes_read = 0; in uart_sam_fifo_read()
247 while (bytes_read < size) { in uart_sam_fifo_read()
249 rx_data[bytes_read] = uart->UART_RHR; in uart_sam_fifo_read()
250 bytes_read++; in uart_sam_fifo_read()
256 return bytes_read; in uart_sam_fifo_read()
Dusart_sam.c335 int bytes_read; in usart_sam_fifo_read() local
337 bytes_read = 0; in usart_sam_fifo_read()
339 while (bytes_read < size) { in usart_sam_fifo_read()
341 rx_data[bytes_read] = usart->US_RHR; in usart_sam_fifo_read()
342 bytes_read++; in usart_sam_fifo_read()
348 return bytes_read; in usart_sam_fifo_read()
Dserial_test.c186 uint32_t bytes_read; in serial_vnd_poll_in() local
191 bytes_read = ring_buf_get(data->read_queue, c, 1); in serial_vnd_poll_in()
192 if (bytes_read == 1) { in serial_vnd_poll_in()
/Zephyr-Core-3.6.0/samples/net/cloud/mqtt_azure/src/
Dmain.c203 int bytes_read; in mqtt_event_handler() local
248 bytes_read = mqtt_read_publish_payload(&client_ctx, in mqtt_event_handler()
252 if (bytes_read < 0 && bytes_read != -EAGAIN) { in mqtt_event_handler()
257 data[bytes_read] = '\0'; in mqtt_event_handler()
259 len -= bytes_read; in mqtt_event_handler()
/Zephyr-Core-3.6.0/tests/kernel/pipe/pipe/src/
Dtest_pipe.c908 size_t bytes_read = 0; in ZTEST_USER() local
916 res = k_pipe_get(&test_pipe, buf, sizeof(buf), &bytes_read, in ZTEST_USER()
919 zassert_equal(bytes_read, 3, "did not read all bytes available"); in ZTEST_USER()
1105 size_t bytes_read; in ZTEST() local
1123 &bytes_read, 0, K_MSEC(100)); in ZTEST()
1126 zassert_true(bytes_read == 0, in ZTEST()
1127 "k_pipe_get() unexpectedly read %zu bytes\n", bytes_read); in ZTEST()
1147 &bytes_read, 0, K_MSEC(100)); in ZTEST()
1150 zassert_true(bytes_read == 40, in ZTEST()
1151 "k_pipe_get() unexpectedly read %zu bytes\n", bytes_read); in ZTEST()
/Zephyr-Core-3.6.0/drivers/eeprom/
Deeprom_simulator.c59 STATS_SECT_ENTRY32(bytes_read) /* total bytes read */
69 STATS_NAME(eeprom_sim_stats, bytes_read)
126 STATS_INCN(eeprom_sim_stats, bytes_read, len); in eeprom_sim_read()
/Zephyr-Core-3.6.0/samples/subsys/usb/hid-cdc/src/
Dmain.c395 uint32_t bytes_read; in cdc_mouse_int_handler() local
397 while ((bytes_read = uart_fifo_read(dev, in cdc_mouse_int_handler()
400 chr_ptr_mouse += bytes_read; in cdc_mouse_int_handler()
443 uint32_t bytes_read; in cdc_kbd_int_handler() local
445 while ((bytes_read = uart_fifo_read(dev, in cdc_kbd_int_handler()
448 chr_ptr_kbd += bytes_read; in cdc_kbd_int_handler()
/Zephyr-Core-3.6.0/include/zephyr/drivers/
Di2c.h539 STATS_SECT_ENTRY32(bytes_read)
546 STATS_NAME(i2c, bytes_read)
575 uint32_t bytes_read = 0U; in i2c_xfer_stats() local
582 bytes_read += msgs[i].len; in i2c_xfer_stats()
587 STATS_INCN(state->stats, bytes_read, bytes_read); in i2c_xfer_stats()
Dsmbus.h410 STATS_SECT_ENTRY32(bytes_read)
416 STATS_NAME(smbus, bytes_read)
470 STATS_INCN(state->stats, bytes_read, recv); in smbus_xfer_stats()
/Zephyr-Core-3.6.0/subsys/usb/device/class/
Dmsc.c766 uint32_t bytes_read = 0U; in mass_storage_bulk_out() local
772 &bytes_read); in mass_storage_bulk_out()
778 CBWDecode(bo_buf, bytes_read); in mass_storage_bulk_out()
787 memoryWrite(bo_buf, bytes_read); in mass_storage_bulk_out()
791 memoryVerify(bo_buf, bytes_read); in mass_storage_bulk_out()
/Zephyr-Core-3.6.0/drivers/flash/
Dflash_simulator.c82 STATS_SECT_ENTRY32(bytes_read) /* total bytes read */
100 STATS_NAME(flash_sim_stats, bytes_read)
201 FLASH_SIM_STATS_INCN(flash_sim_stats, bytes_read, len); in flash_sim_read()
/Zephyr-Core-3.6.0/doc/kernel/services/data_passing/
Dpipes.rst148 size_t bytes_read;
152 rc = k_pipe_get(&my_pipe, buffer, sizeof(buffer), &bytes_read,
155 if ((rc < 0) || (bytes_read < sizeof (*header))) {
158 } else if (header->num_data_bytes + sizeof(*header) > bytes_read) {

12