Home
last modified time | relevance | path

Searched refs:num_bytes (Results 1 – 25 of 48) sorted by relevance

12

/Zephyr-latest/tests/crypto/tinycrypt/src/
Dtest_ecc_utils.c74 unsigned int num_bytes = num_word32 * 4U; in string2scalar() local
75 uint8_t tmp[num_bytes]; in string2scalar()
80 padding = num_bytes * 2U - strlen(str); in string2scalar()
83 num_bytes * 2U, strlen(str)); in string2scalar()
89 if (hex2bin(str, hexlen, tmp + padding / 2, num_bytes) == 0) { in string2scalar()
92 uECC_vli_bytesToNative(scalar, tmp, num_bytes); in string2scalar()
127 uint32_t num_bytes = num_word32 * 4U; in check_ecc_result() local
129 if (memcmp(computed, expected, num_bytes)) { in check_ecc_result()
/Zephyr-latest/subsys/modbus/
Dmodbus_server.c116 uint16_t num_bytes; in mbs_fc01_coil_read() local
141 num_bytes = ((coil_qty - 1) / 8) + 1; in mbs_fc01_coil_read()
143 ctx->tx_adu.length = num_bytes + 1; in mbs_fc01_coil_read()
145 ctx->tx_adu.data[0] = (uint8_t)num_bytes; in mbs_fc01_coil_read()
149 memset(presp, 0, num_bytes); in mbs_fc01_coil_read()
215 uint16_t num_bytes; in mbs_fc02_di_read() local
240 num_bytes = ((di_qty - 1) / 8) + 1; in mbs_fc02_di_read()
242 ctx->tx_adu.length = num_bytes + 1; in mbs_fc02_di_read()
244 ctx->tx_adu.data[0] = (uint8_t)num_bytes; in mbs_fc02_di_read()
248 for (di_cntr = 0; di_cntr < num_bytes; di_cntr++) { in mbs_fc02_di_read()
[all …]
Dmodbus_client.c511 size_t num_bytes; in modbus_write_coils() local
525 num_bytes = (uint8_t)(((num_coils - 1) / 8) + 1); in modbus_write_coils()
526 ctx->tx_adu.data[4] = num_bytes; in modbus_write_coils()
527 length += num_bytes + 1; in modbus_write_coils()
538 memcpy(data_ptr, coil_tbl, num_bytes); in modbus_write_coils()
555 size_t num_bytes; in modbus_write_holding_regs() local
569 num_bytes = num_regs * sizeof(uint16_t); in modbus_write_holding_regs()
570 ctx->tx_adu.data[4] = num_bytes; in modbus_write_holding_regs()
571 length += num_bytes + 1; in modbus_write_holding_regs()
603 size_t num_bytes; in modbus_write_holding_regs_fp() local
[all …]
/Zephyr-latest/drivers/i2c/
Di2c_shell.c256 int num_bytes; in cmd_i2c_read() local
260 num_bytes = strtol(argv[4], NULL, 16); in cmd_i2c_read()
261 if (num_bytes > MAX_I2C_BYTES) { in cmd_i2c_read()
262 num_bytes = MAX_I2C_BYTES; in cmd_i2c_read()
265 num_bytes = MAX_I2C_BYTES; in cmd_i2c_read()
270 buf, num_bytes); in cmd_i2c_read()
272 shell_hexdump(shell_ctx, buf, num_bytes); in cmd_i2c_read()
282 int num_bytes; in cmd_i2c_direct_read() local
286 num_bytes = strtol(argv[3], NULL, 16); in cmd_i2c_direct_read()
287 if (num_bytes > MAX_I2C_BYTES) { in cmd_i2c_direct_read()
[all …]
/Zephyr-latest/samples/drivers/mspi/mspi_async/src/
Dmain.c48 .num_bytes = 256,
56 .num_bytes = 256,
64 .num_bytes = 256,
72 .num_bytes = 256,
83 .num_bytes = 256,
91 .num_bytes = 256,
99 .num_bytes = 256,
107 .num_bytes = 256,
/Zephyr-latest/include/zephyr/drivers/i3c/
Dhdr_ddr.h42 uint8_t *buf, uint32_t num_bytes) in i3c_hdr_ddr_write() argument
47 msg.len = num_bytes; in i3c_hdr_ddr_write()
70 uint8_t *buf, uint32_t num_bytes) in i3c_hdr_ddr_read() argument
75 msg.len = num_bytes; in i3c_hdr_ddr_read()
/Zephyr-latest/subsys/mgmt/mcumgr/grp/img_mgmt/include/mgmt/mcumgr/grp/img_mgmt/
Dimg_mgmt_priv.h61 int img_mgmt_read(int slot, unsigned int offset, void *dst, unsigned int num_bytes);
75 int img_mgmt_write_image_data(unsigned int offset, const void *data, unsigned int num_bytes,
159 int img_mgmt_erase_image_data(unsigned int off, unsigned int num_bytes);
/Zephyr-latest/drivers/gpio/
Dgpio_rt1718s.h104 uint32_t num_bytes) in rt1718s_reg_burst_read() argument
108 return i2c_burst_read_dt(&config->i2c_dev, start_addr, buf, num_bytes); in rt1718s_reg_burst_read()
138 uint8_t *buf, uint32_t num_bytes) in rt1718s_reg_burst_write() argument
142 return i2c_burst_write_dt(&config->i2c_dev, start_addr, buf, num_bytes); in rt1718s_reg_burst_write()
Dgpio_pcf857x.c41 int num_bytes; member
69 rc = i2c_read_dt(&drv_cfg->i2c, rx_buf, drv_data->num_bytes); in pcf857x_process_input()
190 rc = i2c_write_dt(&drv_cfg->i2c, tx_buf_p, drv_data->num_bytes); in pcf857x_port_set_raw()
403 .num_bytes = DT_INST_ENUM_IDX(idx, ngpios) + 1, \
/Zephyr-latest/include/zephyr/drivers/
Di2c.h1273 uint32_t num_bytes, uint16_t addr) in i2c_write() argument
1278 msg.len = num_bytes; in i2c_write()
1298 const uint8_t *buf, uint32_t num_bytes) in i2c_write_dt() argument
1300 return i2c_write(spec->bus, buf, num_bytes, spec->addr); in i2c_write_dt()
1318 uint32_t num_bytes, uint16_t addr) in i2c_read() argument
1323 msg.len = num_bytes; in i2c_read()
1343 uint8_t *buf, uint32_t num_bytes) in i2c_read_dt() argument
1345 return i2c_read(spec->bus, buf, num_bytes, spec->addr); in i2c_read_dt()
1431 uint32_t num_bytes) in i2c_burst_read() argument
1435 buf, num_bytes); in i2c_burst_read()
[all …]
Di3c.h1824 const uint8_t *buf, uint32_t num_bytes) in i3c_write() argument
1829 msg.len = num_bytes; in i3c_write()
1851 uint8_t *buf, uint32_t num_bytes) in i3c_read() argument
1856 msg.len = num_bytes; in i3c_read()
1922 uint32_t num_bytes) in i3c_burst_read() argument
1926 buf, num_bytes); in i3c_burst_read()
1952 uint32_t num_bytes) in i3c_burst_write() argument
1963 msg[1].len = num_bytes; in i3c_burst_write()
Dcan.h1697 static inline uint8_t can_bytes_to_dlc(uint8_t num_bytes) in can_bytes_to_dlc() argument
1699 return num_bytes <= 8 ? num_bytes : in can_bytes_to_dlc()
1700 num_bytes <= 12 ? 9 : in can_bytes_to_dlc()
1701 num_bytes <= 16 ? 10 : in can_bytes_to_dlc()
1702 num_bytes <= 20 ? 11 : in can_bytes_to_dlc()
1703 num_bytes <= 24 ? 12 : in can_bytes_to_dlc()
1704 num_bytes <= 32 ? 13 : in can_bytes_to_dlc()
1705 num_bytes <= 48 ? 14 : in can_bytes_to_dlc()
/Zephyr-latest/samples/drivers/spi_fujitsu_fram/src/
Dmain.c101 uint16_t addr, uint8_t *data, uint32_t num_bytes) in write_bytes() argument
115 MB85RS64V_WRITE_CMD, addr, data, num_bytes); in write_bytes()
125 uint16_t addr, uint8_t *data, uint32_t num_bytes) in read_bytes() argument
131 MB85RS64V_READ_CMD, addr, data, num_bytes); in read_bytes()
/Zephyr-latest/drivers/flash/
Dflash_cadence_qspi_nor_ll.c169 uint32_t num_bytes, uint32_t *output) in cad_qspi_stig_read_cmd() argument
176 if ((num_bytes > 8) || (num_bytes == 0)) { in cad_qspi_stig_read_cmd()
186 CAD_QSPI_FLASHCMD_NUMRDDATABYTES(num_bytes - 1) | in cad_qspi_stig_read_cmd()
198 if (num_bytes > 4) { in cad_qspi_stig_read_cmd()
206 uint32_t num_bytes, uint32_t *input) in cad_qspi_stig_wr_cmd() argument
213 if ((num_bytes > 8) || (num_bytes == 0)) { in cad_qspi_stig_wr_cmd()
226 CAD_QSPI_FLASHCMD_NUMWRDATABYTES(num_bytes - 1) | in cad_qspi_stig_wr_cmd()
231 if (num_bytes > 4) { in cad_qspi_stig_wr_cmd()
353 uint32_t num_bytes) in cad_qspi_indirect_read_start_bank() argument
361 sys_write32(num_bytes, cad_params->reg_base + CAD_QSPI_INDRDCNT); in cad_qspi_indirect_read_start_bank()
[all …]
Dflash_mspi_emul_device.c122 packet->address + packet->num_bytes > cfg->size) { in emul_mspi_device_transceive()
128 packet->num_bytes); in emul_mspi_device_transceive()
131 packet->num_bytes); in emul_mspi_device_transceive()
234 data->packet.num_bytes = i; in flash_mspi_emul_write()
283 data->packet.num_bytes = len; in flash_mspi_emul_read()
/Zephyr-latest/scripts/coredump/coredump_parser/
Dlog_parser.py84 _, hdr_ver, num_bytes = struct.unpack(LOG_ARCH_HDR_STRUCT, hdr)
86 arch_data = self.fd.read(num_bytes)
94 _, hdr_ver, num_bytes = struct.unpack(LOG_THREADS_META_HDR_STRUCT, hdr)
96 data = self.fd.read(num_bytes)
/Zephyr-latest/drivers/crypto/
Dcrypto_ataes132a_priv.h141 uint8_t num_bytes) in burst_write_i2c() argument
153 msg[1].len = num_bytes; in burst_write_i2c()
162 uint8_t num_bytes) in burst_read_i2c() argument
174 msg[1].len = num_bytes; in burst_read_i2c()
/Zephyr-latest/drivers/sensor/maxim/max30101/
Dmax30101.c23 int num_bytes; in max30101_sample_fetch() local
27 num_bytes = data->num_channels * MAX30101_BYTES_PER_CHANNEL; in max30101_sample_fetch()
29 num_bytes)) { in max30101_sample_fetch()
35 for (i = 0; i < num_bytes; i += 3) { in max30101_sample_fetch()
/Zephyr-latest/tests/subsys/lorawan/frag_decoder/src/
Dmain.c112 size_t num_bytes = in run_test() local
115 flash_area_read(fa, i * FRAG_SIZE, buf, num_bytes); in run_test()
116 zassert_mem_equal(buf, fw_coded + i * FRAG_SIZE, num_bytes, in run_test()
/Zephyr-latest/samples/subsys/usb/uac2_implicit_feedback/src/
Dmain.c240 size_t num_bytes; in process_mic_data() local
257 ret = i2s_read(ctx->i2s_dev, &rx_block, &num_bytes); in process_mic_data()
262 sys_cache_data_invd_range(rx_block, num_bytes); in process_mic_data()
265 rx_samples = num_bytes / (BYTES_PER_SAMPLE * 2); in process_mic_data()
310 ret = i2s_read(ctx->i2s_dev, &rx_block, &num_bytes); in process_mic_data()
317 sys_cache_data_invd_range(rx_block, num_bytes); in process_mic_data()
320 rx_samples = num_bytes / (BYTES_PER_SAMPLE * 2); in process_mic_data()
/Zephyr-latest/subsys/mgmt/mcumgr/grp/img_mgmt/src/
Dzephyr_img_mgmt.c345 int img_mgmt_read(int slot, unsigned int offset, void *dst, unsigned int num_bytes) in img_mgmt_read() argument
361 rc = flash_area_read(fa, offset, dst, num_bytes); in img_mgmt_read()
373 int img_mgmt_write_image_data(unsigned int offset, const void *data, unsigned int num_bytes, in img_mgmt_write_image_data() argument
407 if (flash_img_buffered_write(ctx, data, num_bytes, last) != 0) { in img_mgmt_write_image_data()
421 int img_mgmt_write_image_data(unsigned int offset, const void *data, unsigned int num_bytes, in img_mgmt_write_image_data() argument
432 if (flash_img_buffered_write(&ctx, data, num_bytes, last) != 0) { in img_mgmt_write_image_data()
440 int img_mgmt_erase_image_data(unsigned int off, unsigned int num_bytes) in img_mgmt_erase_image_data() argument
465 off_t page_offset = fa->fa_off + num_bytes - 1; in img_mgmt_erase_image_data()
/Zephyr-latest/include/zephyr/debug/
Dcoredump.h195 uint16_t num_bytes; member
207 uint16_t num_bytes; member
/Zephyr-latest/drivers/sensor/ti/bq274xx/
Dbq274xx.c140 uint8_t *block, uint8_t num_bytes) in bq274xx_read_block() argument
160 ret = i2c_burst_read_dt(&config->i2c, BQ274XX_EXT_BLKDAT_START, block, num_bytes); in bq274xx_read_block()
170 uint8_t *block, uint8_t num_bytes) in bq274xx_write_block() argument
177 __ASSERT_NO_MSG(num_bytes <= BQ27XXX_DM_SZ); in bq274xx_write_block()
180 memcpy(&buf[1], block, num_bytes); in bq274xx_write_block()
182 ret = i2c_write_dt(&config->i2c, buf, 1 + num_bytes); in bq274xx_write_block()
188 for (uint8_t i = 0; i < num_bytes; i++) { in bq274xx_write_block()
/Zephyr-latest/subsys/debug/coredump/
Dcoredump_core.c157 .num_bytes = 0, in dump_threads_metadata()
160 hdr.num_bytes += sizeof(_kernel); in dump_threads_metadata()
/Zephyr-latest/drivers/led/
Dis31fl3216a.c37 const uint8_t *buffer, uint32_t num_bytes) in is31fl3216a_write_buffer() argument
41 status = i2c_write_dt(i2c, buffer, num_bytes); in is31fl3216a_write_buffer()

12