Home
last modified time | relevance | path

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

12345678910>>...53

/Zephyr-Core-2.7.6/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-2.7.6/tests/kernel/sched/deadline/src/
Dmain.c53 int i; in test_deadline() local
59 for (i = 0; i < NUM_THREADS; i++) { in test_deadline()
60 worker_tids[i] = k_thread_create(&worker_threads[i], in test_deadline()
61 worker_stacks[i], STACK_SIZE, in test_deadline()
62 worker, INT_TO_POINTER(i), NULL, NULL, in test_deadline()
81 thread_deadlines[i] = sys_rand32_get() & 0x3fffff00; in test_deadline()
89 for (i = 0; i < NUM_THREADS; i++) { in test_deadline()
90 k_thread_deadline_set(&worker_threads[i], thread_deadlines[i]); in test_deadline()
99 for (i = 1; i < NUM_THREADS; i++) { in test_deadline()
100 int d0 = thread_deadlines[exec_order[i-1]]; in test_deadline()
[all …]
/Zephyr-Core-2.7.6/tests/kernel/common/src/
Datomic.c95 int i; in test_atomic() local
217 for (i = 0; i < 32; i++) { in test_atomic()
219 zassert_true(!!(atomic_test_bit(&target, i) == !!(target & (1 << i))), in test_atomic()
224 for (i = 0; i < 32; i++) { in test_atomic()
227 zassert_true(!!(atomic_test_and_clear_bit(&target, i)) == !!(orig & (1 << i)), in test_atomic()
229 zassert_true(target == (orig & ~(1 << i)), "atomic_test_and_clear_bit"); in test_atomic()
233 for (i = 0; i < 32; i++) { in test_atomic()
236 zassert_true(!!(atomic_test_and_set_bit(&target, i)) == !!(orig & (1 << i)), in test_atomic()
238 zassert_true(target == (orig | (1 << i)), "atomic_test_and_set_bit"); in test_atomic()
242 for (i = 0; i < 32; i++) { in test_atomic()
[all …]
/Zephyr-Core-2.7.6/tests/kernel/mem_heap/mheap_api_concept/src/
Dtest_mheap_concept.c42 for (int i = 0; i < BLK_NUM_MAX; i++) { in test_mheap_malloc_align4() local
43 block[i] = k_malloc(i); in test_mheap_malloc_align4()
44 zassert_not_null(block[i], NULL); in test_mheap_malloc_align4()
45 zassert_false((uintptr_t)block[i] % sizeof(void *), NULL); in test_mheap_malloc_align4()
49 for (int i = 0; i < BLK_NUM_MAX; i++) { in test_mheap_malloc_align4() local
50 k_free(block[i]); in test_mheap_malloc_align4()
86 for (int i = 0; i < THREAD_NUM; i++) { in test_mheap_threadsafe() local
87 tid[i] = k_thread_create(&tdata[i], tstack[i], STACK_SIZE, in test_mheap_threadsafe()
88 tmheap_handler, INT_TO_POINTER(i), NULL, NULL, in test_mheap_threadsafe()
92 for (int i = 0; i < THREAD_NUM; i++) { in test_mheap_threadsafe() local
[all …]
/Zephyr-Core-2.7.6/tests/subsys/portability/cmsis_rtos_v1/src/
Dmempool.c28 int i; in test_mempool() local
37 for (i = 0; i < MAX_BLOCKS; i++) { in test_mempool()
38 addr_list[i] = (struct mem_block *)osPoolAlloc(mempool_id); in test_mempool()
39 zassert_true(addr_list[i] != NULL, "mempool allocation failed"); in test_mempool()
45 addr_list[i] = (struct mem_block *)osPoolAlloc(mempool_id); in test_mempool()
46 zassert_true(addr_list[i] == NULL, "allocation happened." in test_mempool()
49 for (i = 0; i < MAX_BLOCKS; i++) { in test_mempool()
50 status_list[i] = osPoolFree(mempool_id, addr_list[i]); in test_mempool()
51 zassert_true(status_list[i] == osOK, "mempool free failed"); in test_mempool()
54 for (i = 0; i < MAX_BLOCKS; i++) { in test_mempool()
[all …]
/Zephyr-Core-2.7.6/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, NULL); in child_thread_get()
90 for (int i = 0; i < (LIST_LEN * 2); i = i + 2) { in test_queue_supv_to_user() local
95 qdata[i].data = i; in test_queue_supv_to_user()
96 qdata[i].allocated = false; in test_queue_supv_to_user()
97 qdata[i].snode.next = NULL; in test_queue_supv_to_user()
98 k_queue_append(q, &qdata[i]); in test_queue_supv_to_user()
100 qdata[i + 1].data = i + 1; in test_queue_supv_to_user()
101 qdata[i + 1].allocated = true; in test_queue_supv_to_user()
102 qdata[i + 1].snode.next = NULL; in test_queue_supv_to_user()
[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], NULL); in tqueue_get()
51 for (int i = 0; i < LIST_LEN; i++) { in tqueue_get() local
54 zassert_equal(rx_data, (void *)&data[i], NULL); in tqueue_get()
[all …]
/Zephyr-Core-2.7.6/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-2.7.6/soc/arm/st_stm32/common/
Dst_stm32_dt.h34 #define ST_STM32_DT_INST_NODE_ID_FROM_PINCTRL(inst, x, i) \ argument
35 DT_INST_PINCTRL_BY_IDX(inst, x, i)
46 #define ST_STM32_DT_NODE_ID_FROM_PINCTRL(name, x, i) \ argument
47 DT_PINCTRL_BY_IDX(DT_NODELABEL(name), x, i)
58 #define ST_STM32_DT_INST_PINMUX(inst, x, i) \ argument
59 DT_PROP(ST_STM32_DT_INST_NODE_ID_FROM_PINCTRL(inst, x, i), pinmux)
70 #define ST_STM32_DT_PINMUX(name, x, i) \ argument
71 DT_PROP(ST_STM32_DT_NODE_ID_FROM_PINCTRL(name, x, i), pinmux)
83 #define ST_STM32_DT_INST_FUNC(inst, x, i, function) \ argument
84 DT_PROP(ST_STM32_DT_INST_NODE_ID_FROM_PINCTRL(inst, x, i), function)
[all …]
/Zephyr-Core-2.7.6/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-2.7.6/subsys/usb/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-2.7.6/tests/drivers/gpio/gpio_api_1pin/src/
Dtest_port.c134 for (int i = 0; i < 5; i++) { in test_gpio_port_toggle() local
141 port_get_raw_and_verify(port, BIT(TEST_PIN), val_expected, i); in test_gpio_port_toggle()
179 for (int i = 0; i < ARRAY_SIZE(test_vector); i++) { in test_gpio_port_set_masked_get_raw() local
180 port_set_masked_raw_and_verify(port, BIT(TEST_PIN), test_vector[i], i); in test_gpio_port_set_masked_get_raw()
181 port_get_raw_and_verify(port, BIT(TEST_PIN), test_vector[i], i); in test_gpio_port_set_masked_get_raw()
219 for (int i = 0; i < ARRAY_SIZE(test_vector); i++) { in test_gpio_port_set_masked_get() local
220 port_set_masked_and_verify(port, BIT(TEST_PIN), test_vector[i], i); in test_gpio_port_set_masked_get()
221 port_get_and_verify(port, BIT(TEST_PIN), test_vector[i], i); in test_gpio_port_set_masked_get()
262 for (int i = 0; i < ARRAY_SIZE(test_vector); i++) { in test_gpio_port_set_masked_get_active_high() local
263 port_set_masked_and_verify(port, BIT(TEST_PIN), test_vector[i], i); in test_gpio_port_set_masked_get_active_high()
[all …]
Dtest_pin.c81 for (int i = 0; i < 5; i++) { in test_gpio_pin_toggle() local
86 val_expected = i % 2; in test_gpio_pin_toggle()
88 pin_get_raw_and_verify(port, TEST_PIN, val_expected, i); in test_gpio_pin_toggle()
120 for (int i = 0; i < 3; i++) { in test_gpio_pin_toggle_visual() local
127 val_expected = i % 2; in test_gpio_pin_toggle_visual()
160 for (int i = 0; i < ARRAY_SIZE(test_vector); i++) { in test_gpio_pin_set_get_raw() local
161 pin_set_raw_and_verify(port, TEST_PIN, test_vector[i], i); in test_gpio_pin_set_get_raw()
163 val_expected = test_vector[i] != 0 ? 1 : 0; in test_gpio_pin_set_get_raw()
165 pin_get_raw_and_verify(port, TEST_PIN, val_expected, i); in test_gpio_pin_set_get_raw()
197 for (int i = 0; i < ARRAY_SIZE(test_vector); i++) { in test_gpio_pin_set_get() local
[all …]
/Zephyr-Core-2.7.6/tests/posix/common/src/
Dpthread_key.c58 int i, ret = -1; in thread_func() local
69 for (i = 0; i < N_KEY; i++) { in thread_func()
70 ret = pthread_setspecific(keys[i], value); in thread_func()
76 for (i = 0; i < N_KEY; i++) { in thread_func()
78 getval = pthread_getspecific(keys[i]); in thread_func()
87 i, (int) POINTER_TO_INT(value), in thread_func()
103 int i, ret = 0; in make_keys() local
105 for (i = 0; i < N_KEY; i++) { in make_keys()
106 ret = pthread_key_create(&keys[i], NULL); in make_keys()
126 int i, ret = -1; in test_posix_multiple_threads_single_key() local
[all …]
/Zephyr-Core-2.7.6/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], NULL); 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], NULL); in thread_entry_fn_single()
95 for (i = 0U; i < LIST_LEN; i++) { in thread_entry_fn_single()
[all …]
/Zephyr-Core-2.7.6/samples/drivers/ht16k33/src/
Dmain.c28 int i; in main() local
48 for (i = 0; i < 128; i++) { in main()
49 led_on(led, i); in main()
53 for (i = 500; i <= 2000; i *= 2) { in main()
54 LOG_INF("Blinking LEDs with a period of %d ms", i); in main()
55 led_blink(led, 0, i / 2, i / 2); in main()
56 k_msleep(10 * i); in main()
60 for (i = 100; i >= 0; i -= 10) { in main()
61 LOG_INF("Setting LED brightness to %d%%", i); in main()
62 led_set_brightness(led, 0, i); in main()
[all …]
/Zephyr-Core-2.7.6/tests/kernel/workq/work_queue/src/
Dmain.c83 int i; in delayed_test_items_init() local
85 for (i = 0; i < NUM_TEST_ITEMS; i++) { in delayed_test_items_init()
86 delayed_tests[i].key = i + 1; in delayed_test_items_init()
87 k_delayed_work_init(&delayed_tests[i].work, work_handler); in delayed_test_items_init()
93 int i; in reset_results() local
95 for (i = 0; i < NUM_TEST_ITEMS; i++) { in reset_results()
96 results[i] = 0; in reset_results()
104 int i; in coop_work_main() local
112 for (i = 1; i < NUM_TEST_ITEMS; i += 2) { in coop_work_main()
113 TC_PRINT(" - Submitting work %d from coop thread\n", i + 1); in coop_work_main()
[all …]
/Zephyr-Core-2.7.6/tests/kernel/mem_protect/demand_paging/src/
Dmain.c126 for (size_t i = 0; i < arena_size; i++) { in test_touch_anon_pages() local
127 zassert_equal(arena[i], '\x00', in test_touch_anon_pages()
129 arena[i], i); in test_touch_anon_pages()
134 for (size_t i = 0; i < arena_size; i++) { in test_touch_anon_pages() local
135 arena[i] = nums[i % 10]; in test_touch_anon_pages()
140 for (size_t i = 0; i < arena_size; i++) { in test_touch_anon_pages() local
141 zassert_equal(arena[i], nums[i % 10], in test_touch_anon_pages()
143 i, &arena[i], arena[i], nums[i % 10]); in test_touch_anon_pages()
165 for (size_t i = 0; i < arena_size; i++) { in test_touch_anon_pages() local
166 zassert_equal(arena[i], nums[i % 10], in test_touch_anon_pages()
[all …]
/Zephyr-Core-2.7.6/soc/arm/nuvoton_npcx/common/
Dscfg.c93 int i; in npcx_pinctrl_mux_configure() local
95 for (i = 0; i < alts_size; i++, alts_list++) { in npcx_pinctrl_mux_configure()
104 for (int i = 0; i < ARRAY_SIZE(def_lvols); i++) { in npcx_lvol_pads_configure() local
105 NPCX_LV_GPIO_CTL(scfg_base, def_lvols[i].ctrl) in npcx_lvol_pads_configure()
106 |= BIT(def_lvols[i].bit); in npcx_lvol_pads_configure()
107 LOG_DBG("IO%x%x turn on low-voltage", def_lvols[i].io_port, in npcx_lvol_pads_configure()
108 def_lvols[i].io_bit); in npcx_lvol_pads_configure()
114 for (int i = 0; i < ARRAY_SIZE(def_lvols); i++) { in npcx_lvol_restore_io_pads() local
116 npcx_get_gpio_dev(def_lvols[i].io_port), in npcx_lvol_restore_io_pads()
117 def_lvols[i].io_bit); in npcx_lvol_restore_io_pads()
[all …]
/Zephyr-Core-2.7.6/subsys/net/ip/
Dutils.c32 static int i; in net_sprint_addr() local
33 char *s = buf[++i % NBUFS]; in net_sprint_addr()
67 int i, val; in net_byte_to_hex() local
69 for (i = 0, val = (byte & 0xf0) >> 4; i < 2; i++, val = byte & 0x0f) { in net_byte_to_hex()
70 if (i == 0 && !pad && !val) { in net_byte_to_hex()
88 uint8_t i, len, blen; in net_sprint_ll_addr_buf() local
110 for (i = 0U, blen = buflen; i < len && blen > 0; i++) { in net_sprint_ll_addr_buf()
111 ptr = net_byte_to_hex(ptr, (char)ll[i], 'A', true); in net_sprint_ll_addr_buf()
127 int i; in net_value_to_udec() local
136 for (i = 9; i >= 0; i--, divisor /= 10U) { in net_value_to_udec()
[all …]
/Zephyr-Core-2.7.6/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-2.7.6/tests/kernel/mem_slab/mslab_api/src/
Dtest_mslab_api.c25 for (int i = 0; i < BLK_NUM; i++) { in tmslab_alloc_free() local
28 zassert_true(k_mem_slab_alloc(pslab, &block[i], K_NO_WAIT) == 0, in tmslab_alloc_free()
34 zassert_not_null(block[i], NULL); in tmslab_alloc_free()
36 for (int i = 0; i < BLK_NUM; i++) { in tmslab_alloc_free() local
38 k_mem_slab_free(pslab, &block[i]); in tmslab_alloc_free()
47 for (int i = 0; i < BLK_NUM; i++) { in tmslab_alloc_align() local
48 zassert_true(k_mem_slab_alloc(pslab, &block[i], K_NO_WAIT) == 0, in tmslab_alloc_align()
54 zassert_true((uintptr_t)block[i] % BLK_ALIGN == 0U, NULL); in tmslab_alloc_align()
56 for (int i = 0; i < BLK_NUM; i++) { in tmslab_alloc_align() local
57 k_mem_slab_free(pslab, &block[i]); in tmslab_alloc_align()
[all …]
/Zephyr-Core-2.7.6/arch/arm/core/aarch32/cortex_m/
Dscb.c54 int i; in z_arm_clear_arm_mpu_config() local
59 for (i = 0; i < num_regions; i++) { in z_arm_clear_arm_mpu_config()
60 ARM_MPU_ClrRegion(i); in z_arm_clear_arm_mpu_config()
66 int i; in z_arm_clear_arm_mpu_config() local
73 for (i = 1; i < num_regions; i++) { in z_arm_clear_arm_mpu_config()
74 SYSMPU_RegionEnable(SYSMPU, i, false); in z_arm_clear_arm_mpu_config()
106 for (uint8_t i = 0; i < ARRAY_SIZE(NVIC->ICER); i++) { in z_arm_init_arch_hw_at_boot() local
107 NVIC->ICER[i] = 0xFFFFFFFF; in z_arm_init_arch_hw_at_boot()
110 for (uint8_t i = 0; i < ARRAY_SIZE(NVIC->ICPR); i++) { in z_arm_init_arch_hw_at_boot() local
111 NVIC->ICPR[i] = 0xFFFFFFFF; in z_arm_init_arch_hw_at_boot()
/Zephyr-Core-2.7.6/tests/net/neighbor/src/
Dmain.c78 int ret, i; in test_neighbor() local
95 for (i = 0; i < 2; i++) { in test_neighbor()
96 eth_addr = addrs[i]; in test_neighbor()
103 zassert_false(i == 0 && ret < 0, "Cannot add %s to nbr cache (%d)\n", in test_neighbor()
118 for (i = 0; i < 2; i++) { in test_neighbor()
119 eth_addr = addrs[i]; in test_neighbor()
124 zassert_false(i == 0 && ret < 0, "Cannot add %s to nbr cache (%d)\n", in test_neighbor()
142 for (i = 0; i < ARRAY_SIZE(addrs); i++) { in test_neighbor()
145 if (i >= CONFIG_NET_IPV6_MAX_NEIGHBORS) { in test_neighbor()
150 i, &net_test_neighbor.table); in test_neighbor()
[all …]
/Zephyr-Core-2.7.6/tests/benchmarks/sys_kernel/src/
Dmem_slab.c35 int i; in mem_slab_alloc_test() local
37 for (i = 0; i < no_of_loops; i++) { in mem_slab_alloc_test()
38 if (k_mem_slab_alloc(&my_slab, &slab_array[i], K_NO_WAIT) in mem_slab_alloc_test()
40 return i; in mem_slab_alloc_test()
44 return i; in mem_slab_alloc_test()
60 int i; in mem_slab_free_test() local
62 for (i = 0; i < no_of_loops; i++) { in mem_slab_free_test()
63 k_mem_slab_free(&my_slab, &slab_array[i]); in mem_slab_free_test()
66 return i; in mem_slab_free_test()
72 int i = 0; in mem_slab_test() local
[all …]

12345678910>>...53