/Zephyr-Core-3.7.0/tests/drivers/i2s/i2s_api/src/ |
D | test_i2s_states.c | 23 int ret; in ZTEST_USER() local 29 ret = i2s_configure(dev_i2s_rx, I2S_DIR_RX, &i2s_cfg); in ZTEST_USER() 30 zassert_equal(ret, 0, "Failed to configure I2S RX stream"); in ZTEST_USER() 32 ret = i2s_trigger(dev_i2s_rx, I2S_DIR_RX, I2S_TRIGGER_START); in ZTEST_USER() 33 zassert_equal(ret, -EIO); in ZTEST_USER() 35 ret = i2s_trigger(dev_i2s_rx, I2S_DIR_RX, I2S_TRIGGER_DRAIN); in ZTEST_USER() 36 zassert_equal(ret, -EIO); in ZTEST_USER() 38 ret = i2s_trigger(dev_i2s_rx, I2S_DIR_RX, I2S_TRIGGER_STOP); in ZTEST_USER() 39 zassert_equal(ret, -EIO); in ZTEST_USER() 41 ret = i2s_trigger(dev_i2s_rx, I2S_DIR_RX, I2S_TRIGGER_DROP); in ZTEST_USER() [all …]
|
D | test_i2s_loopback.c | 29 int ret; in ZTEST_USER() local 32 ret = tx_block_write(dev_i2s_tx, 0, 0); in ZTEST_USER() 33 zassert_equal(ret, TC_PASS); in ZTEST_USER() 36 ret = tx_block_write(dev_i2s_tx, 1, 0); in ZTEST_USER() 37 zassert_equal(ret, TC_PASS); in ZTEST_USER() 41 ret = i2s_trigger(dev_i2s_rx, I2S_DIR_RX, I2S_TRIGGER_START); in ZTEST_USER() 42 zassert_equal(ret, 0, "RX START trigger failed"); in ZTEST_USER() 45 ret = i2s_trigger(dev_i2s_tx, I2S_DIR_TX, I2S_TRIGGER_START); in ZTEST_USER() 46 zassert_equal(ret, 0, "TX START trigger failed"); in ZTEST_USER() 48 ret = rx_block_read(dev_i2s_rx, 0); in ZTEST_USER() [all …]
|
D | test_i2s_dir_both_loopback.c | 32 int ret; in ZTEST_USER() local 35 ret = tx_block_write(dev_i2s, 0, 0); in ZTEST_USER() 36 zassert_equal(ret, TC_PASS); in ZTEST_USER() 39 ret = tx_block_write(dev_i2s, 1, 0); in ZTEST_USER() 40 zassert_equal(ret, TC_PASS); in ZTEST_USER() 43 ret = i2s_trigger(dev_i2s, I2S_DIR_BOTH, I2S_TRIGGER_START); in ZTEST_USER() 44 zassert_equal(ret, 0, "RX/TX START trigger failed\n"); in ZTEST_USER() 46 ret = rx_block_read(dev_i2s, 0); in ZTEST_USER() 47 zassert_equal(ret, TC_PASS); in ZTEST_USER() 50 ret = tx_block_write(dev_i2s, 2, 0); in ZTEST_USER() [all …]
|
D | test_i2s_dir_both_states.c | 32 int ret; in ZTEST_USER() local 35 ret = tx_block_write(dev_i2s, 0, 0); in ZTEST_USER() 36 zassert_equal(ret, TC_PASS); in ZTEST_USER() 38 ret = i2s_trigger(dev_i2s, I2S_DIR_BOTH, I2S_TRIGGER_START); in ZTEST_USER() 39 zassert_equal(ret, 0, "RX/TX START trigger failed\n"); in ZTEST_USER() 42 ret = tx_block_write(dev_i2s, 0, 0); in ZTEST_USER() 43 zassert_equal(ret, TC_PASS); in ZTEST_USER() 45 ret = rx_block_read(dev_i2s, 0); in ZTEST_USER() 46 zassert_equal(ret, TC_PASS); in ZTEST_USER() 49 ret = i2s_trigger(dev_i2s, I2S_DIR_BOTH, I2S_TRIGGER_START); in ZTEST_USER() [all …]
|
/Zephyr-Core-3.7.0/tests/subsys/fs/common/ |
D | test_fs_mkfs.c | 22 int ret = 0; in test_fs_mkfs_simple() local 26 ret = fs_mount(fs_mkfs_mp); in test_fs_mkfs_simple() 29 zassert_equal(ret, -EFAULT, "Expected EFAULT got %d", ret); in test_fs_mkfs_simple() 31 zassert_equal(ret, -ENODEV, "Expected ENODEV got %d", ret); in test_fs_mkfs_simple() 35 ret = fs_mkfs(fs_mkfs_type, fs_mkfs_dev_id, NULL, fs_mkfs_dev_id); in test_fs_mkfs_simple() 36 zassert_equal(ret, 0, "Expected successful mkfs (%d)", ret); in test_fs_mkfs_simple() 40 ret = fs_mount(fs_mkfs_mp); in test_fs_mkfs_simple() 41 zassert_equal(ret, 0, "Expected successful mount (%d)", ret); in test_fs_mkfs_simple() 42 ret = fs_unmount(fs_mkfs_mp); in test_fs_mkfs_simple() 43 zassert_equal(ret, 0, "Expected fs_unmount success (%d)", ret); in test_fs_mkfs_simple() [all …]
|
D | test_fs_mount_flags.c | 18 int ret = 0; in test_fs_mount_flags() local 26 ret = fs_mount(mp); in test_fs_mount_flags() 28 zassert_false(ret == 0, "Expected failure", ret); in test_fs_mount_flags() 32 ret = fs_mount(mp); in test_fs_mount_flags() 34 zassert_false(ret == 0, "Expected failure", ret); in test_fs_mount_flags() 38 ret = fs_mount(mp); in test_fs_mount_flags() 40 zassert_equal(ret, 0, "Expected success", ret); in test_fs_mount_flags() 42 ret = fs_open(&fs, "/sml/some", FS_O_CREATE); in test_fs_mount_flags() 43 zassert_equal(ret, 0, "Expected success", ret); in test_fs_mount_flags() 46 ret = fs_mkdir("/sml/other"); in test_fs_mount_flags() [all …]
|
/Zephyr-Core-3.7.0/tests/subsys/fs/fs_api/src/ |
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 …]
|
D | test_fs_dir_file.c | 134 int ret; in test_mount() local 138 ret = fs_mount(NULL); in test_mount() 139 zassert_not_equal(ret, 0, "Mount a NULL fs"); in test_mount() 142 ret = fs_mount(&test_fs_mnt_unsupported_fs); in test_mount() 143 zassert_not_equal(ret, 0, "Mount an unsupported fs"); in test_mount() 148 ret = fs_mount(&test_fs_mnt_invalid_root_1); in test_mount() 149 zassert_not_equal(ret, 0, "Mount to an invalid dir"); in test_mount() 150 ret = fs_mount(&test_fs_mnt_invalid_root_2); in test_mount() 151 zassert_not_equal(ret, 0, "Mount dir name too short"); in test_mount() 152 ret = fs_mount(&test_fs_mnt_invalid_root_3); in test_mount() [all …]
|
/Zephyr-Core-3.7.0/tests/kernel/cache/src/ |
D | test_cache_api.c | 16 int ret; in ZTEST() local 28 ret = sys_cache_instr_flush_all(); in ZTEST() 29 zassert_true((ret == 0) || (ret == -ENOTSUP)); in ZTEST() 31 ret = sys_cache_instr_invd_all(); in ZTEST() 32 zassert_true((ret == 0) || (ret == -ENOTSUP)); in ZTEST() 34 ret = sys_cache_instr_flush_and_invd_all(); in ZTEST() 35 zassert_true((ret == 0) || (ret == -ENOTSUP)); in ZTEST() 37 ret = sys_cache_instr_flush_range(user_buffer, SIZE); in ZTEST() 38 zassert_true((ret == 0) || (ret == -ENOTSUP)); in ZTEST() 40 ret = sys_cache_instr_invd_range(user_buffer, SIZE); in ZTEST() [all …]
|
/Zephyr-Core-3.7.0/drivers/display/ |
D | display_otm8009a.c | 43 int ret; in otm8009a_dcs_write() local 45 ret = mipi_dsi_dcs_write(cfg->mipi_dsi, cfg->channel, cmd, buf, len); in otm8009a_dcs_write() 46 if (ret < 0) { in otm8009a_dcs_write() 47 LOG_ERR("DCS 0x%x write failed! (%d)", cmd, ret); in otm8009a_dcs_write() 48 return ret; in otm8009a_dcs_write() 58 int ret; in otm8009a_mcs_write() local 61 ret = mipi_dsi_dcs_write(cfg->mipi_dsi, cfg->channel, OTM8009A_MCS_ADRSFT, &scmd, 1); in otm8009a_mcs_write() 62 if (ret < 0) { in otm8009a_mcs_write() 63 return ret; in otm8009a_mcs_write() 66 ret = mipi_dsi_dcs_write(cfg->mipi_dsi, cfg->channel, cmd >> 8, buf, len); in otm8009a_mcs_write() [all …]
|
/Zephyr-Core-3.7.0/tests/bluetooth/audio/bap_base/src/ |
D | main.c | 160 int ret; in ZTEST_F() local 164 ret = bt_bap_base_get_size(base); in ZTEST_F() 165 zassert_equal(ret, 70, "Unexpected BASE size: %d", ret); in ZTEST_F() 170 int ret; in ZTEST_F() local 172 ret = bt_bap_base_get_size(NULL); in ZTEST_F() 173 zassert_equal(ret, -EINVAL, "Unexpected return value: %d", ret); in ZTEST_F() 179 int ret; in ZTEST_F() local 183 ret = bt_bap_base_get_pres_delay(base); in ZTEST_F() 184 zassert_equal(ret, 40000, "Unexpected presentation delay: %d", ret); in ZTEST_F() 189 int ret; in ZTEST_F() local [all …]
|
/Zephyr-Core-3.7.0/tests/bluetooth/audio/codec/src/ |
D | main.c | 39 int ret; in ZTEST() local 41 ret = bt_audio_codec_cfg_get_val(&codec_cfg, BT_AUDIO_CODEC_CFG_FREQ, &data); in ZTEST() 42 zassert_equal(ret, sizeof(expected_data), "Unexpected return value %d", ret); in ZTEST() 43 zassert_equal(data[0], expected_data, "Unexpected return value %d", ret); in ZTEST() 56 int ret; in ZTEST() local 58 ret = bt_audio_codec_cfg_get_val(&codec_cfg, BT_AUDIO_CODEC_CFG_FREQ, &data); in ZTEST() 59 zassert_equal(ret, sizeof(expected_data), "Unexpected return value %d", ret); in ZTEST() 60 zassert_equal(data[0], expected_data, "Unexpected return value %d", ret); in ZTEST() 62 ret = bt_audio_codec_cfg_set_val(&codec_cfg, BT_AUDIO_CODEC_CFG_FREQ, in ZTEST() 64 zassert_true(ret > 0, "Unexpected return value %d", ret); in ZTEST() [all …]
|
/Zephyr-Core-3.7.0/drivers/sensor/tdk/mpu9250/ |
D | ak8963.c | 99 int ret; in ak8963_execute_rw() local 106 ret = i2c_reg_write_byte_dt(&cfg->i2c, in ak8963_execute_rw() 109 if (ret < 0) { in ak8963_execute_rw() 111 return ret; in ak8963_execute_rw() 115 ret = i2c_reg_write_byte_dt(&cfg->i2c, in ak8963_execute_rw() 118 if (ret < 0) { in ak8963_execute_rw() 120 return ret; in ak8963_execute_rw() 124 ret = i2c_reg_write_byte_dt(&cfg->i2c, in ak8963_execute_rw() 127 if (ret < 0) { in ak8963_execute_rw() 129 return ret; in ak8963_execute_rw() [all …]
|
/Zephyr-Core-3.7.0/tests/lib/linear_range/src/ |
D | main.c | 68 int ret; in ZTEST() local 71 ret = linear_range_get_value(&r[0], 0U, &val); in ZTEST() 72 zassert_equal(ret, 0); in ZTEST() 75 ret = linear_range_get_value(&r[0], 1U, &val); in ZTEST() 76 zassert_equal(ret, 0); in ZTEST() 79 ret = linear_range_get_value(&r[1], 2U, &val); in ZTEST() 80 zassert_equal(ret, 0); in ZTEST() 83 ret = linear_range_get_value(&r[1], 3U, &val); in ZTEST() 84 zassert_equal(ret, 0); in ZTEST() 87 ret = linear_range_get_value(&r[2], 4U, &val); in ZTEST() [all …]
|
/Zephyr-Core-3.7.0/tests/drivers/watchdog/wdt_error_cases/src/ |
D | main.c | 119 int ret; in ZTEST() local 127 ret = wdt_disable(wdt); in ZTEST() 128 zassert_true(ret == -EFAULT, in ZTEST() 131 ret); in ZTEST() 143 int ret; in ZTEST() local 147 ret = wdt_setup(wdt, DEFAULT_OPTIONS); in ZTEST() 148 zassert_true(ret < 0, in ZTEST() 151 ret); in ZTEST() 164 int ret; in ZTEST() local 167 ret = wdt_feed(wdt, 0); in ZTEST() [all …]
|
/Zephyr-Core-3.7.0/drivers/w1/ |
D | w1_net.c | 66 int ret; in search_slave() local 75 ret = w1_reset_bus(dev); in search_slave() 76 if (ret < 0) { in search_slave() 77 return ret; in search_slave() 79 if (ret == 0) { in search_slave() 84 ret = w1_write_byte(dev, command); in search_slave() 85 if (ret < 0) { in search_slave() 86 return ret; in search_slave() 91 ret = w1_read_bit(dev); in search_slave() 92 if (ret < 0) { in search_slave() [all …]
|
D | w1_ds2482_84_common.h | 107 int ret; in ds2482_84_write() local 111 ret = i2c_write_dt(spec, buf, data ? 2 : 1); in ds2482_84_write() 112 if (ret < 0) { in ds2482_84_write() 113 return ret; in ds2482_84_write() 121 int ret; in ds2482_84_read() local 138 ret = ds2482_84_write(spec, CMD_SRP, &rp); in ds2482_84_read() 139 if (ret < 0) { in ds2482_84_read() 140 return ret; in ds2482_84_read() 147 ret = i2c_read_dt(spec, reg, 1); in ds2482_84_read() 148 if (ret < 0) { in ds2482_84_read() [all …]
|
/Zephyr-Core-3.7.0/samples/sensor/thermometer/src/ |
D | main.c | 18 int ret; in read_temperature() local 20 ret = sensor_sample_fetch_chan(dev, SENSOR_CHAN_AMBIENT_TEMP); in read_temperature() 21 if (ret < 0) { in read_temperature() 22 printf("Could not fetch temperature: %d\n", ret); in read_temperature() 23 return ret; in read_temperature() 26 ret = sensor_channel_get(dev, SENSOR_CHAN_AMBIENT_TEMP, val); in read_temperature() 27 if (ret < 0) { in read_temperature() 28 printf("Could not get temperature: %d\n", ret); in read_temperature() 30 return ret; in read_temperature() 35 int ret; in temp_alert_handler() local [all …]
|
/Zephyr-Core-3.7.0/tests/subsys/fs/ext2/src/ |
D | testfs_ext_specific.c | 44 int64_t ret = 0; in write_to_file() local 49 ret = fs_open(&file, file_path, FS_O_RDWR | FS_O_CREATE); in write_to_file() 50 zassert_equal(ret, 0, "File open failed (ret=%d)", ret); in write_to_file() 52 ret = testfs_write_incrementing(&file, 0, bytes_to_write); in write_to_file() 53 zassert_equal(ret, bytes_to_write, "Different number of bytes written %ld (expected %ld)", in write_to_file() 54 ret, bytes_to_write); in write_to_file() 56 ret = fs_close(&file); in write_to_file() 57 zassert_equal(ret, 0, "File close failed (ret=%d)", ret); in write_to_file() 61 ret = fs_stat(file_path, &entry); in write_to_file() 62 zassert_equal(ret, 0, "File stat failed (ret=%d)", ret); in write_to_file() [all …]
|
/Zephyr-Core-3.7.0/subsys/net/lib/lwm2m/ |
D | lwm2m_rw_link_format.c | 45 int ret; in put_begin() local 73 ret = buf_append(CPKT_BUF_WRITE(out->out_cpkt), init_string, in put_begin() 75 if (ret < 0) { in put_begin() 76 return ret; in put_begin() 87 int ret; in put_corelink_separator() local 89 ret = buf_append(CPKT_BUF_WRITE(out->out_cpkt), &comma, sizeof(comma)); in put_corelink_separator() 90 if (ret < 0) { in put_corelink_separator() 91 return ret; in put_corelink_separator() 101 int ret, len; in put_corelink_version() local 109 ret = buf_append(CPKT_BUF_WRITE(out->out_cpkt), buf, len); in put_corelink_version() [all …]
|
/Zephyr-Core-3.7.0/samples/sensor/grow_r502a/src/ |
D | main.c | 19 int ret; in finger_find() local 21 ret = sensor_attr_set(dev, SENSOR_CHAN_FINGERPRINT, in finger_find() 23 if (ret != 0) { in finger_find() 24 printk("Capture fingerprint failed %d\n", ret); in finger_find() 28 ret = sensor_attr_get(dev, SENSOR_CHAN_FINGERPRINT, in finger_find() 30 if (ret != 0) { in finger_find() 31 printk("Find fingerprint failed %d\n", ret); in finger_find() 40 int ret; in finger_enroll() local 42 ret = sensor_attr_set(dev, SENSOR_CHAN_FINGERPRINT, in finger_enroll() 44 if (ret != 0) { in finger_enroll() [all …]
|
/Zephyr-Core-3.7.0/tests/subsys/edac/ibecc/src/ |
D | dummy.c | 28 int ret; in ZTEST() local 34 ret = edac_ecc_error_log_get(dev, &value); in ZTEST() 35 zassert_equal(ret, -ENOSYS, "dummy api failed"); in ZTEST() 37 ret = edac_ecc_error_log_clear(dev); in ZTEST() 38 zassert_equal(ret, -ENOSYS, "dummy api failed"); in ZTEST() 40 ret = edac_parity_error_log_get(dev, &value); in ZTEST() 41 zassert_equal(ret, -ENOSYS, "dummy api failed"); in ZTEST() 43 ret = edac_parity_error_log_clear(dev); in ZTEST() 44 zassert_equal(ret, -ENOSYS, "dummy api failed"); in ZTEST() 48 ret = edac_errors_cor_get(dev); in ZTEST() [all …]
|
/Zephyr-Core-3.7.0/lib/posix/options/ |
D | env.c | 32 size_t ret; in environ_size() local 38 for (ret = 0; environ[ret] != NULL; ++ret) { in environ_size() 41 return ret; in environ_size() 69 int ret; in getenv() local 76 ret = findenv(name, nsize); in getenv() 77 if (ret < 0) { in getenv() 81 val = environ[ret] + nsize + 1; in getenv() 89 int ret = 0; in getenv_r() local 97 ret = findenv(name, nsize); in getenv_r() 98 if (ret < 0) { in getenv_r() [all …]
|
/Zephyr-Core-3.7.0/include/zephyr/arch/riscv/ |
D | atomic.h | 23 atomic_val_t ret; in atomic_swap() local 26 : "=r"(ret) in atomic_swap() 30 return ret; in atomic_swap() 35 atomic_val_t ret; in atomic_max() local 38 : "=r"(ret) in atomic_max() 42 return ret; in atomic_max() 47 atomic_val_t ret; in atomic_min() local 50 : "=r"(ret) in atomic_min() 54 return ret; in atomic_min() 59 unsigned long ret; in atomic_maxu() local [all …]
|
/Zephyr-Core-3.7.0/tests/subsys/dfu/img_util/src/ |
D | main.c | 23 int ret; in ZTEST() local 25 ret = flash_img_init(&ctx_no_id); in ZTEST() 26 zassert_true(ret == 0, "Flash img init"); in ZTEST() 28 ret = flash_img_init_id(&ctx_id, SLOT1_PARTITION_ID); in ZTEST() 29 zassert_true(ret == 0, "Flash img init id"); in ZTEST() 36 ret = flash_img_init_id(&ctx_id, SLOT0_PARTITION_ID); in ZTEST() 37 zassert_true(ret == 0, "Flash img init id"); in ZTEST() 49 int ret; in ZTEST() local 51 ret = flash_img_init(&ctx); in ZTEST() 52 zassert_true(ret == 0, "Flash img init"); in ZTEST() [all …]
|