/Zephyr-Core-3.6.0/tests/drivers/gpio/gpio_get_direction/src/ |
D | main.c | 40 int rv; in common() local 42 rv = gpio_pin_configure(fixture->port, fixture->pin, fixture->flags); in common() 43 if (rv == -ENOTSUP) { in common() 48 zassert_ok(rv, "gpio_pin_configure() failed: %d", rv); in common() 53 int rv; in ZTEST_F() local 58 rv = gpio_pin_is_input(fixture->port, fixture->pin); in ZTEST_F() 59 if (rv == -ENOSYS) { in ZTEST_F() 64 zassert_equal(false, rv, "gpio_pin_is_input() failed: %d", rv); in ZTEST_F() 66 rv = gpio_pin_is_output(fixture->port, fixture->pin); in ZTEST_F() 67 zassert_equal(false, rv, "gpio_pin_is_output() failed: %d", rv); in ZTEST_F() [all …]
|
/Zephyr-Core-3.6.0/tests/kernel/mutex/sys_mutex/src/ |
D | main.c | 109 int rv; in thread_05() local 114 rv = sys_mutex_lock(&mutex_4, K_SECONDS(1)); in thread_05() 115 if (rv != -EAGAIN) { in thread_05() 135 int rv; in thread_06() local 148 rv = sys_mutex_lock(&mutex_4, K_SECONDS(2)); in thread_06() 149 if (rv != 0) { in thread_06() 170 int rv; in thread_07() local 182 rv = sys_mutex_lock(&mutex_3, K_SECONDS(3)); in thread_07() 183 if (rv != -EAGAIN) { in thread_07() 203 int rv; in thread_08() local [all …]
|
/Zephyr-Core-3.6.0/tests/unit/timeutil/ |
D | test_sync.c | 46 int rv = timeutil_sync_state_update(&ss, &si); in test_state_update() local 48 zassert_equal(rv, -EINVAL, in test_state_update() 49 "invalid init got: %d", rv); in test_state_update() 56 rv = timeutil_sync_state_update(&ss, &si); in test_state_update() 57 zassert_equal(rv, 0, in test_state_update() 58 "valid first init got: %d", rv); in test_state_update() 66 rv = timeutil_sync_state_update(&ss, &si); in test_state_update() 67 zassert_equal(rv, -EINVAL, in test_state_update() 68 "non-increasing ref got: %d", rv); in test_state_update() 77 rv = timeutil_sync_state_update(&ss, &si); in test_state_update() [all …]
|
/Zephyr-Core-3.6.0/drivers/usb/bc12/ |
D | bc12_pi3usb9201.c | 128 int rv; in pi3usb9201_get_mode() local 131 rv = i2c_reg_read_byte_dt(&cfg->i2c, PI3USB9201_REG_CTRL_1, &ctrl1); in pi3usb9201_get_mode() 132 if (rv < 0) { in pi3usb9201_get_mode() 133 return rv; in pi3usb9201_get_mode() 148 int rv; in pi3usb9201_get_status() local 150 rv = i2c_reg_read_byte_dt(&cfg->i2c, PI3USB9201_REG_CLIENT_STS, &status); in pi3usb9201_get_status() 151 if (rv < 0) { in pi3usb9201_get_status() 152 return rv; in pi3usb9201_get_status() 159 rv = i2c_reg_read_byte_dt(&cfg->i2c, PI3USB9201_REG_HOST_STS, &status); in pi3usb9201_get_status() 160 if (rv < 0) { in pi3usb9201_get_status() [all …]
|
/Zephyr-Core-3.6.0/samples/net/sockets/sntp_client/src/ |
D | main.c | 28 int rv; in main() local 36 rv = sntp_init(&ctx, (struct sockaddr *) &addr, in main() 38 if (rv < 0) { in main() 39 LOG_ERR("Failed to init SNTP IPv4 ctx: %d", rv); in main() 44 rv = sntp_query(&ctx, 4 * MSEC_PER_SEC, &sntp_time); in main() 45 if (rv < 0) { in main() 46 LOG_ERR("SNTP IPv4 request failed: %d", rv); in main() 50 LOG_INF("status: %d", rv); in main() 63 rv = sntp_init(&ctx, (struct sockaddr *) &addr6, in main() 65 if (rv < 0) { in main() [all …]
|
/Zephyr-Core-3.6.0/tests/net/socket/udp/src/ |
D | main.c | 171 int rv; in ZTEST() local 180 rv = bind(server_sock, in ZTEST() 183 zassert_equal(rv, 0, "bind failed"); in ZTEST() 192 rv = close(client_sock); in ZTEST() 193 zassert_equal(rv, 0, "close failed"); in ZTEST() 194 rv = close(server_sock); in ZTEST() 195 zassert_equal(rv, 0, "close failed"); in ZTEST() 200 int rv; in ZTEST() local 209 rv = bind(server_sock, in ZTEST() 211 zassert_equal(rv, 0, "bind failed"); in ZTEST() [all …]
|
/Zephyr-Core-3.6.0/tests/net/lib/http_header_fields/src/ |
D | main.c | 48 int rv; member 66 .rv = 0 84 .rv = 0 101 .rv = 0 108 .rv = 1 125 .rv = 0 143 .rv = 0 160 .rv = 0 177 .rv = 0 198 .rv = 0 [all …]
|
/Zephyr-Core-3.6.0/lib/utils/ |
D | timeutil.c | 62 time_t rv = (time_t)time; in timeutil_timegm() local 65 if ((sizeof(rv) == sizeof(int32_t)) in timeutil_timegm() 69 rv = -1; in timeutil_timegm() 72 return rv; in timeutil_timegm() 78 int rv = -EINVAL; in timeutil_sync_state_update() local 87 rv = 0; in timeutil_sync_state_update() 90 rv = 1; in timeutil_sync_state_update() 94 return rv; in timeutil_sync_state_update() 100 int rv = -EINVAL; in timeutil_sync_state_set_skew() local 108 rv = 0; in timeutil_sync_state_set_skew() [all …]
|
D | notify.c | 13 int rv = 0; in sys_notify_validate() local 25 rv = -EINVAL; in sys_notify_validate() 31 rv = -EINVAL; in sys_notify_validate() 36 rv = -EINVAL; in sys_notify_validate() 41 if (rv == 0) { in sys_notify_validate() 45 return rv; in sys_notify_validate() 52 sys_notify_generic_callback rv = NULL; in sys_notify_finalize() local 63 rv = notify->method.callback; in sys_notify_finalize() 83 return rv; in sys_notify_finalize()
|
D | onoff.c | 129 int rv = sys_notify_validate(&cli->notify); in validate_args() local 131 if ((rv == 0) in validate_args() 134 rv = -EINVAL; in validate_args() 137 return rv; in validate_args() 427 int rv = validate_args(mgr, cli); in onoff_request() local 429 if (rv < 0) { in onoff_request() 430 return rv; in onoff_request() 438 rv = -EAGAIN; in onoff_request() 442 rv = state; in onoff_request() 454 rv = -ENOTSUP; in onoff_request() [all …]
|
/Zephyr-Core-3.6.0/tests/net/socket/ |
D | socket_helpers.h | 60 int rv; in prepare_sock_udp_v4() local 71 rv = inet_pton(AF_INET, addr, &sockaddr->sin_addr); in prepare_sock_udp_v4() 72 zassert_equal(rv, 1, "inet_pton failed"); in prepare_sock_udp_v4() 78 int rv; in prepare_sock_udp_v6() local 90 rv = zsock_inet_pton(AF_INET6, addr, &sockaddr->sin6_addr); in prepare_sock_udp_v6() 91 zassert_equal(rv, 1, "inet_pton failed"); in prepare_sock_udp_v6() 97 int rv; in prepare_sock_tcp_v4() local 108 rv = zsock_inet_pton(AF_INET, addr, &sockaddr->sin_addr); in prepare_sock_tcp_v4() 109 zassert_equal(rv, 1, "inet_pton failed"); in prepare_sock_tcp_v4() 115 int rv; in prepare_sock_tcp_v6() local [all …]
|
/Zephyr-Core-3.6.0/tests/kernel/threads/thread_apis/src/ |
D | test_threads_set_priority.c | 51 int rv; in ZTEST() local 56 rv = k_thread_priority_get(k_current_get()); in ZTEST() 57 zassert_equal(rv, prio + 2, in ZTEST() 59 prio + 2, rv); in ZTEST() 63 rv = k_thread_priority_get(k_current_get()); in ZTEST() 64 zassert_equal(rv, prio - 2, in ZTEST() 66 prio - 2, rv); in ZTEST() 70 rv = k_thread_priority_get(k_current_get()); in ZTEST() 71 zassert_equal(rv, prio, in ZTEST() 73 prio, rv); in ZTEST()
|
/Zephyr-Core-3.6.0/tests/kernel/events/sys_event/src/ |
D | main.c | 180 int rv; in test_receive_existing_events() local 188 rv = k_sem_take(&receiver_sem, LONG_TIMEOUT); in test_receive_existing_events() 189 zassert_true(rv == 0); in test_receive_existing_events() 198 rv = k_sem_take(&receiver_sem, LONG_TIMEOUT); in test_receive_existing_events() 199 zassert_true(rv == 0); in test_receive_existing_events() 208 rv = k_sem_take(&receiver_sem, LONG_TIMEOUT); in test_receive_existing_events() 209 zassert_true(rv == 0); in test_receive_existing_events() 218 rv = k_sem_take(&receiver_sem, LONG_TIMEOUT); in test_receive_existing_events() 219 zassert_true(rv == 0); in test_receive_existing_events() 228 rv = k_sem_take(&receiver_sem, LONG_TIMEOUT); in test_receive_existing_events() [all …]
|
/Zephyr-Core-3.6.0/tests/kernel/events/event_api/src/ |
D | test_event_apis.c | 183 int rv; in test_receive_existing_events() local 191 rv = k_sem_take(&receiver_sem, LONG_TIMEOUT); in test_receive_existing_events() 192 zassert_true(rv == 0); in test_receive_existing_events() 201 rv = k_sem_take(&receiver_sem, LONG_TIMEOUT); in test_receive_existing_events() 202 zassert_true(rv == 0); in test_receive_existing_events() 211 rv = k_sem_take(&receiver_sem, LONG_TIMEOUT); in test_receive_existing_events() 212 zassert_true(rv == 0); in test_receive_existing_events() 221 rv = k_sem_take(&receiver_sem, LONG_TIMEOUT); in test_receive_existing_events() 222 zassert_true(rv == 0); in test_receive_existing_events() 231 rv = k_sem_take(&receiver_sem, LONG_TIMEOUT); in test_receive_existing_events() [all …]
|
/Zephyr-Core-3.6.0/tests/subsys/portability/cmsis_rtos_v1/src/ |
D | thread_apis.c | 57 osPriority rv; in thread3() local 63 rv = osThreadGetPriority(id); in thread3() 64 zassert_equal(rv, osPriorityBelowNormal, in thread3() 66 (int)osPriorityBelowNormal, (int)rv); in thread3() 70 rv = osThreadGetPriority(id); in thread3() 71 zassert_equal(rv, osPriorityAboveNormal, in thread3() 73 (int)osPriorityAboveNormal, (int)rv); in thread3() 77 rv = osThreadGetPriority(id); in thread3() 78 zassert_equal(rv, prio, in thread3() 80 (int)prio, (int)rv); in thread3()
|
/Zephyr-Core-3.6.0/tests/modules/thrift/ThriftTest/src/ |
D | main.cpp | 120 int rv; in thrift_test_before() local 128 rv = pthread_attr_init(attrp); in thrift_test_before() 129 zassert_equal(0, rv, "pthread_attr_init failed: %d", rv); in thrift_test_before() 130 rv = pthread_attr_setstack(attrp, ThriftTest_server_stack, in thrift_test_before() 132 zassert_equal(0, rv, "pthread_attr_setstack failed: %d", rv); in thrift_test_before() 136 rv = socketpair(AF_UNIX, SOCK_STREAM, 0, &context.fds.front()); in thrift_test_before() 137 zassert_equal(0, rv, "socketpair failed: %d\n", rv); in thrift_test_before() 143 rv = pthread_create(&context.server_thread, attrp, server_func, nullptr); in thrift_test_before() 144 zassert_equal(0, rv, "pthread_create failed: %d", rv); in thrift_test_before()
|
/Zephyr-Core-3.6.0/drivers/sensor/mcp9808/ |
D | mcp9808.h | 112 uint16_t rv = temp & MCP9808_TEMP_ABS_MASK; in mcp9808_temp_reg_from_signed() local 115 rv |= MCP9808_TEMP_SIGN_BIT; in mcp9808_temp_reg_from_signed() 117 return rv; in mcp9808_temp_reg_from_signed() 125 int rv = reg & MCP9808_TEMP_ABS_MASK; in mcp9808_temp_signed_from_reg() local 131 rv = -(1U + (rv ^ MCP9808_TEMP_ABS_MASK)); in mcp9808_temp_signed_from_reg() 133 return rv; in mcp9808_temp_signed_from_reg()
|
/Zephyr-Core-3.6.0/drivers/flash/ |
D | jesd216.c | 16 bool rv = (res != NULL); in extract_instr() local 18 if (rv) { in extract_instr() 23 return rv; in extract_instr() 31 int rv = -ENOTSUP; in jesd216_bfp_read_support() local 37 rv = 0; in jesd216_bfp_read_support() 43 rv = 0; in jesd216_bfp_read_support() 47 rv = 0; in jesd216_bfp_read_support() 53 rv = extract_instr(dw4 >> 0, res); in jesd216_bfp_read_support() 60 rv = extract_instr(dw3 >> 16, res); in jesd216_bfp_read_support() 68 rv = extract_instr(dw17 >> 16, res); in jesd216_bfp_read_support() [all …]
|
/Zephyr-Core-3.6.0/kernel/ |
D | obj_core.c | 62 struct k_obj_type *rv = NULL; in k_obj_type_find() local 70 rv = type; in k_obj_type_find() 77 return rv; in k_obj_type_find() 173 int rv; in k_obj_core_stats_raw() local 198 rv = desc->raw(obj_core, stats); in k_obj_core_stats_raw() 201 return rv; in k_obj_core_stats_raw() 207 int rv; in k_obj_core_stats_query() local 232 rv = desc->query(obj_core, stats); in k_obj_core_stats_query() 235 return rv; in k_obj_core_stats_query() 240 int rv; in k_obj_core_stats_reset() local [all …]
|
/Zephyr-Core-3.6.0/tests/kernel/fatal/exception/src/ |
D | main.c | 49 volatile int rv; variable 101 rv = TC_FAIL; in entry_cpu_exception() 134 rv = TC_FAIL; in entry_cpu_exception_extend() 143 rv = TC_FAIL; in entry_oops() 152 rv = TC_FAIL; in entry_panic() 160 rv = TC_FAIL; in entry_zephyr_assert() 169 rv = TC_FAIL; in entry_arbitrary_reason() 178 rv = TC_FAIL; in entry_arbitrary_reason_negative() 255 rv = TC_FAIL; in stack_sentinel_swap() 263 rv = TC_FAIL; in stack_hw_overflow() [all …]
|
/Zephyr-Core-3.6.0/tests/subsys/mgmt/ec_host_cmd/simulator/src/ |
D | main.c | 98 int rv; in simulate_rx_data() local 105 rv = ec_host_cmd_backend_sim_data_received(host_to_dut_buffer, in simulate_rx_data() 107 zassert_equal(rv, 0, "Could not send data %d", rv); in simulate_rx_data() 110 rv = k_sem_take(&send_called, K_SECONDS(1)); in simulate_rx_data() 111 zassert_equal(rv, 0, "Send was not called"); in simulate_rx_data() 265 int rv; in ZTEST() local 280 rv = ec_host_cmd_backend_sim_data_received(host_to_dut_buffer, in ZTEST() 282 zassert_equal(rv, 0, "Could not send data %d", rv); in ZTEST() 285 rv = k_sem_take(&send_called, K_SECONDS(1)); in ZTEST() 286 zassert_equal(rv, 0, "Send was not called"); in ZTEST() [all …]
|
/Zephyr-Core-3.6.0/include/zephyr/ |
D | device.h | 513 const device_handle_t *rv = dev->deps; in device_required_handles_get() local 515 if (rv != NULL) { in device_required_handles_get() 518 while ((rv[i] != Z_DEVICE_DEPS_ENDS) && in device_required_handles_get() 519 (rv[i] != Z_DEVICE_DEPS_SEP)) { in device_required_handles_get() 525 return rv; in device_required_handles_get() 549 const device_handle_t *rv = dev->deps; in device_injected_handles_get() local 553 if (rv != NULL) { in device_injected_handles_get() 556 if (*rv == Z_DEVICE_DEPS_SEP) { in device_injected_handles_get() 559 rv++; in device_injected_handles_get() 561 while ((rv[i] != Z_DEVICE_DEPS_ENDS) && in device_injected_handles_get() [all …]
|
/Zephyr-Core-3.6.0/tests/drivers/ipm/src/ |
D | main.c | 80 int rv, i; in main() local 107 rv = TC_PASS; in main() 108 TC_END_RESULT(rv); in main() 109 TC_SUITE_END("test_ipm", rv); in main() 110 TC_END_REPORT(rv); in main()
|
/Zephyr-Core-3.6.0/tests/net/socket/tcp/src/ |
D | main.c | 363 int rv; in test_send_recv_large_common() local 402 rv = setsockopt(c_sock, IPPROTO_TCP, TCP_NODELAY, (char *) &tcp_nodelay, sizeof(int)); in test_send_recv_large_common() 403 zassert_equal(rv, 0, "setsockopt failed (%d)", rv); in test_send_recv_large_common() 517 int rv; in ZTEST() local 534 rv = setsockopt(new_sock, SOL_SOCKET, SO_RCVTIMEO, &optval, in ZTEST() 536 zassert_equal(rv, 0, "setsockopt failed (%d)", errno); in ZTEST() 1041 int rv; in ZTEST() local 1049 rv = zsock_inet_pton(AF_INET, MY_IPV4_ADDR, &s_saddr.sin_addr); in ZTEST() 1050 zassert_equal(rv, 1, "inet_pton failed"); in ZTEST() 1089 int rv; in ZTEST() local [all …]
|
/Zephyr-Core-3.6.0/tests/bluetooth/host/keys/bt_keys_foreach_bond/src/ |
D | main.c | 34 int rv = fill_key_pool_by_id_addr(testing_id_addr_pair_lut, in type_not_set_ts_setup() local 37 zassert_true(rv == 0, "Failed to fill keys pool list, error code %d", -rv); in type_not_set_ts_setup() 78 int rv = fill_key_pool_by_id_addr(testing_id_addr_pair_lut, in type_set_ts_setup() local 81 zassert_true(rv == 0, "Failed to fill keys pool list, error code %d", -rv); in type_set_ts_setup()
|