Home
last modified time | relevance | path

Searched refs:bytes_to_copy (Results 1 – 25 of 29) sorted by relevance

12

/btstack/port/archive/msp430f5229lp-cc2564b/example/
H A Dble_server.c163 uint16_t bytes_to_copy = value_len - offset; in get_bytes_to_copy() local
164 if (bytes_to_copy > buffer_size) { in get_bytes_to_copy()
165 bytes_to_copy = buffer_size; in get_bytes_to_copy()
167 return bytes_to_copy; in get_bytes_to_copy()
175 uint16_t bytes_to_copy = get_bytes_to_copy(value_len, offset, buffer_size); in att_read_callback() local
176 if (!bytes_to_copy) return 0; in att_read_callback()
180 memcpy(buffer, &chr01_value[offset], bytes_to_copy); in att_read_callback()
186 return bytes_to_copy; in att_read_callback()
194 uint16_t bytes_to_copy = get_bytes_to_copy(value_len, offset,buffer_size); in att_write_callback() local
195 if (!bytes_to_copy) return ATT_ERROR_INVALID_OFFSET; in att_write_callback()
[all …]
/btstack/port/archive/msp-exp430f5438-cc2564b/example/
H A Dble_server.c187 uint16_t bytes_to_copy = value_len - offset; in get_bytes_to_copy() local
188 if (bytes_to_copy > buffer_size) { in get_bytes_to_copy()
189 bytes_to_copy = buffer_size; in get_bytes_to_copy()
191 return bytes_to_copy; in get_bytes_to_copy()
199 uint16_t bytes_to_copy = get_bytes_to_copy(value_len, offset, buffer_size); in att_read_callback() local
200 if (!bytes_to_copy) return 0; in att_read_callback()
204 memcpy(buffer, &chr01_value[offset], bytes_to_copy); in att_read_callback()
210 return bytes_to_copy; in att_read_callback()
218 uint16_t bytes_to_copy = get_bytes_to_copy(value_len, offset,buffer_size); in att_write_callback() local
219 if (!bytes_to_copy) return ATT_ERROR_INVALID_OFFSET; in att_write_callback()
[all …]
/btstack/src/
H A Dbtstack_ring_buffer.c96 unsigned int bytes_to_copy = btstack_min(bytes_until_end, remaining_data_length); in btstack_ring_buffer_write() local
97 …void)memcpy(&ring_buffer->storage[ring_buffer->last_written_index], remaining_data, bytes_to_copy); in btstack_ring_buffer_write()
98 remaining_data_length -= bytes_to_copy; in btstack_ring_buffer_write()
99 remaining_data += bytes_to_copy; in btstack_ring_buffer_write()
102 ring_buffer->last_written_index += bytes_to_copy; in btstack_ring_buffer_write()
133 unsigned int bytes_to_copy = btstack_min(bytes_until_end, remaining_data_length); in btstack_ring_buffer_read() local
135 bytes_to_copy); in btstack_ring_buffer_read()
136 remaining_data_length -= bytes_to_copy; in btstack_ring_buffer_read()
137 remaining_data += bytes_to_copy; in btstack_ring_buffer_read()
140 ring_buffer->last_read_index += bytes_to_copy; in btstack_ring_buffer_read()
H A Dbtstack_util.c651 uint16_t bytes_to_copy = (uint16_t) btstack_min( dst_size - 1, (uint16_t) strlen(src)); in btstack_strcpy() local
652 (void) memcpy(dst, src, bytes_to_copy); in btstack_strcpy()
653 dst[bytes_to_copy] = 0; in btstack_strcpy()
654 return bytes_to_copy + 1; in btstack_strcpy()
660 uint16_t bytes_to_copy = btstack_min( src_len, dst_size - dst_len - 1); in btstack_strcat() local
661 (void) memcpy( &dst[dst_len], src, bytes_to_copy); in btstack_strcat()
662 dst[dst_len + bytes_to_copy] = 0; in btstack_strcat()
715 uint16_t bytes_to_copy = field_len; in btstack_virtual_memcpy() local
720 bytes_to_copy -= skip_at_start; in btstack_virtual_memcpy()
726 bytes_to_copy -= skip_at_end; in btstack_virtual_memcpy()
[all …]
H A Dhci_transport_em9304_spi.c411 … uint16_t bytes_to_copy = btstack_min(bytes_available, hci_transport_em9304_spi_bytes_to_read); in hci_transport_em9304_spi_process_data() local
412 em9304_engine_get_bytes(&hci_packet[hci_transport_em9304_spi_read_pos], bytes_to_copy); in hci_transport_em9304_spi_process_data()
414 hci_transport_em9304_spi_read_pos += bytes_to_copy; in hci_transport_em9304_spi_process_data()
415 hci_transport_em9304_spi_bytes_to_read -= bytes_to_copy; in hci_transport_em9304_spi_process_data()
H A Dbtstack_crypto.c802 uint16_t bytes_to_copy = btstack_min(bytes_free, btstack_crypto_ccm->block_len); in btstack_crypto_ccm_calc_aad_xn() local
803 while (bytes_to_copy){ in btstack_crypto_ccm_calc_aad_xn()
807 bytes_to_copy--; in btstack_crypto_ccm_calc_aad_xn()
994 uint16_t bytes_to_copy; in btstack_crypto_handle_random_data() local
999 bytes_to_copy = btstack_min(btstack_crypto_random->size, len); in btstack_crypto_handle_random_data()
1000 (void)memcpy(btstack_crypto_random->buffer, data, bytes_to_copy); in btstack_crypto_handle_random_data()
1001 btstack_crypto_random->buffer += bytes_to_copy; in btstack_crypto_handle_random_data()
1002 btstack_crypto_random->size -= bytes_to_copy; in btstack_crypto_handle_random_data()
/btstack/src/classic/
H A Dhfp_msbc.c104 int bytes_to_copy = size; in hfp_msbc_read_from_stream() local
106 bytes_to_copy = hfp_msbc_buffer_offset; in hfp_msbc_read_from_stream()
111 (void)memcpy(buf, hfp_msbc_buffer, bytes_to_copy); in hfp_msbc_read_from_stream()
112 …memmove(hfp_msbc_buffer, hfp_msbc_buffer + bytes_to_copy, sizeof(hfp_msbc_buffer) - bytes_to_copy); in hfp_msbc_read_from_stream()
113 hfp_msbc_buffer_offset -= bytes_to_copy; in hfp_msbc_read_from_stream()
/btstack/port/renesas-ek-ra6m4a-da14531/port/
H A Dhal_flash_bank_fsp.c95 uint32_t bytes_to_copy = 0; in hal_flash_bank_fsp_read() local
98 bytes_to_copy = end_addr_copy - offset; in hal_flash_bank_fsp_read()
99 memcpy(buffer, (uint8_t *) (self->bank_addr[bank] + offset), bytes_to_copy); in hal_flash_bank_fsp_read()
100 buffer += bytes_to_copy; in hal_flash_bank_fsp_read()
103 uint32_t bytes_to_fill = size - bytes_to_copy; in hal_flash_bank_fsp_read()
/btstack/test/mock/
H A Dmock_btstack_tlv.c79 uint16_t bytes_to_copy = btstack_min(buffer_size, entry->len); in mock_btstack_tlv_get_tag() local
80 memcpy(buffer, &entry->value[0], bytes_to_copy); in mock_btstack_tlv_get_tag()
81 return bytes_to_copy; in mock_btstack_tlv_get_tag()
/btstack/example/
H A Dsdp_bnep_query.c141 uint16_t bytes_to_copy = btstack_min(buffer_size-1,len); in get_string_from_data_element() local
142 memcpy(buffer_data, &element[pos], bytes_to_copy); in get_string_from_data_element()
143 buffer_data[bytes_to_copy] ='\0'; in get_string_from_data_element()
H A Dsco_demo_util.c364 uint16_t bytes_to_copy = sco_payload_length; in sco_demo_cvsd_fill_payload() local
371 … btstack_ring_buffer_read(&audio_input_ring_buffer, payload_buffer, bytes_to_copy, &bytes_read); in sco_demo_cvsd_fill_payload()
382 bytes_to_copy -= bytes_read; in sco_demo_cvsd_fill_payload()
387 if (bytes_to_copy){ in sco_demo_cvsd_fill_payload()
388 memset(payload_buffer + pos, 0, bytes_to_copy); in sco_demo_cvsd_fill_payload()
H A Dpanu_demo.c171 uint16_t bytes_to_copy = btstack_min(buffer_size-1,len); in get_string_from_data_element() local
172 memcpy(buffer_data, &element[pos], bytes_to_copy); in get_string_from_data_element()
173 buffer_data[bytes_to_copy] ='\0'; in get_string_from_data_element()
H A Dpan_lwip_http_server.c283 uint16_t bytes_to_copy = btstack_min(strlen(last_line_text), cgi_buffer_size); in cgi_buffer_fill() local
284 memcpy(cgi_buffer, last_line_text, bytes_to_copy); in cgi_buffer_fill()
/btstack/port/msp432p401lp-cc256x/
H A Dmain.c349 uint16_t bytes_to_copy = btstack_min(bytes_avail, bytes_to_read); in hal_uart_dma_harvest() local
350 …pong_buffer[hal_dma_rx_active_buffer * HAL_DMA_RX_BUFFER_SIZE + hal_dma_rx_offset], bytes_to_copy); in hal_uart_dma_harvest()
351 rx_buffer_ptr += bytes_to_copy; in hal_uart_dma_harvest()
352 hal_dma_rx_offset += bytes_to_copy; in hal_uart_dma_harvest()
353 bytes_to_read -= bytes_to_copy; in hal_uart_dma_harvest()
/btstack/platform/embedded/
H A Dbtstack_tlv_flash_bank.c310 uint32_t bytes_to_copy; in btstack_tlv_flash_bank_migrate() local
324 bytes_to_copy = tag_len; in btstack_tlv_flash_bank_migrate()
327 bytes_to_copy = entry_size; in btstack_tlv_flash_bank_migrate()
332 while (bytes_to_copy > 0) { in btstack_tlv_flash_bank_migrate()
333 uint32_t bytes_this_iteration = btstack_min(bytes_to_copy, sizeof(copy_buffer)); in btstack_tlv_flash_bank_migrate()
338 bytes_to_copy -= bytes_this_iteration; in btstack_tlv_flash_bank_migrate()
/btstack/test/hfp/
H A Dsco_demo_util.c570 int bytes_to_copy = sco_payload_length; in sco_demo_send() local
583 … btstack_ring_buffer_read(&audio_input_ring_buffer, sample_data, bytes_to_copy, &bytes_read); in sco_demo_send()
594 bytes_to_copy -= bytes_read; in sco_demo_send()
599 if (bytes_to_copy){ in sco_demo_send()
600 memset(sample_data + pos, 0, bytes_to_copy); in sco_demo_send()
/btstack/src/mesh/
H A Dpb_adv.c605 … uint16_t bytes_to_copy = btstack_min(bytes_left, pb_adv_msg_out_len - pb_adv_msg_out_pos); in pb_adv_handler() local
608 bytes_to_copy); in pb_adv_handler()
609 pos += bytes_to_copy; in pb_adv_handler()
610 … printf("bytes %02u, pos %02u, len %02u: ", bytes_to_copy, pb_adv_msg_out_pos, pb_adv_msg_out_len); in pb_adv_handler()
612 pb_adv_msg_out_pos += bytes_to_copy; in pb_adv_handler()
H A Dmesh_upper_transport.c234 uint16_t bytes_to_copy = btstack_min(bytes_current_segment, payload_len - payload_offset); in mesh_segmented_store_payload() local
235 … (void) memcpy(&network_pdu->data[network_pdu->len], &payload[payload_offset], bytes_to_copy); in mesh_segmented_store_payload()
236 bytes_current_segment -= bytes_to_copy; in mesh_segmented_store_payload()
240 network_pdu->len += bytes_to_copy; in mesh_segmented_store_payload()
241 payload_offset += bytes_to_copy; in mesh_segmented_store_payload()
1336 uint16_t bytes_to_copy = btstack_min(bytes_current_segment, data_len); in mesh_upper_transport_message_add_data() local
1337 (void) memcpy(&builder->segment->data[builder->segment->len], data, bytes_to_copy); in mesh_upper_transport_message_add_data()
1338 builder->segment->len += bytes_to_copy; in mesh_upper_transport_message_add_data()
1339 bytes_current_segment -= bytes_to_copy; in mesh_upper_transport_message_add_data()
1340 data += bytes_to_copy; in mesh_upper_transport_message_add_data()
[all …]
/btstack/platform/daemon/binding/java/src/com/bluekitchen/btstack/
H A DUtil.java90 int bytes_to_copy = Math.min(value.length, len); in storeBytes() local
91 System.arraycopy(value, 0, buffer, offset, bytes_to_copy); in storeBytes()
92 for (int i = bytes_to_copy; i < len ; i++){ in storeBytes()
/btstack/platform/windows/
H A Dbtstack_tlv_windows.c145 uint16_t bytes_to_copy = btstack_min(buffer_size, entry->len); in btstack_tlv_windows_get_tag() local
146 memcpy(buffer, &entry->value[0], bytes_to_copy); in btstack_tlv_windows_get_tag()
147 return bytes_to_copy; in btstack_tlv_windows_get_tag()
/btstack/platform/posix/
H A Dbtstack_tlv_posix.c135 uint16_t bytes_to_copy = btstack_min(buffer_size, entry->len); in btstack_tlv_posix_get_tag() local
136 memcpy(buffer, &entry->value[0], bytes_to_copy); in btstack_tlv_posix_get_tag()
137 return bytes_to_copy; in btstack_tlv_posix_get_tag()
/btstack/src/ble/
H A Datt_db.c236 uint16_t bytes_to_copy = btstack_min(it->value_len - offset, buffer_size); in att_copy_value() local
237 (void)memcpy(buffer, it->value, bytes_to_copy); in att_copy_value()
238 return bytes_to_copy; in att_copy_value()
1300 uint16_t bytes_to_copy = btstack_min(value_len, att_connection->mtu - 3u); in prepare_handle_value() local
1301 (void)memcpy(&response_buffer[3], value, bytes_to_copy); in prepare_handle_value()
1680 uint16_t bytes_to_copy = 0; in att_read_callback_handle_blob() local
1682 bytes_to_copy = btstack_min(blob_size - offset, buffer_size); in att_read_callback_handle_blob()
1683 (void)memcpy(buffer, &blob[offset], bytes_to_copy); in att_read_callback_handle_blob()
1685 return bytes_to_copy; in att_read_callback_handle_blob()
1847 uint16_t bytes_to_copy = btstack_min( response_buffer_size - 3, it.value_len); in btp_att_get_attribute_value() local
[all …]
/btstack/test/fuzz/
H A Dfuzz_gatt_client.c290 uint32_t bytes_to_copy = btstack_min(size, sizeof(response_buffer)-1); in LLVMFuzzerTestOneInput() local
291 memcpy(&response_buffer[1], data, bytes_to_copy); in LLVMFuzzerTestOneInput()
293 …gatt_client_att_packet_handler_fuzz(ATT_DATA_PACKET, ble_handle, response_buffer, bytes_to_copy+1); in LLVMFuzzerTestOneInput()
/btstack/src/ble/gatt-service/
H A Ddevice_information_service_client.c246 uint16_t bytes_to_copy = btstack_min(value_len, DEVICE_INFORMATION_MAX_STRING_LEN); in device_information_service_emit_string_value() local
247 memcpy((char*)&event[pos], value, bytes_to_copy); in device_information_service_emit_string_value()
248 pos += bytes_to_copy; in device_information_service_emit_string_value()
/btstack/port/stm32-l073rz-nucleo-em9304/port/
H A Dport.c273 int bytes_to_copy = btstack_min(bytes_available, hal_uart_dma_rx_len); in hal_spi_em9304_transfer_rx_data() local
275 …ring_buffer_read(&hal_uart_dma_rx_ring_buffer, hal_uart_dma_rx_buffer, bytes_to_copy, &bytes_read); in hal_spi_em9304_transfer_rx_data()

12