Home
last modified time | relevance | path

Searched refs:cnt (Results 1 – 25 of 233) sorted by relevance

12345678910

/Zephyr-latest/tests/subsys/debug/mipi_stp_decoder/src/
Dmain.c9 static int cnt; variable
53 ADD_ITEM(cnt, STP_DECODER_NULL, UINT64_MAX, false, (uint8_t)0); in ZTEST()
54 ADD_ITEM(cnt, STP_DECODER_NULL, UINT64_MAX, false, (uint8_t)0); in ZTEST()
55 ADD_ITEM(cnt, STP_DECODER_NULL, UINT64_MAX, false, (uint8_t)0); in ZTEST()
56 ADD_ITEM(cnt, STP_DECODER_NULL, UINT64_MAX, false, (uint8_t)0); in ZTEST()
59 zassert_equal(cnt, d_cnt, NULL); in ZTEST()
67 ADD_ITEM(cnt, STP_DECODER_MAJOR, UINT64_MAX, false, (uint8_t)0xab); in ZTEST()
68 ADD_ITEM(cnt, STP_DECODER_NULL, UINT64_MAX, false, (uint8_t)0); in ZTEST()
69 ADD_ITEM(cnt, STP_DECODER_MAJOR, UINT64_MAX, false, (uint16_t)0x4321); in ZTEST()
72 zassert_equal(cnt, d_cnt, NULL); in ZTEST()
[all …]
/Zephyr-latest/subsys/debug/coresight/
Dcs_trace_defmt.c20 size_t cnt = 0; in cs_trace_defmt_process() local
34 if (cnt != 0) { in cs_trace_defmt_process()
40 callback(cb_id, buf, cnt); in cs_trace_defmt_process()
41 cnt = 0; in cs_trace_defmt_process()
46 buf[cnt++] = d_id | ((aux >> i) & 0x1); in cs_trace_defmt_process()
49 buf[cnt++] = data[2 * i + 1]; in cs_trace_defmt_process()
52 callback(cb_id, buf, cnt); in cs_trace_defmt_process()
53 cnt = 0; in cs_trace_defmt_process()
58 if (cnt) { in cs_trace_defmt_process()
59 callback(curr_id, buf, cnt); in cs_trace_defmt_process()
/Zephyr-latest/tests/subsys/logging/log_backend_init/src/
Dmain.c21 uint32_t cnt; member
52 zassert_equal(strcmp(str, context->exp_str[context->cnt]), 0, in backend_process()
53 "Unexpected string %s (exp:%s)", str, context->exp_str[context->cnt]); in backend_process()
55 context->cnt++; in backend_process()
115 int cnt; in ZTEST() local
117 STRUCT_SECTION_COUNT(log_backend, &cnt); in ZTEST()
118 if (cnt != 2) { in ZTEST()
123 context1.cnt = 0; in ZTEST()
124 context2.cnt = 0; in ZTEST()
149 zassert_equal(context1.cnt, 2, "Unexpected value:%d (exp: %d)", context1.cnt, 2); in ZTEST()
[all …]
/Zephyr-latest/tests/lib/ringbuffer/src/
Dconcurrent.c102 static int cnt; in produce_cpy() local
107 cnt = 0; in produce_cpy()
111 buf[i] = (uint8_t)cnt++; in produce_cpy()
115 cnt -= (sizeof(buf) - len); in produce_cpy()
122 static int cnt; in consume_cpy() local
127 cnt = 0; in consume_cpy()
132 zassert_equal(buf[i], (uint8_t)cnt); in consume_cpy()
133 cnt++; in consume_cpy()
139 static bool produce_item(void *user_data, uint32_t cnt, bool last, int prio) in produce_item() argument
145 if (cnt == 0) { in produce_item()
[all …]
/Zephyr-latest/subsys/fs/fcb/
Dfcb_append.c15 fcb_new_sector(struct fcb *fcb, int cnt) in fcb_new_sector() argument
32 } while (i++ < cnt); in fcb_new_sector()
64 int cnt; in fcb_append() local
71 cnt = fcb_put_len(fcb, tmp_str, len); in fcb_append()
72 if (cnt < 0) { in fcb_append()
73 return cnt; in fcb_append()
75 cnt = fcb_len_in_flash(fcb, cnt); in fcb_append()
78 __ASSERT_NO_MSG(cnt <= sizeof(tmp_str)); in fcb_append()
85 if (active->fe_elem_off + len + cnt > active->fe_sector->fs_size) { in fcb_append()
88 fcb_len_in_flash(fcb, sizeof(struct fcb_disk_area)) + len + cnt)) { in fcb_append()
[all …]
Dfcb_elem_info.c23 int cnt; in fcb_elem_crc8() local
40 cnt = fcb_get_len(_fcb, tmp_str, &len); in fcb_elem_crc8()
41 if (cnt < 0) { in fcb_elem_crc8()
42 return cnt; in fcb_elem_crc8()
44 loc->fe_data_off = loc->fe_elem_off + fcb_len_in_flash(_fcb, cnt); in fcb_elem_crc8()
48 crc8 = crc8_ccitt(crc8, tmp_str, cnt); in fcb_elem_crc8()
77 int cnt; in fcb_elem_endmarker_fixed() local
90 cnt = fcb_get_len(_fcb, tmp_str, &len); in fcb_elem_endmarker_fixed()
91 if (cnt < 0) { in fcb_elem_endmarker_fixed()
92 return cnt; in fcb_elem_endmarker_fixed()
[all …]
/Zephyr-latest/drivers/entropy/
Dentropy_cc13xx_cc26xx.c98 uint32_t cnt; in entropy_cc13xx_cc26xx_get_entropy() local
114 cnt = ring_buf_get(&data->pool, buf, len); in entropy_cc13xx_cc26xx_get_entropy()
117 if (cnt) { in entropy_cc13xx_cc26xx_get_entropy()
118 buf += cnt; in entropy_cc13xx_cc26xx_get_entropy()
119 len -= cnt; in entropy_cc13xx_cc26xx_get_entropy()
132 uint32_t cnt; in entropy_cc13xx_cc26xx_isr() local
143 cnt = ring_buf_put(&data->pool, (uint8_t *)num, sizeof(num)); in entropy_cc13xx_cc26xx_isr()
146 if (cnt != sizeof(num)) { in entropy_cc13xx_cc26xx_isr()
174 uint16_t cnt; in entropy_cc13xx_cc26xx_get_entropy_isr() local
181 cnt = ring_buf_get(&data->pool, buf, len); in entropy_cc13xx_cc26xx_get_entropy_isr()
[all …]
/Zephyr-latest/tests/boards/mec172xevb_assy6906/qspi/src/
Dmain.c351 uint8_t cnt = 0; in ZTEST_USER() local
366 spi_bufs[cnt].buf = &safbuf; in ZTEST_USER()
367 spi_bufs[cnt].len = 4U; in ZTEST_USER()
371 cnt++; in ZTEST_USER()
372 spi_bufs[cnt].buf = NULL; in ZTEST_USER()
373 spi_bufs[cnt].len = spi_clocks_to_bytes(((spi_opcode >> 8) & 0xffU), 1u); in ZTEST_USER()
376 cnt++; in ZTEST_USER()
377 spi_bufs[cnt].buf = &safbuf2; in ZTEST_USER()
378 spi_bufs[cnt].len = BUF_SIZE; in ZTEST_USER()
379 cnt++; /* total number of buffers */ in ZTEST_USER()
[all …]
/Zephyr-latest/samples/basic/threads/src/
Dmain.c34 uint32_t cnt; member
57 int cnt = 0; in blink() local
73 gpio_pin_set(spec->port, spec->pin, cnt % 2); in blink()
75 struct printk_data_t tx_data = { .led = id, .cnt = cnt }; in blink()
86 cnt++; in blink()
106 rx_data->led, rx_data->cnt); in uart_out()
/Zephyr-latest/subsys/bluetooth/audio/shell/
Dbap_usb.c90 static size_t cnt; in usb_data_request_cb() local
92 if ((++cnt % bap_get_stats_interval()) == 0U) { in usb_data_request_cb()
93 LOG_INF("[%zu]: Sending USB audio", cnt); in usb_data_request_cb()
96 static size_t cnt; in usb_data_request_cb() local
98 if ((++cnt % bap_get_stats_interval()) == 0U) { in usb_data_request_cb()
99 LOG_INF("[%zu]: Sending empty USB audio", cnt); in usb_data_request_cb()
105 static size_t cnt; in usb_data_request_cb() local
107 cnt++; in usb_data_request_cb()
108 if ((cnt % 1000) == 0) { in usb_data_request_cb()
109 LOG_ERR("Failed to send USB audio: %d (%zu)", err, cnt); in usb_data_request_cb()
[all …]
/Zephyr-latest/tests/drivers/sensor/temp_sensor/src/
Dmain.c19 int cnt; in ZTEST() local
22 cnt = 0; in ZTEST()
40 ++cnt; in ZTEST()
41 if (cnt >= 5) { in ZTEST()
119 int cnt; in before() local
125 cnt = 0; in before()
136 ++cnt; in before()
137 zassert_false(cnt >= 3, "Cannot fetch a sample: %d.", rc); in before()
/Zephyr-latest/samples/drivers/misc/ft800/src/
Dmain.c33 int cnt; in main() local
45 cnt = 0; in main()
57 ft8xx_copro_cmd_number(20, 20, 29, FT8XX_OPT_SIGNED, cnt); in main()
58 cnt++; in main()
/Zephyr-latest/tests/drivers/uart/uart_mix_fifo_poll/src/
Dmain.c39 int cnt; member
58 volatile int cnt; member
88 src->cnt++; in process_byte()
90 if (src->cnt == 1) { in process_byte()
181 const uint8_t *buf = &int_async_data.buf[int_async_data.cnt & 0xF]; in tx_isr()
184 int_async_data.cnt += len; in tx_isr()
227 data->cnt++; in bulk_poll_out()
258 while (data->cnt < data->max) { in int_async_thread_func()
265 int idx = data->cnt & 0xF; in int_async_thread_func()
267 len = MIN(len, data->max - data->cnt); in int_async_thread_func()
[all …]
/Zephyr-latest/include/zephyr/shell/
Dshell_backend.h41 int cnt; in shell_backend_count_get() local
43 STRUCT_SECTION_COUNT(shell, &cnt); in shell_backend_count_get()
45 return cnt; in shell_backend_count_get()
/Zephyr-latest/subsys/logging/backends/
Dlog_backend_efi_console.c27 size_t cnt = 0; in char_out() local
30 while (cnt < length) { in char_out()
32 cnt++; in char_out()
73 static void dropped(const struct log_backend *const backend, uint32_t cnt) in dropped() argument
77 log_backend_std_dropped(&log_output_efi, cnt); in dropped()
/Zephyr-latest/drivers/console/
Drtt_console.c39 unsigned int cnt; in rtt_console_out() local
43 cnt = SEGGER_RTT_Write(0, &c, 1); in rtt_console_out()
59 if (cnt) { in rtt_console_out()
/Zephyr-latest/tests/subsys/logging/log_stress/src/
Dmain.c26 uint32_t cnt[16]; member
40 mock_backend.cnt[ctx_id]++; in handle_msg()
72 static void dropped(const struct log_backend *const backend, uint32_t cnt) in dropped() argument
75 mock_backend.dropped += cnt; in dropped()
97 out_cnt += mock_backend.cnt[i]; in validate()
108 static bool context_handler(void *user_data, uint32_t cnt, bool last, int prio) in context_handler() argument
113 if (cnt == 0) { in context_handler()
117 uint32_t i = cnt | (prio << CNT_BITS); in context_handler()
/Zephyr-latest/tests/kernel/mem_protect/mem_map/src/
Dmain.c423 size_t cnt, expected_cnt; in ZTEST() local
450 cnt = POINTER_TO_UINT(addr) + CONFIG_MMU_PAGE_SIZE * 2; in ZTEST()
451 cnt -= POINTER_TO_UINT(K_MEM_VM_FREE_START); in ZTEST()
452 cnt /= CONFIG_MMU_PAGE_SIZE * 3; in ZTEST()
455 if (cnt < expected_cnt) { in ZTEST()
456 expected_cnt = cnt; in ZTEST()
461 cnt = 0; in ZTEST()
468 cnt++; in ZTEST()
472 printk("Mapped %zu pages\n", cnt); in ZTEST()
473 zassert_equal(cnt, expected_cnt, in ZTEST()
[all …]
/Zephyr-latest/tests/drivers/counter/counter_basic_api/src/
Dtest_counter.c258 uint32_t cnt; in test_set_top_value_with_alarm_instance() local
278 err = counter_get_value(dev, &cnt); in test_set_top_value_with_alarm_instance()
282 err = (cnt > 0) ? 0 : 1; in test_set_top_value_with_alarm_instance()
285 err = (cnt < top_value) ? 0 : 1; in test_set_top_value_with_alarm_instance()
311 uint32_t cnt; in test_set_top_value_without_alarm_instance() local
327 err = counter_get_value(dev, &cnt); in test_set_top_value_without_alarm_instance()
331 err = (cnt > 0) ? 0 : 1; in test_set_top_value_without_alarm_instance()
334 err = (cnt < top_value) ? 0 : 1; in test_set_top_value_without_alarm_instance()
403 uint32_t cnt; in test_single_shot_alarm_instance() local
451 cnt = IS_ENABLED(CONFIG_ZERO_LATENCY_IRQS) ? in test_single_shot_alarm_instance()
[all …]
/Zephyr-latest/subsys/storage/flash_map/
Dflash_map_layout.c79 int flash_area_get_sectors(int idx, uint32_t *cnt, struct flash_sector *ret) in flash_area_get_sectors() argument
88 rc = flash_area_sectors(fa, cnt, ret); in flash_area_get_sectors()
94 int flash_area_sectors(const struct flash_area *fa, uint32_t *cnt, struct flash_sector *ret) in flash_area_sectors() argument
104 data.ret_len = *cnt; in flash_area_sectors()
112 *cnt = data.ret_idx; in flash_area_sectors()
/Zephyr-latest/subsys/shell/backends/
Dshell_uart.c360 const void *data, size_t length, size_t *cnt) in polling_write() argument
368 *cnt = length; in polling_write()
376 const void *data, size_t length, size_t *cnt) in irq_write() argument
378 *cnt = ring_buf_put(&sh_uart->tx_ringbuf, data, length); in irq_write()
388 const void *data, size_t length, size_t *cnt) in async_write() argument
394 *cnt = 0; in async_write()
399 *cnt = length; in async_write()
407 const void *data, size_t length, size_t *cnt) in write_uart() argument
412 return polling_write(sh_uart, data, length, cnt); in write_uart()
414 return irq_write((struct shell_uart_int_driven *)transport->ctx, data, length, cnt); in write_uart()
[all …]
/Zephyr-latest/lib/crc/
Dcrc8_sw.c21 uint8_t crc8_ccitt(uint8_t val, const void *buf, size_t cnt) in crc8_ccitt() argument
26 for (i = 0; i < cnt; i++) { in crc8_ccitt()
34 uint8_t crc8_rohc(uint8_t val, const void *buf, size_t cnt) in crc8_rohc() argument
39 for (i = 0; i < cnt; i++) { in crc8_rohc()
/Zephyr-latest/samples/subsys/logging/multidomain/remote/src/
Dmain.c14 int cnt = 0; in main() local
17 LOG_INF("loop: %d", cnt++); in main()
/Zephyr-latest/samples/subsys/mgmt/osdp/peripheral_device/src/
Dmain.c33 uint32_t cnt = 0; in main() local
51 if ((cnt & 0x7f) == 0x7f) { in main()
57 cnt++; in main()
/Zephyr-latest/samples/drivers/misc/grove_display/src/
Dmain.c43 int cnt; in main() local
68 cnt = 0; in main()
95 m = cnt; in main()
105 cnt++; in main()

12345678910