/Zephyr-latest/tests/boards/intel_adsp/mm/src/ |
D | main.c | 42 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-latest/tests/bluetooth/controller/ctrl_tx_queue/src/ |
D | main.c | 58 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-latest/tests/benchmarks/posix/threads/src/ |
D | main.c | 28 typedef int (*create_fn)(int i); 29 typedef int (*join_fn)(int i); 45 for (int i = 0; i < NUM_CPUS; ++i) { in print_stats() local 46 printf("%s, %d, %u, %llu, 1, %llu\n", tag, i, UPDATE_INTERVAL_S, 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() 56 for (int i = 0; i < NUM_CPUS; ++i) { in print_group_stats() local 57 count += counters[i]; in print_group_stats() 66 int i; in create_join_common() local 72 for (i = 0; i < NUM_CPUS; ++i) { in create_join_common() [all …]
|
/Zephyr-latest/tests/bluetooth/host/cs/bt_le_cs_parse_pct/src/ |
D | main.c | 33 {.input = {0x00, 0x00, 0x00}, .output = {.i = 0, .q = 0}}, in ZTEST() 34 {.input = {0xFF, 0xFF, 0xFF}, .output = {.i = -1, .q = -1}}, in ZTEST() 35 {.input = {0xFF, 0x00, 0xFF}, .output = {.i = 255, .q = -16}}, in ZTEST() 36 {.input = {0xFF, 0x00, 0x00}, .output = {.i = 255, .q = 0}}, in ZTEST() 37 {.input = {0x00, 0xFF, 0x00}, .output = {.i = -256, .q = 15}}, in ZTEST() 38 {.input = {0x00, 0x00, 0xFF}, .output = {.i = 0, .q = -16}}, in ZTEST() 39 {.input = {0x00, 0x08, 0x80}, .output = {.i = -2048, .q = -2048}}, in ZTEST() 40 {.input = {0xFF, 0xF7, 0x7F}, .output = {.i = 2047, .q = 2047}}, in ZTEST() 43 {.input = {0xEF, 0xCD, 0xAB}, .output = {.i = -529, .q = -1348}}, in ZTEST() 44 {.input = {0x30, 0x75, 0x44}, .output = {.i = 1328, .q = 1095}}, in ZTEST() [all …]
|
/Zephyr-latest/samples/drivers/memc/src/ |
D | main.c | 33 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-latest/tests/drivers/rtc/rtc_api/src/ |
D | test_alarm.c | 77 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-latest/tests/integration/kernel/src/ |
D | main.c | 39 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-latest/tests/lib/cmsis_dsp/common/ |
D | math_helper.h | 80 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-latest/tests/benchmarks/sched_queues/src/ |
D | main.c | 70 unsigned int i; in start_threads() local 75 for (i = 0; i < CONFIG_MP_MAX_NUM_CPUS - 1; i++) { in start_threads() 76 k_thread_create(&busy_thread[i], busy_stack[i], BUSY_STACK_SIZE, in start_threads() 83 for (i = 0; i < CONFIG_BENCHMARK_NUM_THREADS; i++) { in start_threads() 84 k_thread_create(&test_thread[i], test_stack, TEST_STACK_SIZE, in start_threads() 85 test_entry, (void *)(uintptr_t)i, NULL, NULL, in start_threads() 86 i / bucket_size, 0, K_NO_WAIT); in start_threads() 92 unsigned int i; in cycles_reset() local 94 for (i = 0; i < num_threads; i++) { in cycles_reset() 95 add_cycles[i] = 0ULL; in cycles_reset() [all …]
|
/Zephyr-latest/tests/bluetooth/audio/cap_initiator/src/ |
D | test_unicast_stop.c | 48 for (size_t i = 0U; i < ARRAY_SIZE(fixture->conns); i++) { in cap_initiator_test_unicast_stop_fixture_init() local 49 test_conn_init(&fixture->conns[i]); in cap_initiator_test_unicast_stop_fixture_init() 52 for (size_t i = 0U; i < ARRAY_SIZE(fixture->eps); i++) { in cap_initiator_test_unicast_stop_fixture_init() local 53 fixture->eps[i].dir = (i & 1) + 1; /* Makes it either 1 or 2 (sink or source)*/ in cap_initiator_test_unicast_stop_fixture_init() 56 for (size_t i = 0U; i < ARRAY_SIZE(fixture->cap_streams); i++) { in cap_initiator_test_unicast_stop_fixture_init() local 57 struct bt_cap_stream *cap_stream = &fixture->cap_streams[i]; in cap_initiator_test_unicast_stop_fixture_init() 92 for (size_t i = 0; i < ARRAY_SIZE(fixture->conns); i++) { in cap_initiator_test_unicast_stop_after() local 93 mock_bt_conn_disconnected(&fixture->conns[i], BT_HCI_ERR_REMOTE_USER_TERM_CONN); in cap_initiator_test_unicast_stop_after() 121 for (size_t i = 0U; i < ARRAY_SIZE(streams); i++) { in ZTEST_F() local 122 streams[i] = &fixture->cap_streams[i]; in ZTEST_F() [all …]
|
D | test_unicast_start.c | 47 for (size_t i = 0U; i < ARRAY_SIZE(fixture->conns); i++) { in cap_initiator_test_unicast_start_fixture_init() local 48 test_conn_init(&fixture->conns[i]); in cap_initiator_test_unicast_start_fixture_init() 51 for (size_t i = 0U; i < ARRAY_SIZE(fixture->cap_streams); i++) { in cap_initiator_test_unicast_start_fixture_init() local 52 struct bt_bap_stream *bap_stream = &fixture->cap_streams[i].bap_stream; in cap_initiator_test_unicast_start_fixture_init() 58 for (size_t i = 0U; i < ARRAY_SIZE(fixture->eps); i++) { in cap_initiator_test_unicast_start_fixture_init() local 59 fixture->eps[i].dir = (i & 1) + 1; /* Makes it either 1 or 2 (sink or source)*/ in cap_initiator_test_unicast_start_fixture_init() 90 for (size_t i = 0; i < ARRAY_SIZE(fixture->conns); i++) { in cap_initiator_test_unicast_start_after() local 91 mock_bt_conn_disconnected(&fixture->conns[i], BT_HCI_ERR_REMOTE_USER_TERM_CONN); in cap_initiator_test_unicast_start_after() 118 for (size_t i = 0U; i < ARRAY_SIZE(stream_params); i++) { in ZTEST_F() local 119 stream_params[i].stream = &fixture->cap_streams[i]; in ZTEST_F() [all …]
|
/Zephyr-latest/tests/benchmarks/wait_queues/src/ |
D | main.c | 42 unsigned int i; in dummy_threads_init() local 47 for (i = 0; i < num_threads; i++) { in dummy_threads_init() 48 z_init_thread_base(&dummy_thread[i], i / bucket_size, in dummy_threads_init() 55 unsigned int i; in cycles_reset() local 57 for (i = 0; i < num_threads; i++) { in cycles_reset() 58 add_cycles[i] = 0ULL; in cycles_reset() 59 remove_cycles[i] = 0ULL; in cycles_reset() 70 unsigned int i; in test_decreasing_priority() local 76 for (i = 0; i < num_threads; i++) { in test_decreasing_priority() 78 z_pend_thread((struct k_thread *)&dummy_thread[i], in test_decreasing_priority() [all …]
|
/Zephyr-latest/tests/arch/xtensa/save_restore_hifi/src/ |
D | hifi.S | 15 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-latest/samples/drivers/led/pca9633/src/ |
D | main.c | 28 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-latest/tests/kernel/queue/src/ |
D | test_queue_user.c | 40 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-latest/tests/subsys/portability/cmsis_rtos_v1/src/ |
D | mempool.c | 28 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-latest/tests/lib/multi_heap/src/ |
D | test_mheap_concept.c | 42 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-latest/subsys/usb/device/class/audio/ |
D | usb_audio_internal.h | 80 #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-latest/tests/lib/math/interpolation/src/ |
D | main.c | 38 for (int i = 0; i < ARRAY_SIZE(x_axis); i++) { in ZTEST() local 39 zassert_equal(y_axis[i], linear_interpolate(x_axis, y_axis, len, x_axis[i])); in ZTEST() 52 for (int i = 0; i < 5; i++) { in ZTEST() local 53 zassert_equal(0, linear_interpolate(x_axis, y_axis, len, i)); in ZTEST() 56 for (int i = 5; i < 15; i++) { in ZTEST() local 57 zassert_equal(1, linear_interpolate(x_axis, y_axis, len, i)); in ZTEST() 60 for (int i = 15; i <= 20; i++) { in ZTEST() local 61 zassert_equal(2, linear_interpolate(x_axis, y_axis, len, i)); in ZTEST() 75 for (int i = x_axis[0]; i <= x_axis[1]; i++) { in ZTEST() local 76 expected = round((i - 2000.0) / 10.0); in ZTEST() [all …]
|
/Zephyr-latest/tests/kernel/smp_suspend/src/ |
D | main.c | 44 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-latest/tests/bluetooth/audio/cap_commander/src/ |
D | test_vcp.c | 30 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 …]
|
D | test_micp.c | 30 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-latest/samples/drivers/ht16k33/src/ |
D | main.c | 30 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-latest/drivers/sensor/bosch/bmi08x/ |
D | bmi08x.c | 30 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-latest/tests/kernel/sched/schedule_api/src/ |
D | test_sched_timeslice_and_lock.c | 39 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 …]
|