Home
last modified time | relevance | path

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

12345678910>>...96

/Zephyr-Core-3.7.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.7.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.7.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.7.0/samples/drivers/memc/src/
Dmain.c33 uint32_t i, j; in dump_memory() local
35 for (i = 0, j = 0; j < (size / 16); i += 16, j++) { in dump_memory()
37 p[i], p[i+1], p[i+2], p[i+3], in dump_memory()
38 p[i+4], p[i+5], p[i+6], p[i+7]); in dump_memory()
40 p[i+8], p[i+9], p[i+10], p[i+11], in dump_memory()
41 p[i+12], p[i+13], p[i+14], p[i+15]); in dump_memory()
43 if (((i + 16) & 0xFF) == 0) { in dump_memory()
48 for (; i < size; i++) { in dump_memory()
49 printk("%02x ", p[i]); in dump_memory()
62 uint32_t i, j; in main() local
[all …]
/Zephyr-Core-3.7.0/tests/drivers/rtc/rtc_api/src/
Dtest_alarm.c77 for (uint16_t i = 0; i < alarms_count; i++) { in ZTEST() local
78 ret = rtc_alarm_set_time(rtc, i, 0, NULL); in ZTEST()
80 zassert_ok(ret, "Failed to clear alarm %d time", i); in ZTEST()
84 for (uint16_t i = 0; i < alarms_count; i++) { in ZTEST() local
85 ret = rtc_alarm_set_callback(rtc, i, NULL, NULL); in ZTEST()
88 "Failed to clear and disable alarm %d callback", i); in ZTEST()
92 for (uint16_t i = 0; i < alarms_count; i++) { in ZTEST() local
93 ret = rtc_alarm_get_supported_fields(rtc, i, &alarm_time_mask_supported); in ZTEST()
94 zassert_ok(ret, "Failed to get supported alarm %d fields", i); in ZTEST()
99 ret = rtc_alarm_set_time(rtc, i, test_alarm_time_masks[j], in ZTEST()
[all …]
/Zephyr-Core-3.7.0/tests/integration/kernel/src/
Dmain.c39 uint32_t i; in thread_entry_fn_fifo() local
42 for (i = 0U; i < LIST_LEN; i++) { in thread_entry_fn_fifo()
44 zassert_equal(rx_data->value, fifo_data[i].value); in thread_entry_fn_fifo()
48 for (i = 0U; i < LIST_LEN; i++) { in thread_entry_fn_fifo()
49 fifo_data[i].value *= i; in thread_entry_fn_fifo()
50 k_fifo_put((struct k_fifo *)p1, &fifo_data[i]); in thread_entry_fn_fifo()
61 uint32_t i; in ZTEST() local
67 for (i = 0U; i < LIST_LEN; i++) { in ZTEST()
68 fifo_data[i].value = i; in ZTEST()
69 k_fifo_put(&fifo, &fifo_data[i]); in ZTEST()
[all …]
/Zephyr-Core-3.7.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.7.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.7.0/tests/arch/xtensa/save_restore_hifi/src/
Dhifi.S15 ae_s64.i aed0, a2, 0
16 ae_s64.i aed1, a2, 8
17 ae_s64.i aed2, a2, 16
18 ae_s64.i aed3, a2, 24
19 ae_s64.i aed4, a2, 32
20 ae_s64.i aed5, a2, 40
21 ae_s64.i aed6, a2, 48
22 ae_s64.i aed7, a2, 56
26 ae_s64.i aed8, a2, 0
27 ae_s64.i aed9, a2, 8
[all …]
/Zephyr-Core-3.7.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 …]
/Zephyr-Core-3.7.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.7.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.7.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.7.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.7.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.7.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.7.0/tests/bluetooth/audio/cap_commander/src/
Dtest_vcp.c30 for (size_t i = 0; i < ARRAY_SIZE(fixture->conns); i++) { in cap_commander_test_vcp_fixture_init() local
31 test_conn_init(&fixture->conns[i]); in cap_commander_test_vcp_fixture_init()
57 for (size_t i = 0; i < ARRAY_SIZE(fixture->conns); i++) { in cap_commander_test_vcp_after() local
58 mock_bt_conn_disconnected(&fixture->conns[i], BT_HCI_ERR_REMOTE_USER_TERM_CONN); in cap_commander_test_vcp_after()
82 for (size_t i = 0U; i < ARRAY_SIZE(members); i++) { in ZTEST_F() local
83 members[i].member = &fixture->conns[i]; in ZTEST_F()
89 for (size_t i = 0; i < ARRAY_SIZE(fixture->conns); i++) { in ZTEST_F() local
92 err = bt_vcp_vol_ctlr_discover(&fixture->conns[i], &vol_ctlr); in ZTEST_F()
114 for (size_t i = 0U; i < ARRAY_SIZE(members); i++) { in ZTEST_F() local
115 members[i].member = &fixture->conns[i]; in ZTEST_F()
[all …]
Dtest_micp.c30 for (size_t i = 0; i < ARRAY_SIZE(fixture->conns); i++) { in cap_commander_test_micp_fixture_init() local
31 test_conn_init(&fixture->conns[i]); in cap_commander_test_micp_fixture_init()
57 for (size_t i = 0; i < ARRAY_SIZE(fixture->conns); i++) { in cap_commander_test_micp_after() local
58 mock_bt_conn_disconnected(&fixture->conns[i], BT_HCI_ERR_REMOTE_USER_TERM_CONN); in cap_commander_test_micp_after()
83 for (size_t i = 0U; i < ARRAY_SIZE(member_params); i++) { in ZTEST_F() local
84 member_params[i].member.member = &fixture->conns[i]; in ZTEST_F()
85 member_params[i].gain = 10 + i; in ZTEST_F()
91 for (size_t i = 0; i < ARRAY_SIZE(fixture->conns); i++) { in ZTEST_F() local
94 err = bt_micp_mic_ctlr_discover(&fixture->conns[i], &mic_ctlr); in ZTEST_F()
116 for (size_t i = 0U; i < ARRAY_SIZE(member_params); i++) { in ZTEST_F() local
[all …]
/Zephyr-Core-3.7.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.7.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.7.0/drivers/sensor/bosch/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.7.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.7.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.7.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.7.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()

12345678910>>...96