Home
last modified time | relevance | path

Searched refs:remaining (Results 1 – 25 of 175) sorted by relevance

1234567

/Zephyr-latest/drivers/bluetooth/hci/
Dhci_esp32.c55 static struct net_buf *bt_esp_evt_recv(uint8_t *data, size_t remaining) in bt_esp_evt_recv() argument
62 if (remaining < sizeof(hdr)) { in bt_esp_evt_recv()
71 remaining -= sizeof(hdr); in bt_esp_evt_recv()
73 if (remaining != hdr.len) { in bt_esp_evt_recv()
92 if (buf_tailroom < remaining) { in bt_esp_evt_recv()
93 LOG_ERR("Not enough space in buffer %zu/%zu", remaining, buf_tailroom); in bt_esp_evt_recv()
98 net_buf_add_mem(buf, data, remaining); in bt_esp_evt_recv()
103 static struct net_buf *bt_esp_acl_recv(uint8_t *data, size_t remaining) in bt_esp_acl_recv() argument
109 if (remaining < sizeof(hdr)) { in bt_esp_acl_recv()
118 remaining -= sizeof(hdr); in bt_esp_acl_recv()
[all …]
Dhci_da1469x.c46 uint16_t remaining; member
77 rx.remaining = sizeof(rx.evt); in h4_get_type()
78 rx.hdr_len = rx.remaining; in h4_get_type()
81 rx.remaining = sizeof(rx.acl); in h4_get_type()
82 rx.hdr_len = rx.remaining; in h4_get_type()
86 rx.remaining = sizeof(rx.iso); in h4_get_type()
87 rx.hdr_len = rx.remaining; in h4_get_type()
99 int bytes_read = rx.hdr_len - rx.remaining; in h4_read_hdr()
102 ret = cmac_mbox_read(rx.hdr + bytes_read, rx.remaining); in h4_read_hdr()
106 rx.remaining -= ret; in h4_read_hdr()
[all …]
Dipc.c69 static struct net_buf *bt_ipc_evt_recv(const uint8_t *data, size_t remaining) in bt_ipc_evt_recv() argument
76 if (remaining < sizeof(hdr)) { in bt_ipc_evt_recv()
85 remaining -= sizeof(hdr); in bt_ipc_evt_recv()
87 if (remaining != hdr.len) { in bt_ipc_evt_recv()
107 if (buf_tailroom < remaining) { in bt_ipc_evt_recv()
108 LOG_ERR("Not enough space in buffer %zu/%zu", remaining, buf_tailroom); in bt_ipc_evt_recv()
113 net_buf_add_mem(buf, data, remaining); in bt_ipc_evt_recv()
118 static struct net_buf *bt_ipc_acl_recv(const uint8_t *data, size_t remaining) in bt_ipc_acl_recv() argument
124 if (remaining < sizeof(hdr)) { in bt_ipc_acl_recv()
133 remaining -= sizeof(hdr); in bt_ipc_acl_recv()
[all …]
Dh4.c40 uint16_t remaining; member
87 h4->rx.remaining = sizeof(h4->rx.evt); in h4_get_type()
88 h4->rx.hdr_len = h4->rx.remaining; in h4_get_type()
91 h4->rx.remaining = sizeof(h4->rx.acl); in h4_get_type()
92 h4->rx.hdr_len = h4->rx.remaining; in h4_get_type()
96 h4->rx.remaining = sizeof(h4->rx.iso); in h4_get_type()
97 h4->rx.hdr_len = h4->rx.remaining; in h4_get_type()
111 int bytes_read = h4->rx.hdr_len - h4->rx.remaining; in h4_read_hdr()
114 ret = uart_fifo_read(cfg->uart, h4->rx.hdr + bytes_read, h4->rx.remaining); in h4_read_hdr()
118 h4->rx.remaining -= ret; in h4_read_hdr()
[all …]
/Zephyr-latest/samples/bluetooth/hci_ipc/src/
Dmain.c54 static struct net_buf *hci_ipc_cmd_recv(uint8_t *data, size_t remaining) in hci_ipc_cmd_recv() argument
59 if (remaining < sizeof(*hdr)) { in hci_ipc_cmd_recv()
67 remaining -= sizeof(*hdr); in hci_ipc_cmd_recv()
73 if (remaining != hdr->param_len) { in hci_ipc_cmd_recv()
79 if (remaining > net_buf_tailroom(buf)) { in hci_ipc_cmd_recv()
86 net_buf_add_mem(buf, data, remaining); in hci_ipc_cmd_recv()
91 static struct net_buf *hci_ipc_acl_recv(uint8_t *data, size_t remaining) in hci_ipc_acl_recv() argument
96 if (remaining < sizeof(*hdr)) { in hci_ipc_acl_recv()
104 remaining -= sizeof(*hdr); in hci_ipc_acl_recv()
110 if (remaining != sys_le16_to_cpu(hdr->len)) { in hci_ipc_acl_recv()
[all …]
/Zephyr-latest/tests/kernel/timer/timepoints/src/
Dmain.c13 k_timeout_t timeout, remaining; in ZTEST() local
18 remaining = sys_timepoint_timeout(timepoint); in ZTEST()
19 zassert_true(K_TIMEOUT_EQ(remaining, K_NO_WAIT)); in ZTEST()
24 remaining = sys_timepoint_timeout(timepoint); in ZTEST()
25 zassert_true(K_TIMEOUT_EQ(remaining, K_FOREVER)); in ZTEST()
30 remaining = sys_timepoint_timeout(timepoint); in ZTEST()
31 zassert_true(remaining.ticks <= timeout.ticks && remaining.ticks != 0); in ZTEST()
34 remaining = sys_timepoint_timeout(timepoint); in ZTEST()
35 zassert_true(K_TIMEOUT_EQ(remaining, K_NO_WAIT)); in ZTEST()
/Zephyr-latest/subsys/net/lib/coap/
Dcoap_link_format.c218 uint16_t *remaining, size_t *offset, in append_to_coap_pkt() argument
224 if (!*remaining) { in append_to_coap_pkt()
240 if (len > *remaining) { in append_to_coap_pkt()
241 len = *remaining; in append_to_coap_pkt()
246 *remaining -= len; in append_to_coap_pkt()
254 uint16_t *remaining, size_t *offset, in format_uri() argument
266 remaining, offset, current); in format_uri()
271 if (!*remaining) { in format_uri()
279 res = append_to_coap_pkt(response, *p, path_len, remaining, in format_uri()
285 if (!*remaining) { in format_uri()
[all …]
/Zephyr-latest/tests/net/socket/websocket/src/
Dmain.c50 uint32_t *msg_type, uint64_t *remaining, in test_recv_buf() argument
64 msg_type, remaining, 0); in test_recv_buf()
107 uint64_t remaining = -1; in test_recv() local
125 &ctx, &msg_type, &remaining, in test_recv()
142 &ctx, &msg_type, &remaining, in test_recv()
158 &ctx, &msg_type, &remaining, in test_recv()
170 zassert_equal(remaining, 0, "Msg not empty"); in test_recv()
229 uint64_t remaining = -1; in ZTEST() local
239 total_read = test_recv_buf(&feed_buf[0], sizeof(ping), &ctx, &msg_type, &remaining, in ZTEST()
250 uint64_t remaining = -1; in test_recv_2() local
[all …]
/Zephyr-latest/samples/bluetooth/hci_uart/src/
Dmain.c115 static int remaining; in rx_isr() local
135 remaining = hdr_len(type); in rx_isr()
144 &hdr_buf[hdr_len(type) - remaining], in rx_isr()
145 remaining); in rx_isr()
146 remaining -= read; in rx_isr()
147 if (remaining == 0) { in rx_isr()
161 remaining = get_len(hdr_buf, type); in rx_isr()
164 if (remaining > net_buf_tailroom(buf)) { in rx_isr()
176 remaining); in rx_isr()
178 remaining -= read; in rx_isr()
[all …]
/Zephyr-latest/samples/boards/st/bluetooth/interactive_gui/src/
Dmain.c242 static int remaining; in rx_isr() local
261 remaining = hdr_len(type); in rx_isr()
269 read = h4_read(hci_uart_dev, &hdr_buf[hdr_len(type) - remaining], in rx_isr()
270 remaining); in rx_isr()
271 remaining -= read; in rx_isr()
272 if (remaining == 0) { in rx_isr()
287 remaining = get_len(hdr_buf, type); in rx_isr()
291 if (remaining > 255) { in rx_isr()
300 if (remaining > net_buf_tailroom(buf)) { in rx_isr()
311 read = h4_read(hci_uart_dev, net_buf_tail(buf), remaining); in rx_isr()
[all …]
/Zephyr-latest/tests/subsys/modem/backends/uart/src/
Dmain.c111 static int transmit_prng(uint32_t remaining) in transmit_prng() argument
121 transmit_size = MIN(remaining, transmit_size); in transmit_prng()
127 __ASSERT(ret <= remaining, "Impossible number of bytes sent %u", (uint32_t)ret); in transmit_prng()
188 int32_t remaining = 8192; in ZTEST() local
193 while ((remaining != 0) || (received < 8192)) { in ZTEST()
194 ret = transmit_prng(remaining); in ZTEST()
196 remaining -= (uint32_t)ret; in ZTEST()
/Zephyr-latest/subsys/debug/coredump/
Dcoredump_backend_logging.c53 size_t remaining = buflen; in coredump_logging_backend_buffer_output() local
58 remaining = 0; in coredump_logging_backend_buffer_output()
61 while (remaining > 0) { in coredump_logging_backend_buffer_output()
75 remaining--; in coredump_logging_backend_buffer_output()
77 if ((log_ptr >= LOG_BUF_SZ) || (remaining == 0)) { in coredump_logging_backend_buffer_output()
Dcoredump_backend_flash_partition.c172 size_t remaining = len; in data_read() local
181 while (remaining > 0) { in data_read()
182 if (remaining < FLASH_BUF_SIZE) { in data_read()
183 copy_sz = remaining; in data_read()
205 remaining -= copy_sz; in data_read()
508 size_t remaining = buflen; in coredump_flash_backend_buffer_output() local
524 while (remaining > 0) { in coredump_flash_backend_buffer_output()
525 if (remaining < FLASH_BUF_SIZE) { in coredump_flash_backend_buffer_output()
526 copy_sz = remaining; in coredump_flash_backend_buffer_output()
544 remaining -= copy_sz; in coredump_flash_backend_buffer_output()
[all …]
/Zephyr-latest/drivers/flash/
Dflash_stm32wb0x.c234 uint32_t remaining = num_words; in write_word_range() local
258 while (remaining > 0 && (dst_addr % WORDS_IN_BURST) != 0) { in write_word_range()
269 remaining--; in write_word_range()
273 while (remaining >= WORDS_IN_BURST) { in write_word_range()
289 remaining -= WORDS_IN_BURST; in write_word_range()
293 if (remaining > 0) { in write_word_range()
294 __ASSERT_NO_MSG(remaining < WORDS_IN_BURST); in write_word_range()
300 FLASH->DATA1 = (remaining >= 2) in write_word_range()
304 FLASH->DATA2 = (remaining == 3) in write_word_range()
310 remaining = 0; in write_word_range()
/Zephyr-latest/drivers/disk/
Dflashdisk.c204 uint32_t remaining; in disk_flash_access_read() local
216 remaining = (sector_count * ctx->sector_size); in disk_flash_access_read()
226 while (remaining) { in disk_flash_access_read()
227 if (remaining < len) { in disk_flash_access_read()
228 len = remaining; in disk_flash_access_read()
239 remaining -= len; in disk_flash_access_read()
351 uint32_t remaining; in disk_flash_access_write() local
366 remaining = (sector_count * ctx->sector_size); in disk_flash_access_write()
378 if ((fl_addr + remaining) <= block_bnd) { in disk_flash_access_write()
380 if (flashdisk_cache_write(ctx, fl_addr, remaining, buff) < 0) { in disk_flash_access_write()
[all …]
/Zephyr-latest/samples/net/sockets/websocket_client/src/
Dmain.c168 uint64_t remaining = ULLONG_MAX; in recv_data_wso_api() local
176 while (remaining > 0) { in recv_data_wso_api()
180 &remaining, in recv_data_wso_api()
197 if (remaining != 0 || total_read != amount || in recv_data_wso_api()
201 proto, amount, total_read, remaining); in recv_data_wso_api()
212 int remaining; in recv_data_bsd_api() local
215 remaining = amount; in recv_data_bsd_api()
218 while (remaining > 0) { in recv_data_bsd_api()
232 remaining -= ret; in recv_data_bsd_api()
235 if (remaining != 0 || in recv_data_bsd_api()
[all …]
/Zephyr-latest/tests/net/ieee802154/6lo_fragment/src/
Dmain.c192 int remaining = data->len; in compare_data() local
196 if (net_pkt_get_len(pkt) != (NET_IPV6UDPH_LEN + remaining)) { in compare_data()
198 NET_IPV6UDPH_LEN + remaining, in compare_data()
213 while (remaining > 0 && frag) { in compare_data()
215 compare = remaining > bytes ? bytes : remaining; in compare_data()
223 remaining -= compare; in compare_data()
238 int remaining; in create_pkt() local
258 remaining = data->len; in create_pkt()
260 len = NET_UDPH_LEN + remaining; in create_pkt()
271 while (remaining > 0) { in create_pkt()
[all …]
/Zephyr-latest/tests/bluetooth/mesh/blob_io_flash/src/
Dmain.c54 size_t remaining = SLOT1_PARTITION_SIZE; in ZTEST() local
97 while (remaining > 0) { in ZTEST()
101 block.size = remaining > CONFIG_BT_MESH_BLOB_BLOCK_SIZE_MAX in ZTEST()
103 : remaining; in ZTEST()
132 remaining -= chunk.size; in ZTEST()
164 size_t remaining = SLOT1_PARTITION_SIZE; in ZTEST() local
194 while (remaining > 0) { in ZTEST()
198 block.size = remaining > CONFIG_BT_MESH_BLOB_BLOCK_SIZE_MAX in ZTEST()
200 : remaining; in ZTEST()
248 remaining -= chunk.size; in ZTEST()
/Zephyr-latest/subsys/net/lib/lwm2m/
Dlwm2m_rw_opaque.c60 if (opaque->remaining == 0) { in get_opaque()
82 opaque->remaining = in_len; in get_opaque()
84 opaque->remaining = opaque->len; in get_opaque()
89 opaque->remaining = in_len; in get_opaque()
/Zephyr-latest/tests/lib/c_lib/thrd/src/
Dthrd.c23 struct timespec remaining; in ZTEST() local
32 remaining = (struct timespec){.tv_sec = 4242, .tv_nsec = 4242}; in ZTEST()
36 zassert_ok(thrd_sleep(&duration, &remaining)); in ZTEST()
38 zassert_equal(remaining.tv_sec, 0); in ZTEST()
39 zassert_equal(remaining.tv_nsec, 0); in ZTEST()
/Zephyr-latest/lib/libc/common/source/thrd/
Dthrd.c45 int thrd_sleep(const struct timespec *duration, struct timespec *remaining) in thrd_sleep() argument
47 return nanosleep(duration, remaining); in thrd_sleep()
/Zephyr-latest/subsys/net/lib/shell/
Dnbr.c58 int64_t remaining; in nbr_cb() local
83 remaining = net_ipv6_nbr_data(nbr)->reachable + in nbr_cb()
97 (int)(remaining > 0 ? remaining : 0), in nbr_cb()
/Zephyr-latest/subsys/net/lib/mqtt/
Dmqtt_rx.c151 uint32_t remaining; in mqtt_read_message_chunk() local
162 remaining = length - (buf->end - buf->cur); in mqtt_read_message_chunk()
165 if ((buf->end + remaining > client->rx_buf + client->rx_buf_size) || in mqtt_read_message_chunk()
166 (buf->end + remaining < client->rx_buf)) { in mqtt_read_message_chunk()
172 len = mqtt_transport_read(client, buf->end, remaining, false); in mqtt_read_message_chunk()
188 if (len < remaining) { in mqtt_read_message_chunk()
/Zephyr-latest/subsys/debug/gdbstub/
Dgdbstub.c316 size_t remaining = len; in gdb_mem_read_aligned() local
343 while (remaining > 0) { in gdb_mem_read_aligned()
353 remaining -= read_sz; in gdb_mem_read_aligned()
354 if (remaining > align) { in gdb_mem_read_aligned()
357 read_sz = remaining; in gdb_mem_read_aligned()
458 size_t remaining = len; in gdb_mem_write_aligned() local
487 while (remaining > 0) { in gdb_mem_write_aligned()
503 remaining -= write_sz; in gdb_mem_write_aligned()
504 if (remaining > align) { in gdb_mem_write_aligned()
507 write_sz = remaining; in gdb_mem_write_aligned()
/Zephyr-latest/subsys/net/l2/ppp/
Doptions.c27 int remaining = length, pkt_remaining; in ppp_parse_options() local
33 if (remaining != pkt_remaining) { in ppp_parse_options()
35 remaining, pkt_remaining); in ppp_parse_options()
39 while (remaining > 0) { in ppp_parse_options()
50 "opt_len", ret, remaining); in ppp_parse_options()
70 remaining -= opt_len; in ppp_parse_options()
73 if (remaining < 0) { in ppp_parse_options()

1234567