/Zephyr-latest/drivers/sensor/st/iis3dhhc/ |
D | iis3dhhc_spi.c | 23 static int iis3dhhc_spi_read(const struct device *dev, uint8_t reg, uint8_t *data, uint16_t len) in iis3dhhc_spi_read() argument 29 .len = 2, in iis3dhhc_spi_read() 38 .len = 1, in iis3dhhc_spi_read() 42 .len = len, in iis3dhhc_spi_read() 57 static int iis3dhhc_spi_write(const struct device *dev, uint8_t reg, uint8_t *data, uint16_t len) in iis3dhhc_spi_write() argument 64 .len = 1, in iis3dhhc_spi_write() 68 .len = len, in iis3dhhc_spi_write()
|
/Zephyr-latest/subsys/net/lib/tls_credentials/ |
D | tls_credentials_digest_raw.c | 24 int credential_digest_raw(struct tls_credential *credential, void *dest, size_t *len) in credential_digest_raw() argument 33 status = psa_hash_compute(PSA_ALG_SHA_256, credential->buf, credential->len, in credential_digest_raw() 42 err = base64_encode(dest, *len, &written, digest_buf, sizeof(digest_buf)); in credential_digest_raw() 43 *len = err ? 0 : written; in credential_digest_raw() 53 int credential_digest_raw(struct tls_credential *credential, void *dest, size_t *len) in credential_digest_raw() argument 55 *len = 0; in credential_digest_raw()
|
/Zephyr-latest/drivers/entropy/ |
D | entropy_nrf5.c | 83 #define RNG_POOL_DEFINE(name, len) uint8_t name[sizeof(struct rng_pool) + (len)] argument 120 static uint16_t rng_pool_get(struct rng_pool *rngp, uint8_t *buf, uint16_t len) in rng_pool_get() argument 140 if (available < len) { in rng_pool_get() 141 len = available; in rng_pool_get() 148 rngp->first_alloc = (first + len) & mask; in rng_pool_get() 151 while (likely(len--)) { in rng_pool_get() 167 len = dst - buf; in rng_pool_get() 168 available = available - len; in rng_pool_get() 173 return len; in rng_pool_get() 226 uint16_t len) in entropy_nrf5_get_entropy() argument [all …]
|
D | entropy_max32.c | 23 static int api_get_entropy(const struct device *dev, uint8_t *buf, uint16_t len) in api_get_entropy() argument 25 return MXC_TRNG_Random(buf, len); in api_get_entropy() 28 static int api_get_entropy_isr(const struct device *dev, uint8_t *buf, uint16_t len, uint32_t flags) in api_get_entropy_isr() argument 37 while (len) { in api_get_entropy_isr() 43 copy_len = MIN(len, 4); in api_get_entropy_isr() 46 len -= copy_len; in api_get_entropy_isr() 59 ret = api_get_entropy(dev, buf, len); in api_get_entropy_isr() 61 ret = len; /* Data retrieved successfully. */ in api_get_entropy_isr()
|
D | entropy_gecko_trng.c | 47 static void entropy_gecko_trng_read(uint8_t *output, size_t len) in entropy_gecko_trng_read() argument 54 while (len >= 4) { in entropy_gecko_trng_read() 56 len -= 4; in entropy_gecko_trng_read() 58 if (len > 0) { in entropy_gecko_trng_read() 63 memcpy(data, (const uint8_t *) &tmp, len); in entropy_gecko_trng_read() 66 memcpy(output, ((const uint8_t *) S2_FIFO_BASE), len); in entropy_gecko_trng_read() 100 uint16_t len, uint32_t flags) in entropy_gecko_trng_get_entropy_isr() argument 116 count = SL_MIN(len, available); in entropy_gecko_trng_get_entropy_isr() 122 int ret = entropy_gecko_trng_get_entropy(dev, buf, len); in entropy_gecko_trng_get_entropy_isr() 126 return len; in entropy_gecko_trng_get_entropy_isr()
|
/Zephyr-latest/drivers/eeprom/ |
D | eeprom_handlers.c | 11 void *data, size_t len) in z_vrfy_eeprom_read() argument 14 K_OOPS(K_SYSCALL_MEMORY_WRITE(data, len)); in z_vrfy_eeprom_read() 17 len); in z_vrfy_eeprom_read() 22 const void *data, size_t len) in z_vrfy_eeprom_write() argument 25 K_OOPS(K_SYSCALL_MEMORY_READ(data, len)); in z_vrfy_eeprom_write() 27 (const void *)data, len); in z_vrfy_eeprom_write()
|
/Zephyr-latest/drivers/mipi_dbi/ |
D | mipi_dbi_spi.c | 71 const uint8_t *data_buf, size_t len) in mipi_dbi_spi_write_helper_3wire() argument 92 buffer.len = 2; in mipi_dbi_spi_write_helper_3wire() 103 for (size_t i = 0; i < len; i++) { in mipi_dbi_spi_write_helper_3wire() 120 const uint8_t *data_buf, size_t len) in mipi_dbi_spi_write_helper_4wire_8bit() argument 137 buffer.len = sizeof(cmd); in mipi_dbi_spi_write_helper_4wire_8bit() 148 if (len > 0) { in mipi_dbi_spi_write_helper_4wire_8bit() 150 buffer.len = len; in mipi_dbi_spi_write_helper_4wire_8bit() 171 const uint8_t *data_buf, size_t len) in mipi_dbi_spi_write_helper_4wire_16bit() argument 191 buffer.len = sizeof(data16); in mipi_dbi_spi_write_helper_4wire_16bit() 202 if (len > 0) { in mipi_dbi_spi_write_helper_4wire_16bit() [all …]
|
/Zephyr-latest/samples/boards/phytec/reel_board/mesh_badge/src/ |
D | reel_board.c | 75 size_t len, bool center) in print_line() argument 83 len = MIN(len, fonts[font_size].columns); in print_line() 84 memcpy(line, text, len); in print_line() 85 line[len] = '\0'; in print_line() 88 pad = (fonts[font_size].columns - len) / 2U; in print_line() 99 return len; in print_line() 142 size_t len; in board_show_text() local 148 len = get_len(FONT_BIG, text); in board_show_text() 149 if (!len) { in board_show_text() 153 text += print_line(FONT_BIG, i, text, len, center); in board_show_text() [all …]
|
/Zephyr-latest/tests/subsys/fs/nvs/src/ |
D | main.c | 115 size_t len; in execute_long_pattern_write() local 117 len = nvs_read(fs, id, rd_buf, sizeof(rd_buf)); in execute_long_pattern_write() 118 zassert_true(len == -ENOENT, "nvs_read unexpected failure: %d", len); in execute_long_pattern_write() 125 len = nvs_write(fs, id, wr_buf, sizeof(wr_buf)); in execute_long_pattern_write() 126 zassert_true(len == sizeof(wr_buf), "nvs_write failed: %d", len); in execute_long_pattern_write() 128 len = nvs_read(fs, id, rd_buf, sizeof(rd_buf)); in execute_long_pattern_write() 129 zassert_true(len == sizeof(rd_buf), "nvs_read unexpected failure: %d", in execute_long_pattern_write() 130 len); in execute_long_pattern_write() 170 size_t len; in ZTEST_F() local 190 len = nvs_write(&fixture->fs, TEST_DATA_ID, wr_buf_1, sizeof(wr_buf_1)); in ZTEST_F() [all …]
|
/Zephyr-latest/samples/bluetooth/hci_uart/src/ |
D | main.c | 65 static int h4_read(const struct device *uart, uint8_t *buf, size_t len) in h4_read() argument 67 int rx = uart_fifo_read(uart, buf, len); in h4_read() 69 LOG_DBG("read %d req %d", rx, len); in h4_read() 87 sys_le16_to_cpu(((const struct bt_hci_iso_hdr *)hdr_buf)->len)); in get_len() 89 return sys_le16_to_cpu(((const struct bt_hci_acl_hdr *)hdr_buf)->len); in get_len() 177 buf->len += read; in rx_isr() 212 int len; in tx_isr() local 222 len = uart_fifo_fill(hci_uart_dev, buf->data, buf->len); in tx_isr() 223 net_buf_pull(buf, len); in tx_isr() 224 if (!buf->len) { in tx_isr() [all …]
|
/Zephyr-latest/subsys/fs/nvs/ |
D | nvs.c | 89 static inline size_t nvs_al_size(struct nvs_fs *fs, size_t len) in nvs_al_size() argument 94 return len; in nvs_al_size() 96 return (len + (write_block_size - 1U)) & ~(write_block_size - 1U); in nvs_al_size() 103 size_t len) in nvs_flash_al_wrt() argument 111 if (!len) { in nvs_flash_al_wrt() 120 blen = len & ~(fs->flash_parameters->write_block_size - 1U); in nvs_flash_al_wrt() 127 len -= blen; in nvs_flash_al_wrt() 131 if (len) { in nvs_flash_al_wrt() 132 memcpy(buf, data8, len); in nvs_flash_al_wrt() 133 (void)memset(buf + len, fs->flash_parameters->erase_value, in nvs_flash_al_wrt() [all …]
|
/Zephyr-latest/include/zephyr/drivers/ |
D | eeprom.h | 49 size_t len); 56 const void *data, size_t len); 83 size_t len); 86 void *data, size_t len) in z_impl_eeprom_read() argument 91 return api->read(dev, offset, data, len); in z_impl_eeprom_read() 106 size_t len); 109 const void *data, size_t len) in z_impl_eeprom_write() argument 114 return api->write(dev, offset, data, len); in z_impl_eeprom_write()
|
/Zephyr-latest/drivers/sensor/tdk/icm42688/ |
D | icm42688_spi.c | 16 .len = 1, in spi_write_register() 20 .len = 1, in spi_write_register() 33 size_t len) in spi_read_register() argument 39 .len = 1, in spi_read_register() 50 .len = 1, in spi_read_register() 54 .len = len, in spi_read_register() 66 int icm42688_spi_read(const struct spi_dt_spec *bus, uint16_t reg, uint8_t *data, size_t len) in icm42688_spi_read() argument 71 res = spi_read_register(bus, address, data, len); in icm42688_spi_read()
|
/Zephyr-latest/drivers/sensor/bosch/bmi270/ |
D | bmi270_spi.c | 23 uint8_t start, uint8_t *data, uint16_t len) in bmi270_reg_read_spi() argument 30 .len = 1 in bmi270_reg_read_spi() 44 rx_buf[0].len = 2; in bmi270_reg_read_spi() 45 rx_buf[1].len = len; in bmi270_reg_read_spi() 61 const uint8_t *data, uint16_t len) in bmi270_reg_write_spi() argument 66 {.buf = &addr, .len = sizeof(addr)}, in bmi270_reg_write_spi() 67 {.buf = (uint8_t *)data, .len = len} in bmi270_reg_write_spi()
|
/Zephyr-latest/drivers/sensor/st/i3g4250d/ |
D | i3g4250d_spi.c | 20 uint8_t *data, uint16_t len) in i3g4250d_spi_read() argument 27 .len = 2, in i3g4250d_spi_read() 36 .len = 1, in i3g4250d_spi_read() 40 .len = len, in i3g4250d_spi_read() 57 uint8_t *data, uint16_t len) in i3g4250d_spi_write() argument 65 .len = 1, in i3g4250d_spi_write() 69 .len = len, in i3g4250d_spi_write()
|
/Zephyr-latest/tests/bluetooth/tester/src/ |
D | btp.c | 54 const uint8_t *data, size_t len); 102 uint16_t len = sys_le16_to_cpu(hdr->len); in cmd_handler() local 104 if (len > BTP_DATA_MAX_SIZE) { in cmd_handler() 108 } else if ((btp->expect_len >= 0) && (btp->expect_len != len)) { in cmd_handler() 111 status = btp->func(hdr->data, len, in cmd_handler() 147 uint16_t len; in recv_cb() local 153 len = sys_le16_to_cpu(cmd->len); in recv_cb() 154 if (len > BTP_MTU - sizeof(*cmd)) { in recv_cb() 160 if (*off < sizeof(*cmd) + len) { in recv_cb() 184 static void uart_send(const uint8_t *data, size_t len) in uart_send() argument [all …]
|
/Zephyr-latest/samples/boards/st/bluetooth/interactive_gui/src/ |
D | main.c | 100 uint16_t len = 0; in parse_cmd() local 117 len = 2; in parse_cmd() 132 len += 2; /* Status and Command code */ in parse_cmd() 133 rsp->param_len = sys_cpu_to_le16(len); in parse_cmd() 134 len += RESP_CMDCODE_OFFSET; in parse_cmd() 136 return len; in parse_cmd() 139 static int send_evt(uint8_t *response, uint8_t len) in send_evt() argument 149 if (len > net_buf_tailroom(buf)) { in send_evt() 150 LOG_ERR("EVT too long: %d", len); in send_evt() 154 net_buf_add_mem(buf, response, len); in send_evt() [all …]
|
/Zephyr-latest/drivers/w1/ |
D | w1_common.c | 13 int z_impl_w1_read_block(const struct device *dev, uint8_t *buffer, size_t len) in z_impl_w1_read_block() argument 19 return api->read_block(dev, buffer, len); in z_impl_w1_read_block() 21 for (int i = 0; i < len; ++i) { in z_impl_w1_read_block() 33 size_t len) in z_impl_w1_write_block() argument 39 return api->write_block(dev, buffer, len); in z_impl_w1_write_block() 41 for (int i = 0; i < len; ++i) { in z_impl_w1_write_block()
|
/Zephyr-latest/subsys/net/lib/http/ |
D | http_hpack.c | 162 int len = 0; in hpack_integer_decode() local 173 len++; in hpack_integer_decode() 176 return len; in hpack_integer_decode() 181 len++; in hpack_integer_decode() 197 return len; in hpack_integer_decode() 239 int len = 0; in hpack_string_decode() local 256 len += ret; in hpack_string_decode() 279 len += str_len; in hpack_string_decode() 281 return len; in hpack_string_decode() 323 int ret, len; in hpack_handle_literal() local [all …]
|
/Zephyr-latest/subsys/settings/src/ |
D | settings_file.c | 89 if (entry2_ctx.len == 0) { in settings_file_check_duplicate() 108 if (off >= entry_ctx->len) { in read_entry_len() 111 return entry_ctx->len - off; in read_entry_len() 125 .len = 0 /* unknown length */ in settings_file_load_priv() 147 if (rc || entry_ctx.len == 0) { in settings_file_load_priv() 192 int len; in settings_tmpfile() local 195 len = strlen(src); in settings_tmpfile() 197 if (len + pfx_len >= SETTINGS_FILE_NAME_MAX) { in settings_tmpfile() 198 len = SETTINGS_FILE_NAME_MAX - pfx_len - 1; in settings_tmpfile() 200 memcpy(dst, src, len); in settings_tmpfile() [all …]
|
/Zephyr-latest/tests/bsim/bluetooth/host/gatt/authorization/src/ |
D | gatt_server_test.c | 77 void *buf, uint16_t len, uint16_t offset) in read_test_chrc() argument 81 return bt_gatt_attr_read(conn, attr, buf, len, offset, in read_test_chrc() 87 const void *buf, uint16_t len, in write_test_chrc() argument 92 if (len != sizeof(chrc_ctx->data)) { in write_test_chrc() 107 (void)memcpy(chrc_ctx->data, buf, len); in write_test_chrc() 109 return len; in write_test_chrc() 116 void *buf, uint16_t len, uint16_t offset) in read_test_unhandled_chrc() argument 118 return read_test_chrc(&unhandled_chrc_ctx, conn, attr, buf, len, offset); in read_test_unhandled_chrc() 123 const void *buf, uint16_t len, in write_test_unhandled_chrc() argument 126 printk("unhandled chrc len %u offset %u\n", len, offset); in write_test_unhandled_chrc() [all …]
|
/Zephyr-latest/subsys/net/ip/ |
D | utils.c | 99 uint8_t i, len, blen; in net_sprint_ll_addr_buf() local 108 len = 8U; in net_sprint_ll_addr_buf() 111 len = 6U; in net_sprint_ll_addr_buf() 114 len = 2U; in net_sprint_ll_addr_buf() 117 len = 6U; in net_sprint_ll_addr_buf() 121 for (i = 0U, blen = buflen; i < len && blen > 0; i++) { in net_sprint_ll_addr_buf() 172 int len = -1; in z_impl_net_addr_ntop() local 180 len = 8; in z_impl_net_addr_ntop() 209 len = 4; in z_impl_net_addr_ntop() 216 for (i = 0; i < len; i++) { in z_impl_net_addr_ntop() [all …]
|
/Zephyr-latest/samples/modules/tflite-micro/magic_wand/train/ |
D | data_split_test.py | 36 self.num = len(lines) 39 self.assertEqual(len(self.data), self.num) 65 self.assertEqual(len(train_data_0), 0) 66 self.assertEqual(len(train_data_50), len_50) 67 self.assertEqual(len(train_data_60), len_60) 68 self.assertEqual(len(valid_data_0), 0) 69 self.assertEqual(len(valid_data_50), len_50) 70 self.assertEqual(len(valid_data_20), len_20) 71 self.assertEqual(len(test_data_100), self.num) 72 self.assertEqual(len(test_data_0), (self.num - 2 * len_50)) [all …]
|
/Zephyr-latest/samples/tfm_integration/psa_crypto/src/ |
D | util_sformat.c | 11 static void sf_hex_ascii(unsigned char *data, size_t len, unsigned char nonvis) in sf_hex_ascii() argument 17 while (len) { in sf_hex_ascii() 20 len--; in sf_hex_ascii() 25 size_t len) in sf_hex_tabulate_16() argument 32 if (!len) { in sf_hex_tabulate_16() 37 ea = fmt->addr + len; in sf_hex_tabulate_16() 60 while (len) { in sf_hex_tabulate_16() 112 len--; in sf_hex_tabulate_16()
|
/Zephyr-latest/subsys/net/lib/lwm2m/ |
D | lwm2m_rw_senml_cbor.c | 145 int len; in put_basename() local 155 len = path_to_string(basename, fd->name_sz, path, LWM2M_PATH_LEVEL_OBJECT_INST); in put_basename() 157 if (len < 0) { in put_basename() 158 return len; in put_basename() 165 record->record_bn.record_bn.len = len; in put_basename() 168 if ((len < sizeof("/0/0") - 1) || (len >= SENML_MAX_NAME_SIZE)) { in put_basename() 180 int len = 1; in put_empty_array() local 182 memset(CPKT_BUF_W_PTR(out->out_cpkt), 0x80, len); /* 80 # array(0) */ in put_empty_array() 183 out->out_cpkt->offset += len; in put_empty_array() 185 return len; in put_empty_array() [all …]
|