/Zephyr-Core-2.7.6/tests/drivers/i2s/i2s_api/src/ |
D | test_i2s_loopback.c | 19 int ret; in test_i2s_tx_transfer_configure_0() local 24 ret = configure_stream(dev_i2s_tx, I2S_DIR_TX); in test_i2s_tx_transfer_configure_0() 25 zassert_equal(ret, TC_PASS, NULL); in test_i2s_tx_transfer_configure_0() 31 int ret; in test_i2s_rx_transfer_configure_0() local 36 ret = configure_stream(dev_i2s_rx, I2S_DIR_RX); in test_i2s_rx_transfer_configure_0() 37 zassert_equal(ret, TC_PASS, NULL); in test_i2s_rx_transfer_configure_0() 56 int ret; in test_i2s_transfer_short() local 59 ret = tx_block_write(dev_i2s_tx, 0, 0); in test_i2s_transfer_short() 60 zassert_equal(ret, TC_PASS, NULL); in test_i2s_transfer_short() 63 ret = tx_block_write(dev_i2s_tx, 1, 0); in test_i2s_transfer_short() [all …]
|
D | test_i2s_states.c | 18 int ret; in test_i2s_tx_transfer_configure_1() local 23 ret = configure_stream(dev_i2s_tx, I2S_DIR_TX); in test_i2s_tx_transfer_configure_1() 24 zassert_equal(ret, TC_PASS, NULL); in test_i2s_tx_transfer_configure_1() 30 int ret; in test_i2s_rx_transfer_configure_1() local 35 ret = configure_stream(dev_i2s_rx, I2S_DIR_RX); in test_i2s_rx_transfer_configure_1() 36 zassert_equal(ret, TC_PASS, NULL); in test_i2s_rx_transfer_configure_1() 50 int ret; in test_i2s_state_not_ready_neg() local 56 ret = i2s_configure(dev_i2s_rx, I2S_DIR_RX, &i2s_cfg); in test_i2s_state_not_ready_neg() 57 zassert_equal(ret, 0, "Failed to configure I2S RX stream"); in test_i2s_state_not_ready_neg() 59 ret = i2s_trigger(dev_i2s_rx, I2S_DIR_RX, I2S_TRIGGER_START); in test_i2s_state_not_ready_neg() [all …]
|
D | test_i2s_dir_both_loopback.c | 23 int ret; in test_i2s_dir_both_transfer_configure_0() local 28 ret = configure_stream(dev_i2s, I2S_DIR_BOTH); in test_i2s_dir_both_transfer_configure_0() 29 zassert_equal(ret, TC_PASS, NULL); in test_i2s_dir_both_transfer_configure_0() 35 ret = i2s_trigger(dev_i2s, I2S_DIR_BOTH, I2S_TRIGGER_DROP); in test_i2s_dir_both_transfer_configure_0() 36 dir_both_supported = (ret == 0); in test_i2s_dir_both_transfer_configure_0() 58 int ret; in test_i2s_dir_both_transfer_short() local 61 ret = tx_block_write(dev_i2s, 0, 0); in test_i2s_dir_both_transfer_short() 62 zassert_equal(ret, TC_PASS, NULL); in test_i2s_dir_both_transfer_short() 65 ret = tx_block_write(dev_i2s, 1, 0); in test_i2s_dir_both_transfer_short() 66 zassert_equal(ret, TC_PASS, NULL); in test_i2s_dir_both_transfer_short() [all …]
|
D | test_i2s_dir_both_states.c | 23 int ret; in test_i2s_dir_both_transfer_configure_1() local 28 ret = configure_stream(dev_i2s, I2S_DIR_BOTH); in test_i2s_dir_both_transfer_configure_1() 29 zassert_equal(ret, TC_PASS, NULL); in test_i2s_dir_both_transfer_configure_1() 35 ret = i2s_trigger(dev_i2s, I2S_DIR_BOTH, I2S_TRIGGER_DROP); in test_i2s_dir_both_transfer_configure_1() 36 dir_both_supported = (ret == 0); in test_i2s_dir_both_transfer_configure_1() 58 int ret; in test_i2s_dir_both_state_running_neg() local 61 ret = tx_block_write(dev_i2s, 0, 0); in test_i2s_dir_both_state_running_neg() 62 zassert_equal(ret, TC_PASS, NULL); in test_i2s_dir_both_state_running_neg() 64 ret = i2s_trigger(dev_i2s, I2S_DIR_BOTH, I2S_TRIGGER_START); in test_i2s_dir_both_state_running_neg() 65 zassert_equal(ret, 0, "RX/TX START trigger failed\n"); in test_i2s_dir_both_state_running_neg() [all …]
|
/Zephyr-Core-2.7.6/tests/subsys/fs/fs_api/src/ |
D | test_fs_dir_file.c | 121 int ret; in test_mount() local 125 ret = fs_mount(NULL); in test_mount() 126 zassert_not_equal(ret, 0, "Mount a NULL fs"); in test_mount() 129 ret = fs_mount(&test_fs_mnt_unsupported_fs); in test_mount() 130 zassert_not_equal(ret, 0, "Mount an unsupported fs"); in test_mount() 135 ret = fs_mount(&test_fs_mnt_invalid_root_1); in test_mount() 136 zassert_not_equal(ret, 0, "Mount to an invalid dir"); in test_mount() 137 ret = fs_mount(&test_fs_mnt_invalid_root_2); in test_mount() 138 zassert_not_equal(ret, 0, "Mount dir name too short"); in test_mount() 139 ret = fs_mount(&test_fs_mnt_invalid_root_3); in test_mount() [all …]
|
D | test_fs_mount_flags.c | 20 int ret = 0; in test_mount_flags() local 28 ret = fs_mount(&mp); in test_mount_flags() 29 zassert_equal(ret, 0, "Expected success (%d)", ret); in test_mount_flags() 31 ret = fs_open(&fs, TEST_FS_MNTP"/some", FS_O_CREATE); in test_mount_flags() 32 zassert_equal(ret, 0, "Expected success fs_open(FS_O_CREATE) (%d)", in test_mount_flags() 33 ret); in test_mount_flags() 34 ret = fs_close(&fs); in test_mount_flags() 35 zassert_equal(ret, 0, "Expected fs_close success (%d)", ret); in test_mount_flags() 37 ret = fs_mkdir(TEST_FS_MNTP"/other"); in test_mount_flags() 38 zassert_equal(ret, 0, "Expected fs_mkdir success (%d)", ret); in test_mount_flags() [all …]
|
/Zephyr-Core-2.7.6/tests/subsys/fs/littlefs/src/ |
D | testfs_mount_flags.c | 26 int ret = 0; in test_fs_mount_flags() local 34 ret = fs_mount(mp); in test_fs_mount_flags() 36 zassert_false(ret == 0, "Expected failure", ret); in test_fs_mount_flags() 40 ret = fs_mount(mp); in test_fs_mount_flags() 42 zassert_false(ret == 0, "Expected failure", ret); in test_fs_mount_flags() 46 ret = fs_mount(mp); in test_fs_mount_flags() 48 zassert_equal(ret, 0, "Expected success", ret); in test_fs_mount_flags() 50 ret = fs_open(&fs, "/sml/some", FS_O_CREATE); in test_fs_mount_flags() 51 zassert_equal(ret, 0, "Expected success", ret); in test_fs_mount_flags() 54 ret = fs_mkdir("/sml/other"); in test_fs_mount_flags() [all …]
|
/Zephyr-Core-2.7.6/tests/posix/eventfd/src/ |
D | main.c | 20 int ret; in is_blocked() local 25 ret = poll(&pfd, 1, 0); in is_blocked() 26 zassert_true(ret >= 0, "poll failed %d", ret); in is_blocked() 30 return ret == 0; in is_blocked() 45 int fd, ret; in test_eventfd_read_nonblock() local 50 ret = eventfd_read(fd, &val); in test_eventfd_read_nonblock() 51 zassert_true(ret == -1, "read unset ret %d", ret); in test_eventfd_read_nonblock() 54 ret = eventfd_write(fd, TESTVAL); in test_eventfd_read_nonblock() 55 zassert_true(ret == 0, "write ret %d", ret); in test_eventfd_read_nonblock() 57 ret = eventfd_read(fd, &val); in test_eventfd_read_nonblock() [all …]
|
/Zephyr-Core-2.7.6/subsys/net/lib/lwm2m/ |
D | lwm2m_rw_link_format.c | 56 int ret; in put_begin() local 84 ret = buf_append(CPKT_BUF_WRITE(out->out_cpkt), init_string, in put_begin() 86 if (ret < 0) { in put_begin() 98 int ret; in put_corelink_separator() local 100 ret = buf_append(CPKT_BUF_WRITE(out->out_cpkt), &comma, sizeof(comma)); in put_corelink_separator() 101 if (ret < 0) { in put_corelink_separator() 102 return ret; in put_corelink_separator() 112 int ret, len; in put_corelink_version() local 120 ret = buf_append(CPKT_BUF_WRITE(out->out_cpkt), buf, len); in put_corelink_version() 121 if (ret < 0) { in put_corelink_version() [all …]
|
/Zephyr-Core-2.7.6/tests/drivers/i2s/i2s_speed/src/ |
D | test_i2s_speed.c | 115 int ret; in configure_stream() local 144 ret = i2s_configure(dev_i2s, I2S_DIR_TX, &i2s_cfg); in configure_stream() 145 if (ret < 0) { in configure_stream() 147 ret); in configure_stream() 154 ret = i2s_configure(dev_i2s, I2S_DIR_RX, &i2s_cfg); in configure_stream() 155 if (ret < 0) { in configure_stream() 157 ret); in configure_stream() 168 int ret; in test_i2s_tx_transfer_configure() local 173 ret = configure_stream(dev_i2s_tx, I2S_DIR_TX); in test_i2s_tx_transfer_configure() 174 zassert_equal(ret, TC_PASS, NULL); in test_i2s_tx_transfer_configure() [all …]
|
/Zephyr-Core-2.7.6/tests/subsys/dfu/img_util/src/ |
D | main.c | 16 int ret; in test_init_id() local 18 ret = flash_img_init(&ctx_no_id); in test_init_id() 19 zassert_true(ret == 0, "Flash img init"); in test_init_id() 21 ret = flash_img_init_id(&ctx_id, FLASH_AREA_ID(image_1)); in test_init_id() 22 zassert_true(ret == 0, "Flash img init id"); in test_init_id() 29 ret = flash_img_init_id(&ctx_id, FLASH_AREA_ID(image_0)); in test_init_id() 30 zassert_true(ret == 0, "Flash img init id"); in test_init_id() 42 int ret; in test_collecting() local 44 ret = flash_img_init(&ctx); in test_collecting() 45 zassert_true(ret == 0, "Flash img init"); in test_collecting() [all …]
|
/Zephyr-Core-2.7.6/tests/subsys/edac/ibecc/src/ |
D | dummy.c | 33 int ret; in test_edac_dummy_api() local 39 ret = edac_ecc_error_log_get(dev, &value); in test_edac_dummy_api() 40 zassert_equal(ret, -ENOSYS, "dummy api failed"); in test_edac_dummy_api() 42 ret = edac_ecc_error_log_clear(dev); in test_edac_dummy_api() 43 zassert_equal(ret, -ENOSYS, "dummy api failed"); in test_edac_dummy_api() 45 ret = edac_parity_error_log_get(dev, &value); in test_edac_dummy_api() 46 zassert_equal(ret, -ENOSYS, "dummy api failed"); in test_edac_dummy_api() 48 ret = edac_parity_error_log_clear(dev); in test_edac_dummy_api() 49 zassert_equal(ret, -ENOSYS, "dummy api failed"); in test_edac_dummy_api() 53 ret = edac_errors_cor_get(dev); in test_edac_dummy_api() [all …]
|
D | ibecc.c | 56 int ret; in test_ibecc_api() local 60 ret = edac_ecc_error_log_get(dev, &value); in test_ibecc_api() 61 zassert_equal(ret, 0, "edac_ecc_error_log_get failed"); in test_ibecc_api() 63 ret = edac_ecc_error_log_clear(dev); in test_ibecc_api() 64 zassert_equal(ret, 0, "edac_ecc_error_log_clear failed"); in test_ibecc_api() 66 ret = edac_parity_error_log_get(dev, &value); in test_ibecc_api() 67 zassert_equal(ret, 0, "edac_parity_error_log_get failed"); in test_ibecc_api() 69 ret = edac_parity_error_log_clear(dev); in test_ibecc_api() 70 zassert_equal(ret, 0, "edac_parity_error_log_clear failed"); in test_ibecc_api() 74 ret = edac_errors_cor_get(dev); in test_ibecc_api() [all …]
|
/Zephyr-Core-2.7.6/samples/boards/intel_s1000_crb/audio/src/ |
D | audio_driver.c | 73 int ret; in audio_driver_process_audio_input() local 76 ret = dmic_read(dmic_device, 0, (void **)&mic_in_buf, &size, SYS_FOREVER_MS); in audio_driver_process_audio_input() 77 if (ret) { in audio_driver_process_audio_input() 78 LOG_ERR("dmic_device read failed %d", ret); in audio_driver_process_audio_input() 83 ret = i2s_read(i2s_host_dev, (void **)&host_in_buf, &size); in audio_driver_process_audio_input() 84 if (ret) { in audio_driver_process_audio_input() 85 LOG_ERR("i2s_host_dev read failed %d", ret); in audio_driver_process_audio_input() 101 int ret; in audio_driver_process_audio_output() local 103 ret = k_mem_slab_alloc(&spk_out_mem_slab, (void *)&spk_out_buf, in audio_driver_process_audio_output() 105 if (ret) { in audio_driver_process_audio_output() [all …]
|
/Zephyr-Core-2.7.6/tests/subsys/canbus/isotp/implementation/src/ |
D | main.c | 66 int ret; in send_sf() local 68 ret = isotp_send(&send_ctx, can_dev, random_data, DATA_SIZE_SF, in send_sf() 70 zassert_equal(ret, 0, "Send returned %d", ret); in send_sf() 76 int remaining_len, ret; in get_sf_net() local 84 ret = memcmp(random_data, buf->data, buf->len); in get_sf_net() 85 zassert_equal(ret, 0, "received data differ"); in get_sf_net() 92 int ret; in get_sf() local 96 ret = isotp_recv(recv_ctx, data_buf_ptr++, 1, K_MSEC(1000)); in get_sf() 97 zassert_equal(ret, 1, "recv returned %d", ret); in get_sf() 98 ret = isotp_recv(recv_ctx, data_buf_ptr++, sizeof(data_buf) - 1, in get_sf() [all …]
|
/Zephyr-Core-2.7.6/samples/drivers/led_lp5562/src/ |
D | main.c | 71 int ret; in set_static_color() local 77 ret = led_set_brightness(dev, LED_R, r); in set_static_color() 78 if (ret) { in set_static_color() 80 return ret; in set_static_color() 83 ret = led_set_brightness(dev, LED_G, g); in set_static_color() 84 if (ret) { in set_static_color() 86 return ret; in set_static_color() 89 ret = led_set_brightness(dev, LED_B, b); in set_static_color() 90 if (ret) { in set_static_color() 92 return ret; in set_static_color() [all …]
|
/Zephyr-Core-2.7.6/tests/kernel/mem_protect/syscalls/src/ |
D | main.c | 42 size_t ret; in z_vrfy_string_nlen() local 44 ret = z_impl_string_nlen((char *)src, maxlen, &err_copy); in z_vrfy_string_nlen() 45 if (!err_copy && Z_SYSCALL_MEMORY_READ(src, ret + 1)) { in z_vrfy_string_nlen() 51 return ret; in z_vrfy_string_nlen() 67 int ret; in z_vrfy_string_alloc_copy() local 74 ret = z_impl_string_alloc_copy(src_copy); in z_vrfy_string_alloc_copy() 77 return ret; in z_vrfy_string_alloc_copy() 92 int ret = z_user_string_copy(kernel_buf, (char *)src, BUF_SIZE); in z_vrfy_string_copy() local 94 if (ret) { in z_vrfy_string_copy() 95 return ret; in z_vrfy_string_copy() [all …]
|
/Zephyr-Core-2.7.6/samples/drivers/clock_control_litex/src/ |
D | main.c | 98 uint32_t ret = 0; in litex_clk_test_single() local 103 ret = clock_control_on(dev, sub_system1); in litex_clk_test_single() 104 if (ret != 0) in litex_clk_test_single() 105 return ret; in litex_clk_test_single() 106 ret = clock_control_on(dev, sub_system2); in litex_clk_test_single() 107 if (ret != 0) in litex_clk_test_single() 108 return ret; in litex_clk_test_single() 123 uint32_t i, ret = 0; in litex_clk_test_freq() local 145 ret = clock_control_on(dev, sub_system); in litex_clk_test_freq() 146 if (ret != 0 && ret != -ENOTSUP) in litex_clk_test_freq() [all …]
|
/Zephyr-Core-2.7.6/drivers/display/ |
D | display_st7735r.c | 85 int ret; in st7735r_transmit() local 88 ret = spi_write_dt(&data->config->bus, &tx_bufs); in st7735r_transmit() 89 if (ret < 0) { in st7735r_transmit() 90 return ret; in st7735r_transmit() 97 ret = spi_write_dt(&data->config->bus, &tx_bufs); in st7735r_transmit() 98 if (ret < 0) { in st7735r_transmit() 99 return ret; in st7735r_transmit() 108 int ret; in st7735r_exit_sleep() local 110 ret = st7735r_transmit(data, ST7735R_CMD_SLEEP_OUT, NULL, 0); in st7735r_exit_sleep() 111 if (ret < 0) { in st7735r_exit_sleep() [all …]
|
/Zephyr-Core-2.7.6/tests/subsys/fs/fat_fs_api/src/ |
D | test_fat_rd_only_mount.c | 41 int ret; in test_ops_on_rd() local 47 ret = fs_mount(&fatfs_mnt); in test_ops_on_rd() 48 zassert_equal(ret, 0, "Expected success", ret); in test_ops_on_rd() 51 ret = fs_open(&fs, "/NAND:/nosome", FS_O_CREATE); in test_ops_on_rd() 52 zassert_equal(ret, -EROFS, "Expected EROFS", ret); in test_ops_on_rd() 53 ret = fs_mkdir("/NAND:/another"); in test_ops_on_rd() 54 zassert_equal(ret, -EROFS, "Expected EROFS", ret); in test_ops_on_rd() 55 ret = fs_rename("/NAND:/testfile.txt", "/NAND:/bestfile.txt"); in test_ops_on_rd() 56 zassert_equal(ret, -EROFS, "Expected EROFS", ret); in test_ops_on_rd() 57 ret = fs_unlink("/NAND:/testfile.txt"); in test_ops_on_rd() [all …]
|
/Zephyr-Core-2.7.6/samples/bluetooth/ipsp/src/ |
D | main.c | 89 int ret; in get_context() local 95 ret = net_context_get(AF_INET6, SOCK_DGRAM, IPPROTO_UDP, udp_recv6); in get_context() 96 if (ret < 0) { in get_context() 97 LOG_ERR("Cannot get network context for IPv6 UDP (%d)", ret); in get_context() 101 ret = net_context_bind(*udp_recv6, (struct sockaddr *)&my_addr6, in get_context() 103 if (ret < 0) { in get_context() 105 ntohs(my_addr6.sin6_port), ret); in get_context() 109 ret = net_context_get(AF_INET6, SOCK_STREAM, IPPROTO_TCP, tcp_recv6); in get_context() 110 if (ret < 0) { in get_context() 111 LOG_ERR("Cannot get network context for IPv6 TCP (%d)", ret); in get_context() [all …]
|
/Zephyr-Core-2.7.6/subsys/debug/coredump/ |
D | coredump_backend_flash_partition.c | 104 int ret; in partition_open() local 108 ret = flash_area_open(FLASH_PARTITION, &backend_ctx.flash_area); in partition_open() 109 if (ret != 0) { in partition_open() 116 return ret; in partition_open() 157 int ret = 0; in data_read() local 173 ret = flash_area_read(backend_ctx.flash_area, offset, in data_read() 175 if (ret != 0) { in data_read() 184 ret = (*cb)(cb_arg, data_read_buf, copy_sz); in data_read() 185 if (ret != 0) { in data_read() 196 ret = (*cb)(cb_arg, NULL, 0); in data_read() [all …]
|
/Zephyr-Core-2.7.6/arch/arc/core/ |
D | arc_connect.c | 39 uint32_t ret = 0; in z_arc_connect_ici_read_status() local 43 ret = z_arc_connect_cmd_readback(); in z_arc_connect_ici_read_status() 46 return ret; in z_arc_connect_ici_read_status() 52 uint32_t ret = 0; in z_arc_connect_ici_check_src() local 56 ret = z_arc_connect_cmd_readback(); in z_arc_connect_ici_check_src() 59 return ret; in z_arc_connect_ici_check_src() 124 uint32_t ret = 0; in z_arc_connect_debug_mask_read() local 129 ret = z_arc_connect_cmd_readback(); in z_arc_connect_debug_mask_read() 132 return ret; in z_arc_connect_debug_mask_read() 149 uint32_t ret = 0; in z_arc_connect_debug_select_read() local [all …]
|
/Zephyr-Core-2.7.6/tests/posix/eventfd_basic/src/ |
D | main.c | 30 int fd, ret; in test_eventfd_write_then_read() local 35 ret = eventfd_write(fd, 3); in test_eventfd_write_then_read() 36 zassert_true(ret == 0, "write ret %d", ret); in test_eventfd_write_then_read() 38 ret = eventfd_write(fd, 2); in test_eventfd_write_then_read() 39 zassert_true(ret == 0, "write ret %d", ret); in test_eventfd_write_then_read() 41 ret = eventfd_read(fd, &val); in test_eventfd_write_then_read() 42 zassert_true(ret == 0, "read ret %d", ret); in test_eventfd_write_then_read() 52 ret = eventfd_write(fd, 3); in test_eventfd_write_then_read() 53 zassert_true(ret == 0, "write ret %d", ret); in test_eventfd_write_then_read() 55 ret = eventfd_write(fd, 2); in test_eventfd_write_then_read() [all …]
|
/Zephyr-Core-2.7.6/subsys/random/ |
D | rand32_ctr_drbg.c | 52 int ret; in ctr_drbg_initialize() local 70 ret = mbedtls_ctr_drbg_seed(&ctr_ctx, in ctr_drbg_initialize() 76 if (ret != 0) { in ctr_drbg_initialize() 85 ret = entropy_get_entropy(entropy_driver, (void *)&entropy, in ctr_drbg_initialize() 87 if (ret != 0) { in ctr_drbg_initialize() 91 ret = tc_ctr_prng_init(&ctr_ctx, in ctr_drbg_initialize() 97 if (ret == TC_CRYPTO_FAIL) { in ctr_drbg_initialize() 109 int ret; in z_impl_sys_csrand_get() local 113 ret = ctr_drbg_initialize(); in z_impl_sys_csrand_get() 114 if (ret != 0) { in z_impl_sys_csrand_get() [all …]
|