Home
last modified time | relevance | path

Searched refs:i (Results 1 – 25 of 2365) sorted by relevance

12345678910>>...95

/Zephyr-Core-3.6.0/tests/boards/intel_adsp/mm/src/
Dmain.c42 for (int i = 0; i < N_PAGES; i++) { local
44 pa[i] = POINTER_TO_UINT(&page_buf[i]);
56 for (int i = 0; i < N_PAGES; i++) { local
57 vps[i].mem[0] = markers[i];
63 sys_cache_data_flush_range(&vps[i].mem[0], PAGE_SZ);
71 sys_cache_data_invd_range(UINT_TO_POINTER(pa[i]), PAGE_SZ);
75 for (int i = 0; i < N_PAGES; i++) { local
76 zassert_equal(vps[i].mem[0], *(uint32_t *)pa[i],
78 vps[i].mem[0], *(uint32_t *)pa[i]);
94 for (int i = 0; i < N_PAGES; i++) { local
[all …]
/Zephyr-Core-3.6.0/samples/drivers/memc/src/
Dmain.c20 uint32_t i, j; in dump_memory() local
22 for (i = 0, j = 0; j < (size / 16); i += 16, j++) { in dump_memory()
24 p[i], p[i+1], p[i+2], p[i+3], in dump_memory()
25 p[i+4], p[i+5], p[i+6], p[i+7]); in dump_memory()
27 p[i+8], p[i+9], p[i+10], p[i+11], in dump_memory()
28 p[i+12], p[i+13], p[i+14], p[i+15]); in dump_memory()
30 if (((i + 16) & 0xFF) == 0) { in dump_memory()
35 for (; i < size; i++) { in dump_memory()
36 printk("%02x ", p[i]); in dump_memory()
49 uint32_t i, j; in main() local
[all …]
/Zephyr-Core-3.6.0/tests/bluetooth/controller/ctrl_tx_queue/src/
Dmain.c58 for (int i = 0U; i < SIZE; i++) { in ZTEST() local
59 ull_tx_q_enqueue_ctrl(&tx_q, &ctrl_nodes1[i]); in ZTEST()
63 for (int i = 0U; i < SIZE; i++) { in ZTEST() local
65 zassert_equal_ptr(node, &ctrl_nodes1[i], NULL); in ZTEST()
87 for (int i = 0U; i < SIZE; i++) { in ZTEST() local
88 ull_tx_q_enqueue_data(&tx_q, &nodes[i]); in ZTEST()
92 for (int i = 0U; i < SIZE; i++) { in ZTEST() local
94 zassert_equal_ptr(node, &nodes[i], NULL); in ZTEST()
117 for (int i = 0U; i < SIZE; i++) { in ZTEST() local
118 ull_tx_q_enqueue_ctrl(&tx_q, &ctrl_nodes1[i]); in ZTEST()
[all …]
/Zephyr-Core-3.6.0/tests/posix/pthread_pressure/src/
Dmain.c26 typedef int (*create_fn)(int i);
27 typedef int (*join_fn)(int i);
45 for (int i = 0; i < NUM_THREADS; ++i) { in print_stats() local
46 printk("Thread %d created and joined %llu times (%llu joins/s)\n", i, counters[i], in print_stats()
47 (counters[i] - prev_counters[i]) / UPDATE_INTERVAL_S); in print_stats()
48 prev_counters[i] = counters[i]; in print_stats()
54 int i; in test_create_join_common() local
67 for (i = 0; i < NUM_THREADS; ++i) { in test_create_join_common()
69 prev_counters[i] = 0; in test_create_join_common()
70 ret = create(i); in test_create_join_common()
[all …]
/Zephyr-Core-3.6.0/tests/lib/cmsis_dsp/common/
Dmath_helper.h80 uint32_t i; in arm_snr_f64() local
83 for (i = 0; i < buffSize; i++) { in arm_snr_f64()
85 IFNANRETURNZERO(pRef[i]); in arm_snr_f64()
88 IFNANRETURNZERO(pTest[i]); in arm_snr_f64()
90 EnergySignal += pRef[i] * pRef[i]; in arm_snr_f64()
91 EnergyError += (pRef[i] - pTest[i]) * (pRef[i] - pTest[i]); in arm_snr_f64()
110 uint32_t i; in arm_snr_f32() local
113 for (i = 0; i < buffSize; i++) { in arm_snr_f32()
115 IFNANRETURNZERO(pRef[i]); in arm_snr_f32()
118 IFNANRETURNZERO(pTest[i]); in arm_snr_f32()
[all …]
/Zephyr-Core-3.6.0/tests/kernel/sched/deadline/src/
Dmain.c53 int i; in ZTEST() local
61 for (i = 0; i < NUM_THREADS; i++) { in ZTEST()
62 worker_tids[i] = k_thread_create(&worker_threads[i], in ZTEST()
63 worker_stacks[i], STACK_SIZE, in ZTEST()
64 worker, INT_TO_POINTER(i), NULL, NULL, in ZTEST()
83 thread_deadlines[i] = sys_rand32_get() & 0x3fffff00; in ZTEST()
91 for (i = 0; i < NUM_THREADS; i++) { in ZTEST()
92 k_thread_deadline_set(&worker_threads[i], thread_deadlines[i]); in ZTEST()
101 for (i = 1; i < NUM_THREADS; i++) { in ZTEST()
102 int d0 = thread_deadlines[exec_order[i-1]]; in ZTEST()
[all …]
/Zephyr-Core-3.6.0/tests/kernel/queue/src/
Dtest_queue_user.c40 for (int i = 0; i < (LIST_LEN * 2); i++) { in child_thread_get() local
43 zassert_equal(qd->data, i); in child_thread_get()
94 for (int i = 0; i < (LIST_LEN * 2); i = i + 2) { in ZTEST() local
99 qdata[i].data = i; in ZTEST()
100 qdata[i].allocated = false; in ZTEST()
101 qdata[i].snode.next = NULL; in ZTEST()
102 k_queue_append(q, &qdata[i]); in ZTEST()
104 qdata[i + 1].data = i + 1; in ZTEST()
105 qdata[i + 1].allocated = true; in ZTEST()
106 qdata[i + 1].snode.next = NULL; in ZTEST()
[all …]
Dtest_queue_loop.c24 for (int i = 0; i < LIST_LEN; i++) { in tqueue_append() local
25 k_queue_append(pqueue, (void *)&data[i]); in tqueue_append()
29 for (int i = LIST_LEN - 1; i >= 0; i--) { in tqueue_append() local
30 k_queue_prepend(pqueue, (void *)&data_p[i]); in tqueue_append()
34 for (int i = LIST_LEN - 1; i >= 0; i--) { in tqueue_append() local
35 k_queue_prepend(pqueue, (void *)&data_r[i]); in tqueue_append()
44 for (int i = 0; i < LIST_LEN; i++) { in tqueue_get() local
47 zassert_equal(rx_data, (void *)&data_p[i]); in tqueue_get()
51 for (int i = 0; i < LIST_LEN; i++) { in tqueue_get() local
54 zassert_equal(rx_data, (void *)&data[i]); in tqueue_get()
[all …]
/Zephyr-Core-3.6.0/samples/drivers/led_pca9633/src/
Dmain.c28 int i, ret; in main() local
44 for (i = 0; i < NUM_LEDS; i++) { in main()
45 ret = led_on(led_dev, i); in main()
54 for (i = 0; i < NUM_LEDS; i++) { in main()
55 ret = led_off(led_dev, i); in main()
64 for (i = 0; i < NUM_LEDS; i++) { in main()
65 ret = led_set_brightness(led_dev, i, HALF_BRIGHTNESS); in main()
74 for (i = 0; i < NUM_LEDS; i++) { in main()
75 ret = led_off(led_dev, i); in main()
84 for (i = 0; i < NUM_LEDS; i++) { in main()
[all …]
/Zephyr-Core-3.6.0/tests/kernel/threads/dynamic_thread_stack/src/
Dmain.c50 for (size_t i = 0; i < CONFIG_DYNAMIC_THREAD_POOL_SIZE; ++i) { in ZTEST() local
51 stack[i] = k_thread_stack_alloc(CONFIG_DYNAMIC_THREAD_STACK_SIZE, in ZTEST()
54 zassert_not_null(stack[i]); in ZTEST()
69 for (size_t i = 0; i < CONFIG_DYNAMIC_THREAD_POOL_SIZE; ++i) { in ZTEST() local
70 tflag[i] = false; in ZTEST()
71 tid[i] = k_thread_create(&th[i], stack[i], in ZTEST()
73 &tflag[i], NULL, NULL, 0, in ZTEST()
78 for (size_t i = 0; i < CONFIG_DYNAMIC_THREAD_POOL_SIZE; ++i) { in ZTEST() local
79 zassert_ok(k_thread_join(tid[i], K_MSEC(TIMEOUT_MS))); in ZTEST()
80 zassert_true(tflag[i]); in ZTEST()
[all …]
/Zephyr-Core-3.6.0/subsys/usb/device/class/audio/
Dusb_audio_internal.h80 #define IF_USB_AUDIO_PROP_HP(i, prop, bitmask) \ argument
81 COND_CODE_1(DT_PROP(DT_INST(i, COMPAT_HP), prop), (bitmask), (0))
82 #define IF_USB_AUDIO_PROP_MIC(i, prop, bitmask) \ argument
83 COND_CODE_1(DT_PROP(DT_INST(i, COMPAT_MIC), prop), (bitmask), (0))
84 #define IF_USB_AUDIO_PROP_HS_HP(i, prop, bitmask) \ argument
85 COND_CODE_1(DT_PROP(DT_INST(i, COMPAT_HS), hp_##prop), (bitmask), (0))
86 #define IF_USB_AUDIO_PROP_HS_MIC(i, prop, bitmask) \ argument
87 COND_CODE_1(DT_PROP(DT_INST(i, COMPAT_HS), mic_##prop), (bitmask), (0))
88 #define IF_USB_AUDIO_PROP(dev, i, prop, bitmask) \ argument
89 IF_USB_AUDIO_PROP_##dev(i, prop, bitmask)
[all …]
/Zephyr-Core-3.6.0/tests/subsys/portability/cmsis_rtos_v1/src/
Dmempool.c28 int i; in ZTEST() local
37 for (i = 0; i < MAX_BLOCKS; i++) { in ZTEST()
38 addr_list[i] = (struct mem_block *)osPoolAlloc(mempool_id); in ZTEST()
39 zassert_true(addr_list[i] != NULL, "mempool allocation failed"); in ZTEST()
45 addr_list[i] = (struct mem_block *)osPoolAlloc(mempool_id); in ZTEST()
46 zassert_true(addr_list[i] == NULL, "allocation happened." in ZTEST()
49 for (i = 0; i < MAX_BLOCKS; i++) { in ZTEST()
50 status_list[i] = osPoolFree(mempool_id, addr_list[i]); in ZTEST()
51 zassert_true(status_list[i] == osOK, "mempool free failed"); in ZTEST()
54 for (i = 0; i < MAX_BLOCKS; i++) { in ZTEST()
[all …]
/Zephyr-Core-3.6.0/tests/lib/multi_heap/src/
Dtest_mheap_concept.c42 for (int i = 0; i < BLK_NUM_MAX; i++) { in ZTEST() local
43 block[i] = k_malloc(i); in ZTEST()
44 zassert_not_null(block[i], NULL); in ZTEST()
45 zassert_false((uintptr_t)block[i] % sizeof(void *)); in ZTEST()
49 for (int i = 0; i < BLK_NUM_MAX; i++) { in ZTEST() local
50 k_free(block[i]); in ZTEST()
86 for (int i = 0; i < THREAD_NUM; i++) { in ZTEST() local
87 tid[i] = k_thread_create(&tdata[i], tstack[i], STACK_SIZE, in ZTEST()
88 tmheap_handler, INT_TO_POINTER(i), NULL, NULL, in ZTEST()
92 for (int i = 0; i < THREAD_NUM; i++) { in ZTEST() local
[all …]
/Zephyr-Core-3.6.0/tests/kernel/smp_suspend/src/
Dmain.c44 for (volatile unsigned int i = 0; in thread_entry() local
45 i < CONFIG_SMP_TEST_RELAX; in thread_entry()
46 i++) { in thread_entry()
57 unsigned int i; in ZTEST() local
64 for (i = 0; i < NUM_THREADS; i++) { in ZTEST()
66 k_thread_create(&thread[i], thread_stack[i], in ZTEST()
68 i < (NUM_THREADS - 1) ? &thread[i + 1] : NULL, in ZTEST()
69 (void *)(uintptr_t)i, NULL, in ZTEST()
70 10 - i, 0, K_FOREVER); in ZTEST()
72 k_thread_suspend(&thread[i]); in ZTEST()
[all …]
/Zephyr-Core-3.6.0/tests/drivers/rtc/rtc_api/src/
Dtest_alarm.c37 for (uint16_t i = 0; i < alarms_count; i++) { in ZTEST() local
38 ret = rtc_alarm_set_time(rtc, i, 0, NULL); in ZTEST()
44 for (uint16_t i = 0; i < alarms_count; i++) { in ZTEST() local
45 ret = rtc_alarm_set_callback(rtc, i, NULL, NULL); in ZTEST()
52 for (uint16_t i = 0; i < alarms_count; i++) { in ZTEST() local
53 ret = rtc_alarm_get_supported_fields(rtc, i, &alarm_time_mask_supported); in ZTEST()
69 for (uint16_t i = 0; i < alarms_count; i++) { in ZTEST() local
70 ret = rtc_alarm_set_time(rtc, i, alarm_time_mask_set, &alarm_time_set); in ZTEST()
76 for (uint16_t i = 0; i < alarms_count; i++) { in ZTEST() local
77 ret = rtc_alarm_get_time(rtc, i, &alarm_time_mask_get, &alarm_time_get); in ZTEST()
[all …]
/Zephyr-Core-3.6.0/tests/posix/common/src/
Dkey.c42 for (int i = 0; i < N_KEY; i++) { in thread_func() local
43 zassert_ok(pthread_setspecific(keys[i], value), "pthread_setspecific failed"); in thread_func()
44 zassert_equal(pthread_getspecific(keys[i]), value, in thread_func()
58 for (int i = 0; i < N_KEY; i++) { in make_keys() local
59 zassert_ok(pthread_key_create(&keys[i], NULL), in make_keys()
86 for (int i = 0; i < N_THR; i++) { in ZTEST() local
87 zassert_ok(pthread_create(&newthread[i], NULL, thread_top, NULL), in ZTEST()
88 "attempt to create thread %d failed", i); in ZTEST()
91 for (int i = 0; i < N_THR; i++) { in ZTEST() local
92 zassert_ok(pthread_join(newthread[i], &retval), "failed to join thread %d", i); in ZTEST()
[all …]
/Zephyr-Core-3.6.0/tests/kernel/sched/schedule_api/src/
Dtest_sched_timeslice_and_lock.c39 for (int i = 0; i < THREADS_NUM; i++) { in setup_threads() local
40 if (i == 0) { in setup_threads()
42 tdata[i].priority = init_prio - 1; in setup_threads()
43 } else if (i == 1) { in setup_threads()
45 tdata[i].priority = init_prio; in setup_threads()
48 tdata[i].priority = init_prio + 1; in setup_threads()
50 tdata[i].executed = 0; in setup_threads()
57 for (int i = 0; i < THREADS_NUM; i++) { in spawn_threads() local
58 tdata[i].tid = k_thread_create(&tthread[i], tstacks[i], in spawn_threads()
60 INT_TO_POINTER(i), in spawn_threads()
[all …]
/Zephyr-Core-3.6.0/samples/drivers/ht16k33/src/
Dmain.c30 int i; in main() local
50 for (i = 0; i < 128; i++) { in main()
51 led_on(led, i); in main()
55 for (i = 500; i <= 2000; i *= 2) { in main()
56 LOG_INF("Blinking LEDs with a period of %d ms", i); in main()
57 led_blink(led, 0, i / 2, i / 2); in main()
58 k_msleep(10 * i); in main()
62 for (i = 100; i >= 0; i -= 10) { in main()
63 LOG_INF("Setting LED brightness to %d%%", i); in main()
64 led_set_brightness(led, 0, i); in main()
[all …]
/Zephyr-Core-3.6.0/drivers/sensor/bmi08x/
Dbmi08x.c30 size_t i; in bmi08x_freq_to_odr_val() local
37 for (i = 0; i < ARRAY_SIZE(bmi08x_odr_map); i++) { in bmi08x_freq_to_odr_val()
38 if (freq_int < bmi08x_odr_map[i].freq_int || in bmi08x_freq_to_odr_val()
39 (freq_int == bmi08x_odr_map[i].freq_int && in bmi08x_freq_to_odr_val()
40 freq_milli <= bmi08x_odr_map[i].freq_milli)) { in bmi08x_freq_to_odr_val()
41 return i; in bmi08x_freq_to_odr_val()
51 int i; in bmi08x_range_to_reg_val() local
53 for (i = 0; i < range_map_size; i++) { in bmi08x_range_to_reg_val()
54 if (range <= range_map[i].range) { in bmi08x_range_to_reg_val()
55 return range_map[i].reg_val; in bmi08x_range_to_reg_val()
[all …]
/Zephyr-Core-3.6.0/tests/boards/nrf52_bsim/egu/src/
Dmain.c36 for (int i = 0; i < NRF_NEGUs; i++) { in ZTEST() local
37 zassert_equal(16, nrf_egu_channel_count(EGU[i]), in ZTEST()
38 "NRF_EGU%d incorrect number of channels", i); in ZTEST()
53 for (int i = 0; i < NRF_NEGUs; i++) { in ZTEST() local
55 zassert_equal((size_t)&EGU[i]->TASKS_TRIGGER[j], in ZTEST()
56 nrf_egu_task_address_get(EGU[i], egu_tasks[j]), in ZTEST()
57 "NRF_EGU_%i incorrect address of task trigger %i", i, j); in ZTEST()
75 for (int i = 0; i < NRF_NEGUs; i++) { in ZTEST() local
77 zassert_equal((size_t)&EGU[i]->EVENTS_TRIGGERED[j], in ZTEST()
78 nrf_egu_event_address_get(EGU[i], egu_events[j]), in ZTEST()
[all …]
/Zephyr-Core-3.6.0/tests/application_development/gen_inc_file/src/
Dmain.c99 int i; in ZTEST() local
103 for (i = 0; i < sizeof(inc_file); i++) { in ZTEST()
104 zassert_equal(inc_file[i], i, "Invalid value in inc file"); in ZTEST()
110 int i; in ZTEST() local
114 for (i = 0; i < sizeof(partial_inc_file); i++) { in ZTEST()
115 zassert_equal(partial_inc_file[i], i + 100, "Invalid value in partial inc file"); in ZTEST()
123 int i; in do_test_gen_gz_inc_file() local
125 for (i = 0; i < ref_size; i++) { in do_test_gen_gz_inc_file()
126 if (4 <= i && i < 8) { in do_test_gen_gz_inc_file()
131 zassert_equal(gz_inc_file[i], mtime[i-4], in do_test_gen_gz_inc_file()
[all …]
/Zephyr-Core-3.6.0/tests/kernel/fifo/fifo_usage/src/
Dmain.c61 uint32_t i; in tIsr_entry_put() local
64 for (i = 0U; i < LIST_LEN; i++) { in tIsr_entry_put()
65 k_fifo_put((struct k_fifo *)p, (void *)&data_isr[i]); in tIsr_entry_put()
73 uint32_t i; in tIsr_entry_get() local
76 for (i = 0U; i < LIST_LEN; i++) { in tIsr_entry_get()
78 zassert_equal(rx_data, (void *)&data_isr[i]); in tIsr_entry_get()
86 uint32_t i; in thread_entry_fn_single() local
89 for (i = 0U; i < LIST_LEN; i++) { in thread_entry_fn_single()
91 zassert_equal(rx_data, (void *)&data1[i]); in thread_entry_fn_single()
95 for (i = 0U; i < LIST_LEN; i++) { in thread_entry_fn_single()
[all …]
/Zephyr-Core-3.6.0/arch/nios2/core/
Dcache.c27 uint32_t i; in z_nios2_icache_flush_all() local
29 for (i = 0U; i < ALT_CPU_ICACHE_SIZE; i += ALT_CPU_ICACHE_LINE_SIZE) { in z_nios2_icache_flush_all()
30 z_nios2_icache_flush(i); in z_nios2_icache_flush_all()
56 uint32_t i; in z_nios2_dcache_flush_all() local
58 for (i = 0U; i < ALT_CPU_DCACHE_SIZE; i += ALT_CPU_DCACHE_LINE_SIZE) { in z_nios2_dcache_flush_all()
59 z_nios2_dcache_flush(i); in z_nios2_dcache_flush_all()
75 uint8_t *i; in z_nios2_dcache_flush_no_writeback() local
78 for (i = start; i < end; i += ALT_CPU_DCACHE_LINE_SIZE) { in z_nios2_dcache_flush_no_writeback()
79 __asm__ volatile ("initda (%0)" :: "r" (i)); in z_nios2_dcache_flush_no_writeback()
89 __asm__ volatile ("initda (%0)" :: "r" (i)); in z_nios2_dcache_flush_no_writeback()
/Zephyr-Core-3.6.0/tests/drivers/gpio/gpio_api_1pin/src/
Dtest_port.c134 for (int i = 0; i < 5; i++) { in ZTEST() local
141 port_get_raw_and_verify(port, BIT(TEST_PIN), val_expected, i); in ZTEST()
179 for (int i = 0; i < ARRAY_SIZE(test_vector); i++) { in ZTEST() local
180 port_set_masked_raw_and_verify(port, BIT(TEST_PIN), test_vector[i], i); in ZTEST()
181 port_get_raw_and_verify(port, BIT(TEST_PIN), test_vector[i], i); in ZTEST()
219 for (int i = 0; i < ARRAY_SIZE(test_vector); i++) { in ZTEST() local
220 port_set_masked_and_verify(port, BIT(TEST_PIN), test_vector[i], i); in ZTEST()
221 port_get_and_verify(port, BIT(TEST_PIN), test_vector[i], i); in ZTEST()
262 for (int i = 0; i < ARRAY_SIZE(test_vector); i++) { in ZTEST() local
263 port_set_masked_and_verify(port, BIT(TEST_PIN), test_vector[i], i); in ZTEST()
[all …]
/Zephyr-Core-3.6.0/tests/kernel/interrupt/src/
Dsw_isr_table.c13 #define PARENT_IRQ_FN(i, _) CONFIG_2ND_LVL_INTR_0##i##_OFFSET argument
15 #define PARENT_DEV_FN(i, _) DEVICE_DT_GET(DT_INST(i, sifive_plic_1_0_0)) argument
18 #define PARENT_DEV_FN(i, _) (NULL) argument
35 for (size_t i = 0; i < CONFIG_NUM_2ND_LEVEL_AGGREGATORS; i++) { in ZTEST() local
38 unsigned int test_irq = irq_to_level_2(local_irq) | parent_irq[i]; in ZTEST()
41 l2_isr_offset + local_irq + (i * CONFIG_MAX_IRQ_PER_AGGREGATOR); in ZTEST()
44 "%d: expected offset: %d, got: %d", i, in ZTEST()
71 for (size_t i = 0; i < CONFIG_NUM_2ND_LEVEL_AGGREGATORS; i++) { in ZTEST() local
75 zassert_not_null(parent_dev[i]); in ZTEST()
79 test_irq = irq_to_level_2(local_irq) | parent_irq[i]; in ZTEST()
[all …]

12345678910>>...95