Home
last modified time | relevance | path

Searched refs:length (Results 1 – 25 of 535) sorted by relevance

12345678910>>...22

/hal_espressif-3.4.0/components/esp_rom/linux/
Desp_rom_sys.c41 int length = 0; in _cvt() local
54 length++; in _cvt()
57 return (length); in _cvt()
72 int res = 0, length = 0; in esp_rom_vprintf() local
165 length = _cvt(val, buf, 10, "0123456789"); in esp_rom_vprintf()
169 length = _cvt(val, buf, 16, "0123456789abcdef"); in esp_rom_vprintf()
172 length = _cvt(val, buf, 16, "0123456789ABCDEF"); in esp_rom_vprintf()
183 length = 0; in esp_rom_vprintf()
184 while (cp[length] != '\0') length++; in esp_rom_vprintf()
195 length = left_prec; in esp_rom_vprintf()
[all …]
/hal_espressif-3.4.0/examples/bluetooth/esp_ble_mesh/common_components/example_nvs/
Dble_mesh_example_nvs.c38 esp_err_t ble_mesh_nvs_store(nvs_handle_t handle, const char *key, const void *data, size_t length) in ble_mesh_nvs_store() argument
42 if (key == NULL || data == NULL || length == 0) { in ble_mesh_nvs_store()
47 err = nvs_set_blob(handle, key, data, length); in ble_mesh_nvs_store()
59 ESP_LOGI(TAG, "Store, key \"%s\", length %u", key, length); in ble_mesh_nvs_store()
60 ESP_LOG_BUFFER_HEX("EXAMPLE_NVS: Store, data", data, length); in ble_mesh_nvs_store()
64 esp_err_t ble_mesh_nvs_get_length(nvs_handle_t handle, const char *key, size_t *length) in ble_mesh_nvs_get_length() argument
68 if (key == NULL || length == NULL) { in ble_mesh_nvs_get_length()
73 err = nvs_get_blob(handle, key, NULL, length); in ble_mesh_nvs_get_length()
76 *length = 0; in ble_mesh_nvs_get_length()
83 ESP_LOGI(TAG, "Get length, key \"%s\", length %u", key, *length); in ble_mesh_nvs_get_length()
[all …]
/hal_espressif-3.4.0/components/esptool_py/esptool/flasher_stub/
Dstub_write_flash.c331 void handle_flash_data(void *data_buf, uint32_t length) { in handle_flash_data() argument
335 if (length > fs.remaining) { in handle_flash_data()
338 length = fs.remaining; in handle_flash_data()
341 if (length == 0) { in handle_flash_data()
348 last_sector = (fs.next_write + length) / FLASH_SECTOR_SIZE; in handle_flash_data()
358 res = SPIWrite4B(1, fs.next_write, data_buf, length); in handle_flash_data()
360 res = SPIWrite(fs.next_write, data_buf, length); in handle_flash_data()
363 res = SPIWrite(fs.next_write, data_buf, length); in handle_flash_data()
367 fs.next_write += length; in handle_flash_data()
368 fs.remaining -= length; in handle_flash_data()
[all …]
/hal_espressif-3.4.0/components/spi_flash/test/
Dtest_large_flash_writes.c43 static void test_write_large_buffer(const uint8_t *source, size_t length);
61 static void test_write_large_buffer(const uint8_t *source, size_t length) in test_write_large_buffer() argument
64 TEST_ASSERT(part->size > length + 2 + SPI_FLASH_SEC_SIZE); in test_write_large_buffer()
66 printf("Writing %d bytes from source %p\n", length, source); in test_write_large_buffer()
68 uint8_t *buf = malloc(length); in test_write_large_buffer()
71 …ESP_ERROR_CHECK( spi_flash_erase_range(part->address, (length + SPI_FLASH_SEC_SIZE) & ~(SPI_FLASH_… in test_write_large_buffer()
74 ESP_ERROR_CHECK( spi_flash_write(part->address + 1, source, length) ); in test_write_large_buffer()
76 ESP_ERROR_CHECK( spi_flash_read(part->address + 1, buf, length) ); in test_write_large_buffer()
78 TEST_ASSERT_EQUAL_HEX8_ARRAY(source, buf, length); in test_write_large_buffer()
89 ESP_ERROR_CHECK( spi_flash_read(part->address + length, ends, sizeof(ends)) ); in test_write_large_buffer()
[all …]
Dtest_flash_encryption.c25 static void test_encrypted_write(size_t offset, const uint8_t *data, size_t length);
26 static void verify_erased_flash(size_t offset, size_t length);
37 static void verify_erased_flash(size_t offset, size_t length) in verify_erased_flash() argument
40 printf("verify erased 0x%x - 0x%x\n", offset, offset + length); in verify_erased_flash()
42 spi_flash_read(offset, readback, length)); in verify_erased_flash()
43 for (int i = 0; i < length; i++) { in verify_erased_flash()
98 static void test_encrypted_write(size_t offset, const uint8_t *data, size_t length) in test_encrypted_write() argument
100 uint8_t readback[length]; in test_encrypted_write()
101 printf("encrypt %d bytes at 0x%x\n", length, offset); in test_encrypted_write()
103 spi_flash_write_encrypted(offset, data, length)); in test_encrypted_write()
[all …]
/hal_espressif-3.4.0/components/wpa_supplicant/src/tls/
Dx509v3.c204 end = pos + hdr.length; in x509_parse_algorithm_identifier()
247 if (pos + hdr.length > end) in x509_parse_public_key()
249 end = pos + hdr.length; in x509_parse_public_key()
264 if (hdr.length < 1) in x509_parse_public_key()
278 cert->public_key = os_malloc(hdr.length - 1); in x509_parse_public_key()
284 os_memcpy(cert->public_key, pos + 1, hdr.length - 1); in x509_parse_public_key()
285 cert->public_key_len = hdr.length - 1; in x509_parse_public_key()
323 if (pos + hdr.length > buf + len) in x509_parse_name()
326 end = *next = pos + hdr.length; in x509_parse_name()
342 pos = set_end = hdr.payload + hdr.length; in x509_parse_name()
[all …]
Dpkcs8.c37 end = pos + hdr.length; in pkcs8_key_import()
52 if (bignum_set_unsigned_bin(zero, hdr.payload, hdr.length) < 0) { in pkcs8_key_import()
57 pos = hdr.payload + hdr.length; in pkcs8_key_import()
80 if (asn1_get_oid(hdr.payload, hdr.length, &oid, &pos)) { in pkcs8_key_import()
102 pos = hdr.payload + hdr.length; in pkcs8_key_import()
116 crypto_rsa_import_private_key(hdr.payload, hdr.length); in pkcs8_key_import()
150 end = pos + hdr.length; in pkcs8_enc_key_import()
163 enc_alg_len = hdr.length; in pkcs8_enc_key_import()
164 pos = hdr.payload + hdr.length; in pkcs8_enc_key_import()
176 data = pkcs5_decrypt(enc_alg, enc_alg_len, hdr.payload, hdr.length, in pkcs8_enc_key_import()
/hal_espressif-3.4.0/components/esp_http_server/src/
Dhttpd_parse.c46 size_t length; member
64 size_t length = parser_data->last.length; in verify_url() local
72 if (sizeof(r->uri) < (length + 1)) { in verify_url()
74 length, sizeof(r->uri)); in verify_url()
82 strlcpy((char *)r->uri, at, (length + 1)); in verify_url()
109 const char *at, size_t length) in cb_url() argument
118 parser_data->last.length = 0; in cb_url()
127 ESP_LOGD(TAG, LOG_FMT("processing url = %.*s"), length, at); in cb_url()
130 if ((parser_data->last.length += length) > HTTPD_MAX_URI_LEN) { in cb_url()
132 parser_data->last.length, HTTPD_MAX_URI_LEN); in cb_url()
[all …]
/hal_espressif-3.4.0/components/driver/test/
Dtest_spi_slave.c127 slave_t.length=8*32;
138 t.length = 32*(i+1);
139 if ( t.length != 0 ) {
150 ESP_LOG_BUFFER_HEX( "master tx", t.tx_buffer, t.length/8 );
153 TEST_ASSERT_EQUAL_HEX8_ARRAY( t.tx_buffer, slave_t.rx_buffer, t.length/8 );
154 TEST_ASSERT_EQUAL( t.length, slave_t.trans_len );
173 slave_t.length=8*32;
184 t.length = 32*(i+1);
185 if ( t.length != 0 ) {
196 ESP_LOG_BUFFER_HEX( "master rx", t.rx_buffer, t.length/8 );
[all …]
Dtest_i2s.c221 int length = 0; variable
232 if (length >= 10000 - 500) {
235 …i2s_read(I2S_NUM_0, i2s_read_buff + length, sizeof(uint8_t) * 500, &bytes_read, 1000 / portMAX_DEL…
237 for (int i = length; i < length + bytes_read; i++) {
245 length = length + bytes_read;
288 int length = 0; variable
299 if (length >= 10000 - 500) {
302 …i2s_read(I2S_NUM_0, i2s_read_buff + length, sizeof(uint8_t) * 500, &bytes_read, 1000 / portMAX_DEL…
304 for (int i = length; i < length + bytes_read; i++) {
312 length = length + bytes_read;
[all …]
Dtest_spi_bus_lock.c56 .length = 4*8, in spi_task1()
81 .length = 4*8, in spi_task2()
114 .length = 4*8, in spi_task3()
145 …_large_buffer(esp_flash_t *chip, const esp_partition_t *part, const uint8_t *source, size_t length) in write_large_buffer() argument
147 printf("Erasing chip %p, %d bytes\n", chip, length); in write_large_buffer()
149 …TEST_ESP_OK(esp_flash_erase_region(chip, part->address, (length + SPI_FLASH_SEC_SIZE) & ~(SPI_FLAS… in write_large_buffer()
151 printf("Writing chip %p, %d bytes from source %p\n", chip, length, source); in write_large_buffer()
153 TEST_ESP_OK(esp_flash_write(chip, source, part->address + 1, length) ); in write_large_buffer()
158 …ead_and_check(esp_flash_t *chip, const esp_partition_t *part, const uint8_t *source, size_t length) in read_and_check() argument
160 printf("Checking chip %p, %d bytes\n", chip, length); in read_and_check()
[all …]
Dtest_rmt.c277 size_t length = 0; in do_nec_tx_rx() local
300 TEST_ESP_OK(s_ir_builder->get_result(s_ir_builder, &items, &length)); in do_nec_tx_rx()
302 TEST_ESP_OK(rmt_write_items(tx_channel, items, length, false)); // no wait in do_nec_tx_rx()
305 TEST_ESP_OK(rmt_write_items(tx_channel, items, length, true)); // wait until done in do_nec_tx_rx()
312 items = (rmt_item32_t *) xRingbufferReceive(rb, &length, 1000); in do_nec_tx_rx()
314 length /= 4; // one RMT = 4 Bytes in do_nec_tx_rx()
315 if (s_ir_parser->input(s_ir_parser, items, length) == ESP_OK) { in do_nec_tx_rx()
373 size_t length = 0; variable
404 TEST_ESP_OK(s_ir_builder->get_result(s_ir_builder, &frames, &length));
407 TEST_ESP_OK(rmt_write_items(tx_channel, frames, length, true));
[all …]
/hal_espressif-3.4.0/examples/bluetooth/esp_ble_mesh/ble_mesh_sensor_model/sensor_server/main/
Dmain.c97 .sensor_data.length = 0, /* 0 represents the length is 1 */
108 .sensor_data.length = 0, /* 0 represents the length is 1 */
242 uint16_t length = 0; in example_ble_mesh_send_sensor_descriptor_status() local
266 memcpy(status + length, &descriptor, ESP_BLE_MESH_SENSOR_DESCRIPTOR_LEN); in example_ble_mesh_send_sensor_descriptor_status()
267 length += ESP_BLE_MESH_SENSOR_DESCRIPTOR_LEN; in example_ble_mesh_send_sensor_descriptor_status()
281 length = ESP_BLE_MESH_SENSOR_DESCRIPTOR_LEN; in example_ble_mesh_send_sensor_descriptor_status()
293 length = ESP_BLE_MESH_SENSOR_PROPERTY_ID_LEN; in example_ble_mesh_send_sensor_descriptor_status()
296 ESP_LOG_BUFFER_HEX("Sensor Descriptor", status, length); in example_ble_mesh_send_sensor_descriptor_status()
299 ESP_BLE_MESH_MODEL_OP_SENSOR_DESCRIPTOR_STATUS, length, status); in example_ble_mesh_send_sensor_descriptor_status()
372 if (state->sensor_data.length == ESP_BLE_MESH_SENSOR_DATA_ZERO_LEN) { in example_ble_mesh_get_sensor_data()
[all …]
/hal_espressif-3.4.0/components/bt/esp_ble_mesh/btc/
Dbtc_ble_mesh_sensor_model.c32 uint16_t length = 0U; in btc_ble_mesh_sensor_client_arg_deep_copy() local
52 length = src->sensor_client_get_state.get_state->column_get.raw_value_x->len; in btc_ble_mesh_sensor_client_arg_deep_copy()
53 … dst->sensor_client_get_state.get_state->column_get.raw_value_x = bt_mesh_alloc_buf(length); in btc_ble_mesh_sensor_client_arg_deep_copy()
65 length = src->sensor_client_get_state.get_state->series_get.raw_value_x1->len; in btc_ble_mesh_sensor_client_arg_deep_copy()
66 … dst->sensor_client_get_state.get_state->series_get.raw_value_x1 = bt_mesh_alloc_buf(length); in btc_ble_mesh_sensor_client_arg_deep_copy()
76 length = src->sensor_client_get_state.get_state->series_get.raw_value_x2->len; in btc_ble_mesh_sensor_client_arg_deep_copy()
77 … dst->sensor_client_get_state.get_state->series_get.raw_value_x2 = bt_mesh_alloc_buf(length); in btc_ble_mesh_sensor_client_arg_deep_copy()
107length = src->sensor_client_set_state.set_state->cadence_set.status_trigger_delta_down->len; in btc_ble_mesh_sensor_client_arg_deep_copy()
108 …nsor_client_set_state.set_state->cadence_set.status_trigger_delta_down = bt_mesh_alloc_buf(length); in btc_ble_mesh_sensor_client_arg_deep_copy()
118length = src->sensor_client_set_state.set_state->cadence_set.status_trigger_delta_up->len; in btc_ble_mesh_sensor_client_arg_deep_copy()
[all …]
Dbtc_ble_mesh_generic_model.c32 uint16_t length = 0U; in btc_ble_mesh_generic_client_arg_deep_copy() local
72length = src->generic_client_set_state.set_state->user_property_set.property_value->len; in btc_ble_mesh_generic_client_arg_deep_copy()
73 …->generic_client_set_state.set_state->user_property_set.property_value = bt_mesh_alloc_buf(length); in btc_ble_mesh_generic_client_arg_deep_copy()
85length = src->generic_client_set_state.set_state->admin_property_set.property_value->len; in btc_ble_mesh_generic_client_arg_deep_copy()
86 …>generic_client_set_state.set_state->admin_property_set.property_value = bt_mesh_alloc_buf(length); in btc_ble_mesh_generic_client_arg_deep_copy()
159 uint16_t length = 0U; in btc_ble_mesh_generic_client_copy_req_data() local
185 length = p_src_data->status_cb.user_properties_status.property_ids->len; in btc_ble_mesh_generic_client_copy_req_data()
186 … p_dest_data->status_cb.user_properties_status.property_ids = bt_mesh_alloc_buf(length); in btc_ble_mesh_generic_client_copy_req_data()
200 length = p_src_data->status_cb.user_property_status.property_value->len; in btc_ble_mesh_generic_client_copy_req_data()
201 … p_dest_data->status_cb.user_property_status.property_value = bt_mesh_alloc_buf(length); in btc_ble_mesh_generic_client_copy_req_data()
[all …]
/hal_espressif-3.4.0/components/mbedtls/port/aes/dma/
Desp_aes.c529 len_desc->length = sizeof(len_buf); in esp_aes_process_dma_gcm()
697 size_t length, in esp_aes_crypt_cbc() argument
715 if ( (length % AES_BLOCK_BYTES) || (length == 0) ) { in esp_aes_crypt_cbc()
729 r = esp_aes_process_dma(ctx, input, output, length, NULL); in esp_aes_crypt_cbc()
746 size_t length, in esp_aes_crypt_cfb8() argument
754 size_t block_bytes = length - (length % AES_BLOCK_BYTES); in esp_aes_crypt_cfb8()
789 length -= block_bytes; in esp_aes_crypt_cfb8()
795 if (length > 0) { in esp_aes_crypt_cfb8()
800 while ( length-- ) { in esp_aes_crypt_cfb8()
832 size_t length, in esp_aes_crypt_cfb128() argument
[all …]
/hal_espressif-3.4.0/components/mbedtls/port/aes/block/
Desp_aes.c203 size_t length, in esp_aes_crypt_cbc() argument
213 if ( length % 16 ) { in esp_aes_crypt_cbc()
227 while ( length > 0 ) { in esp_aes_crypt_cbc()
240 length -= 16; in esp_aes_crypt_cbc()
243 while ( length > 0 ) { in esp_aes_crypt_cbc()
255 length -= 16; in esp_aes_crypt_cbc()
269 size_t length, in esp_aes_crypt_cfb128() argument
287 while ( length-- ) { in esp_aes_crypt_cfb128()
299 while ( length-- ) { in esp_aes_crypt_cfb128()
322 size_t length, in esp_aes_crypt_cfb8() argument
[all …]
/hal_espressif-3.4.0/components/wpa_supplicant/src/eap_peer/
Deap_tlv_common.h44 be16 length; member
49 be16 length; member
56 be16 length; member
63 be16 length; member
71 be16 length; member
82 be16 length; member
91 be16 length; member
98 be16 length; member
/hal_espressif-3.4.0/examples/bluetooth/esp_ble_mesh/ble_mesh_coex_test/components/case/
Dsync.c97 .length = 30, in send_start_msg()
125 .length = 30, in send_tcp_rx_inited_msg()
139 .length = 30, in send_case_inited_msg()
162 .length = 30, in assign_case_to_dev()
174 .length = 30, in assign_case_to_dev()
188 .length = 30, in assign_case_to_dev()
205 .length = 30, in assign_case_to_dev()
288 uint8_t length = data[data_ptr]; in analys_param() local
290 if ( length > 20) { in analys_param()
294 char *ssid = malloc(length + 1); in analys_param()
[all …]
/hal_espressif-3.4.0/components/mbedtls/port/aes/
Desp_aes_gcm.c408 size_t length, in esp_aes_gcm_update() argument
429 if ( output > input && (size_t) ( output - input ) < length ) { in esp_aes_gcm_update()
447 esp_gcm_ghash(ctx, input, length, ctx->ghash); in esp_aes_gcm_update()
451 esp_aes_crypt_ctr(&ctx->aes_ctx, length, &nc_off, nonce_counter, stream, input, output); in esp_aes_gcm_update()
457 ctx->data_len += length; in esp_aes_gcm_update()
461 esp_gcm_ghash(ctx, output, length, ctx->ghash); in esp_aes_gcm_update()
492 static bool esp_aes_gcm_input_support_hw_accel(size_t length, const unsigned char *aad, size_t aad_… in esp_aes_gcm_input_support_hw_accel() argument
502 } else if (!esp_ptr_dma_capable(input) && length > 0) { in esp_aes_gcm_input_support_hw_accel()
505 } else if (!esp_ptr_dma_capable(output) && length > 0) { in esp_aes_gcm_input_support_hw_accel()
512 } else if (length == 0) { in esp_aes_gcm_input_support_hw_accel()
[all …]
/hal_espressif-3.4.0/components/bt/common/osi/
Dbuffer.c26 size_t length; member
42 buffer->length = size; in buffer_new()
50 return buffer_new_slice(buf, buf->length); in buffer_new_ref()
57 assert(slice_size <= buf->length); in buffer_new_slice()
67 ret->length = slice_size; in buffer_new_slice()
95 return buf->root->data + buf->root->length - buf->length; in buffer_ptr()
101 return buf->length; in buffer_length()
/hal_espressif-3.4.0/examples/peripherals/rmt/ir_protocols/main/
Dir_protocols_main.c31 size_t length = 0; in example_ir_rx_task() local
54 items = (rmt_item32_t *) xRingbufferReceive(rb, &length, portMAX_DELAY); in example_ir_rx_task()
56 length /= 4; // one RMT = 4 Bytes in example_ir_rx_task()
57 if (ir_parser->input(ir_parser, items, length) == ESP_OK) { in example_ir_rx_task()
80 size_t length = 0; in example_ir_tx_task() local
99 ESP_ERROR_CHECK(ir_builder->get_result(ir_builder, &items, &length)); in example_ir_tx_task()
101 rmt_write_items(example_tx_channel, items, length, false); in example_ir_tx_task()
105 ESP_ERROR_CHECK(ir_builder->get_result(ir_builder, &items, &length)); in example_ir_tx_task()
106 rmt_write_items(example_tx_channel, items, length, false); in example_ir_tx_task()
/hal_espressif-3.4.0/examples/protocols/pppos_client/components/modem/src/
Desp_modem.c145 size_t length = 0; in esp_handle_uart_data() local
146 uart_get_buffered_data_len(esp_dte->uart_port, &length); in esp_handle_uart_data()
147 ESP_LOGV(MODEM_TAG, "uart_get_buffered_data_len()=%d", length); in esp_handle_uart_data()
148 if (esp_dte->parent.dce->mode != MODEM_PPP_MODE && length) { in esp_handle_uart_data()
150 length = MIN(esp_dte->buffer_size - 1, length); in esp_handle_uart_data()
151length = uart_read_bytes(esp_dte->uart_port, esp_dte->buffer + esp_dte->consumed, length - esp_dte… in esp_handle_uart_data()
153 if (memchr(esp_dte->buffer + esp_dte->consumed, separator, length)) { in esp_handle_uart_data()
154 esp_dte->buffer[length] = '\0'; in esp_handle_uart_data()
155 … ESP_LOG_BUFFER_HEXDUMP("esp-modem: pattern-detection", esp_dte->buffer, length, ESP_LOG_VERBOSE); in esp_handle_uart_data()
158 … if (esp_dte_handle_line(esp_dte, (char*)esp_dte->buffer, length, separator) == ESP_OK) { in esp_handle_uart_data()
[all …]
/hal_espressif-3.4.0/components/spi_flash/
Dspi_flash_chip_winbond.c30 …mmand_winbond_program_4B(esp_flash_t *chip, const void *buffer, uint32_t address, uint32_t length);
45 …r_t spi_flash_chip_winbond_read(esp_flash_t *chip, void *buffer, uint32_t address, uint32_t length) in spi_flash_chip_winbond_read() argument
54 if (REGION_32BIT(address, length)) { in spi_flash_chip_winbond_read()
64 while (err == ESP_OK && length > 0) { in spi_flash_chip_winbond_read()
66 …uint32_t read_len = chip->host->driver->read_data_slicer(chip->host, address, length, &align_addre… in spi_flash_chip_winbond_read()
68 uint32_t data_len = MIN(align_address + read_len, address + length) - address; in spi_flash_chip_winbond_read()
75 length = length - data_len; in spi_flash_chip_winbond_read()
81 …chip_winbond_page_program(esp_flash_t *chip, const void *buffer, uint32_t address, uint32_t length) in spi_flash_chip_winbond_page_program() argument
89 err = spi_flash_command_winbond_program_4B(chip, buffer, address, length); in spi_flash_chip_winbond_page_program()
203 …ommand_winbond_program_4B(esp_flash_t *chip, const void *buffer, uint32_t address, uint32_t length) in spi_flash_command_winbond_program_4B() argument
[all …]
/hal_espressif-3.4.0/components/esp_hw_support/test/
Ddigital_signature_test_cases_3072.h53 .length = 95, // 3072 bit
78 .length = 63, // 2048 bit
103 .length = 31, // 1024 bit
128 .length = 95, // 3072 bit
153 .length = 63, // 2048 bit
178 .length = 31, // 1024 bit

12345678910>>...22