/Zephyr-Core-3.5.0/tests/crypto/tinycrypt_hmac_prng/src/ |
D | hmac_prng.c | 73 unsigned int result = TC_PASS; in do_hmac_prng_pr_false_test() local 101 result = check_result(testnum, vec->returnedbits, vec->returnedbitslen, in do_hmac_prng_pr_false_test() 103 return result; in do_hmac_prng_pr_false_test() 108 unsigned int result = TC_PASS; in test_1() local 163 result = do_hmac_prng_pr_false_test(1, &vec); in test_1() 165 return result; in test_1() 170 unsigned int result = TC_PASS; in test_2() local 225 result = do_hmac_prng_pr_false_test(2, &vec); in test_2() 227 return result; in test_2() 232 unsigned int result = TC_PASS; in test_3() local [all …]
|
/Zephyr-Core-3.5.0/drivers/sensor/icm42605/ |
D | icm42605_setup.c | 21 int result; in icm42605_set_fs() local 23 result = inv_spi_read(&cfg->spi, REG_ACCEL_CONFIG0, &databuf, 1); in icm42605_set_fs() 24 if (result) { in icm42605_set_fs() 25 return result; in icm42605_set_fs() 31 result = inv_spi_single_write(&cfg->spi, REG_ACCEL_CONFIG0, &databuf); in icm42605_set_fs() 33 result = inv_spi_read(&cfg->spi, REG_GYRO_CONFIG0, &databuf, 1); in icm42605_set_fs() 35 if (result) { in icm42605_set_fs() 36 return result; in icm42605_set_fs() 42 result = inv_spi_single_write(&cfg->spi, REG_GYRO_CONFIG0, &databuf); in icm42605_set_fs() 44 if (result) { in icm42605_set_fs() [all …]
|
/Zephyr-Core-3.5.0/subsys/bluetooth/audio/shell/ |
D | tbs_client.c | 30 int result = 0; in cmd_tbs_client_discover() local 32 result = bt_tbs_client_discover(default_conn); in cmd_tbs_client_discover() 33 if (result != 0) { in cmd_tbs_client_discover() 34 shell_print(sh, "Fail: %d", result); in cmd_tbs_client_discover() 37 return result; in cmd_tbs_client_discover() 47 int result = 0; in cmd_tbs_client_set_signal_strength_interval() local 56 inst_index = shell_strtoul(argv[1], 0, &result); in cmd_tbs_client_set_signal_strength_interval() 57 if (result != 0) { in cmd_tbs_client_set_signal_strength_interval() 60 result); in cmd_tbs_client_set_signal_strength_interval() 76 interval = shell_strtoul(argv[argc - 1], 0, &result); in cmd_tbs_client_set_signal_strength_interval() [all …]
|
D | tbs.c | 66 int result = 0; in cmd_tbs_accept() local 68 call_index = shell_strtoul(argv[1], 0, &result); in cmd_tbs_accept() 69 if (result != 0) { in cmd_tbs_accept() 70 shell_error(sh, "Could not parse call_index: %d", result); in cmd_tbs_accept() 81 result = bt_tbs_accept((uint8_t)call_index); in cmd_tbs_accept() 82 if (result != BT_TBS_RESULT_CODE_SUCCESS) { in cmd_tbs_accept() 83 shell_print(sh, "TBS failed: %d", result); in cmd_tbs_accept() 89 return result; in cmd_tbs_accept() 96 int result = 0; in cmd_tbs_terminate() local 98 call_index = shell_strtoul(argv[1], 0, &result); in cmd_tbs_terminate() [all …]
|
D | micp_mic_dev.c | 105 int result; in cmd_micp_mic_dev_param() local 134 result = bt_micp_mic_dev_register(&micp_param); in cmd_micp_mic_dev_param() 135 if (result != 0) { in cmd_micp_mic_dev_param() 136 shell_error(sh, "MICP register failed: %d", result); in cmd_micp_mic_dev_param() 137 return result; in cmd_micp_mic_dev_param() 140 shell_print(sh, "MICP initialized: %d", result); in cmd_micp_mic_dev_param() 143 result = bt_micp_mic_dev_included_get(&micp_included); in cmd_micp_mic_dev_param() 144 if (result != 0) { in cmd_micp_mic_dev_param() 145 shell_error(sh, "MICP get failed: %d", result); in cmd_micp_mic_dev_param() 149 return result; in cmd_micp_mic_dev_param() [all …]
|
D | vcp_vol_rend.c | 162 int result = 0; in cmd_vcp_vol_rend_init() local 212 vcp_register_param.step = shell_strtoul(kwarg, 10, &result); in cmd_vcp_vol_rend_init() 214 vcp_register_param.mute = shell_strtobool(kwarg, 10, &result); in cmd_vcp_vol_rend_init() 216 vcp_register_param.volume = shell_strtoul(kwarg, 10, &result); in cmd_vcp_vol_rend_init() 226 if (result != 0) { in cmd_vcp_vol_rend_init() 234 result = bt_vcp_vol_rend_register(&vcp_register_param); in cmd_vcp_vol_rend_init() 235 if (result) { in cmd_vcp_vol_rend_init() 236 shell_print(sh, "Fail: %d", result); in cmd_vcp_vol_rend_init() 237 return result; in cmd_vcp_vol_rend_init() 240 result = bt_vcp_vol_rend_included_get(&vcp_included); in cmd_vcp_vol_rend_init() [all …]
|
D | vcp_vol_ctlr.c | 329 int result; in cmd_vcp_vol_ctlr_discover() local 335 result = bt_vcp_vol_ctlr_cb_register(&vcp_cbs); in cmd_vcp_vol_ctlr_discover() 336 if (result != 0) { in cmd_vcp_vol_ctlr_discover() 337 shell_print(sh, "CB register failed: %d", result); in cmd_vcp_vol_ctlr_discover() 338 return result; in cmd_vcp_vol_ctlr_discover() 346 result = bt_vcp_vol_ctlr_discover(default_conn, &vcp_vol_ctlr); in cmd_vcp_vol_ctlr_discover() 347 if (result != 0) { in cmd_vcp_vol_ctlr_discover() 348 shell_print(sh, "Fail: %d", result); in cmd_vcp_vol_ctlr_discover() 351 return result; in cmd_vcp_vol_ctlr_discover() 357 int result; in cmd_vcp_vol_ctlr_state_get() local [all …]
|
D | micp_mic_ctlr.c | 221 int result; in cmd_micp_mic_ctlr_discover() local 227 result = bt_micp_mic_ctlr_cb_register(&micp_cbs); in cmd_micp_mic_ctlr_discover() 228 if (result != 0) { in cmd_micp_mic_ctlr_discover() 229 shell_print(sh, "Failed to register callbacks: %d", result); in cmd_micp_mic_ctlr_discover() 236 result = bt_micp_mic_ctlr_discover(default_conn, &micp_mic_ctlr); in cmd_micp_mic_ctlr_discover() 237 if (result != 0) { in cmd_micp_mic_ctlr_discover() 238 shell_print(sh, "Fail: %d", result); in cmd_micp_mic_ctlr_discover() 241 return result; in cmd_micp_mic_ctlr_discover() 247 int result; in cmd_micp_mic_ctlr_mute_get() local 253 result = bt_micp_mic_ctlr_mute_get(micp_mic_ctlr); in cmd_micp_mic_ctlr_mute_get() [all …]
|
D | mcc.c | 560 int result; in cmd_mcc_init() local 616 result = bt_mcc_init(&cb); in cmd_mcc_init() 618 if (result) { in cmd_mcc_init() 619 shell_error(sh, "Fail: %d", result); in cmd_mcc_init() 621 return result; in cmd_mcc_init() 628 int result = 0; in cmd_mcc_discover_mcs() local 631 subscribe = shell_strtobool(argv[1], 0, &result); in cmd_mcc_discover_mcs() 632 if (result != 0) { in cmd_mcc_discover_mcs() 634 result); in cmd_mcc_discover_mcs() 640 result = bt_mcc_discover_mcs(default_conn, (bool)subscribe); in cmd_mcc_discover_mcs() [all …]
|
/Zephyr-Core-3.5.0/tests/unit/math_extras/ |
D | tests.inc | 13 uint32_t result = 42; 15 zassert_false(u32_add_overflow(2, 3, &result)); 16 zassert_equal(result, 5); 18 zassert_false(u32_add_overflow(2, 0, &result)); 19 zassert_equal(result, 2); 21 zassert_false(u32_add_overflow(0, 3, &result)); 22 zassert_equal(result, 3); 24 zassert_false(u32_add_overflow(0, UINT32_MAX, &result)); 25 zassert_equal(result, UINT32_MAX); 26 zassert_true(u32_add_overflow(1, UINT32_MAX, &result)); [all …]
|
/Zephyr-Core-3.5.0/subsys/net/lib/lwm2m/ |
D | lwm2m_senml_cbor_decode.c | 18 static bool decode_repeated_record_bn(zcbor_state_t *state, struct record_bn *result); 19 static bool decode_repeated_record_bt(zcbor_state_t *state, struct record_bt *result); 20 static bool decode_repeated_record_n(zcbor_state_t *state, struct record_n *result); 21 static bool decode_repeated_record_t(zcbor_state_t *state, struct record_t *result); 22 static bool decode_repeated_record_union(zcbor_state_t *state, struct record_union_ *result); 23 static bool decode_value(zcbor_state_t *state, struct value_ *result); 24 static bool decode_key_value_pair(zcbor_state_t *state, struct key_value_pair *result); 26 struct record__key_value_pair *result); 27 static bool decode_record(zcbor_state_t *state, struct record *result); 28 static bool decode_lwm2m_senml(zcbor_state_t *state, struct lwm2m_senml *result); [all …]
|
/Zephyr-Core-3.5.0/drivers/pwm/ |
D | pwm_max31790.c | 116 int result; in max31790_read_register() local 118 result = i2c_reg_read_byte_dt(&config->i2c, address, value); in max31790_read_register() 119 if (result != 0) { in max31790_read_register() 120 LOG_ERR("unable to read register 0x%02X, error %i", address, result); in max31790_read_register() 125 return result; in max31790_read_register() 131 int result; in max31790_write_register_uint8() local 134 result = i2c_reg_write_byte_dt(&config->i2c, address, value); in max31790_write_register_uint8() 135 if (result != 0) { in max31790_write_register_uint8() 136 LOG_ERR("unable to write register 0x%02X, error %i", address, result); in max31790_write_register_uint8() 139 return result; in max31790_write_register_uint8() [all …]
|
/Zephyr-Core-3.5.0/drivers/sensor/tmp108/ |
D | tmp108.c | 25 int result; in tmp108_reg_read() local 27 result = i2c_burst_read_dt(&cfg->i2c_spec, reg, (uint8_t *) val, 2); in tmp108_reg_read() 29 if (result < 0) { in tmp108_reg_read() 30 return result; in tmp108_reg_read() 42 int result; in tmp108_reg_write() local 47 result = i2c_write_dt(&cfg->i2c_spec, tx_buf, sizeof(tx_buf)); in tmp108_reg_write() 49 if (result < 0) { in tmp108_reg_write() 50 return result; in tmp108_reg_write() 59 int result; in tmp108_write_config() local 61 result = tmp108_reg_read(dev, TI_TMP108_REG_CONF, &config); in tmp108_write_config() [all …]
|
/Zephyr-Core-3.5.0/include/zephyr/sys/ |
D | math_extras_impl.h | 32 static inline bool u16_add_overflow(uint16_t a, uint16_t b, uint16_t *result) in u16_add_overflow() argument 34 return __builtin_add_overflow(a, b, result); in u16_add_overflow() 37 static inline bool u32_add_overflow(uint32_t a, uint32_t b, uint32_t *result) in u32_add_overflow() argument 39 return __builtin_add_overflow(a, b, result); in u32_add_overflow() 42 static inline bool u64_add_overflow(uint64_t a, uint64_t b, uint64_t *result) in u64_add_overflow() argument 44 return __builtin_add_overflow(a, b, result); in u64_add_overflow() 47 static inline bool size_add_overflow(size_t a, size_t b, size_t *result) in size_add_overflow() argument 49 return __builtin_add_overflow(a, b, result); in size_add_overflow() 52 static inline bool u16_add_overflow(uint16_t a, uint16_t b, uint16_t *result) in u16_add_overflow() argument 56 *result = c; in u16_add_overflow() [all …]
|
/Zephyr-Core-3.5.0/tests/bluetooth/host/id/bt_id_scan_random_addr_check/src/ |
D | main.c | 41 bool result; in ZTEST() local 45 result = bt_id_scan_random_addr_check(); in ZTEST() 47 zassert_true(result, "Incorrect result was returned"); in ZTEST() 62 bool result; in ZTEST() local 66 result = bt_id_scan_random_addr_check(); in ZTEST() 68 zassert_true(result, "Incorrect result was returned"); in ZTEST() 86 bool result; in ZTEST() local 93 result = bt_id_scan_random_addr_check(); in ZTEST() 95 zassert_true(result, "Incorrect result was returned"); in ZTEST() 113 bool result; in ZTEST() local [all …]
|
/Zephyr-Core-3.5.0/tests/bluetooth/host/id/bt_id_adv_random_addr_check/src/ |
D | main.c | 41 bool result; in ZTEST() local 46 result = bt_id_adv_random_addr_check(&adv_param); in ZTEST() 48 zassert_true(result, "Incorrect result was returned"); in ZTEST() 62 bool result; in ZTEST() local 67 result = bt_id_adv_random_addr_check(&adv_param); in ZTEST() 69 zassert_true(result, "Incorrect result was returned"); in ZTEST() 86 bool result; in ZTEST() local 95 result = bt_id_adv_random_addr_check(&adv_param); in ZTEST() 97 zassert_true(result, "Incorrect result was returned"); in ZTEST() 114 bool result; in ZTEST() local [all …]
|
/Zephyr-Core-3.5.0/tests/crypto/tinycrypt/src/ |
D | ccm_mode.c | 78 uint32_t result = TC_PASS; in do_test() local 86 result = tc_ccm_config(&c, &sched, nonce, nlen, mlen); in do_test() 89 zassert_true(result, "CCM config failed"); in do_test() 91 result = tc_ccm_generation_encryption(ciphertext, sizeof(ciphertext), in do_test() 95 zassert_true(result, "ccm_encrypt failed"); in do_test() 106 result = tc_ccm_decryption_verification(decrypted, sizeof(decrypted), in do_test() 111 if (result == 0U) { in do_test() 119 result = TC_PASS; in do_test() 120 return result; in do_test() 125 uint32_t result = TC_PASS; in ZTEST() local [all …]
|
D | aes.c | 73 uint32_t result = TC_PASS; in test_aes_key_chain() local 99 result = check_result(1, expected.words, in test_aes_key_chain() 104 zassert_false(result, in test_aes_key_chain() 113 int result = TC_PASS; in test_aes_vectors() local 137 result = check_result(2, expected, sizeof(expected), in test_aes_vectors() 141 zassert_false(result, in test_aes_vectors() 150 uint32_t result = TC_PASS; in var_text_test() local 153 result = check_result(r, out, NUM_OF_NIST_KEYS, in var_text_test() 155 if (result != TC_FAIL) { in var_text_test() 158 result = TC_FAIL; in var_text_test() [all …]
|
D | sha256.c | 56 uint32_t result = TC_PASS; in ZTEST() local 73 result = check_result(1, expected, sizeof(expected), in ZTEST() 77 zassert_false(result, "SHA256 test #1 failed."); in ZTEST() 85 uint32_t result = TC_PASS; in ZTEST() local 104 result = check_result(2, expected, sizeof(expected), in ZTEST() 108 zassert_false(result, "SHA256 test #2 failed."); in ZTEST() 113 uint32_t result = TC_PASS; in ZTEST() local 131 result = check_result(3, expected, sizeof(expected), in ZTEST() 135 zassert_false(result, "SHA256 test #3 failed."); in ZTEST() 141 uint32_t result = TC_PASS; in ZTEST() local [all …]
|
D | hmac.c | 50 uint32_t result = TC_PASS; in do_hmac_test() local 55 result = check_result(testnum, expected, expectedlen, in do_hmac_test() 57 return result; in do_hmac_test() 65 uint32_t result = TC_PASS; in ZTEST() local 89 result = do_hmac_test(&h, 1, data, sizeof(data), in ZTEST() 93 zassert_false(result, "HMAC test #7 failed"); in ZTEST() 98 uint32_t result = TC_PASS; in ZTEST() local 123 result = do_hmac_test(&h, 2, data, sizeof(data), in ZTEST() 127 zassert_false(result, "HMAC test #7 failed"); in ZTEST() 132 uint32_t result = TC_PASS; in ZTEST() local [all …]
|
/Zephyr-Core-3.5.0/tests/bluetooth/host/ecc/bt_dh_key_gen/src/ |
D | test_suite_invalid_inputs.c | 71 int result; in ZTEST() local 86 result = bt_dh_key_gen(remote_pk, bt_dh_key_unreachable_cb); in ZTEST() 88 zassert_true(result == -EALREADY, "Unexpected error code '%d' was returned", result); in ZTEST() 109 int result; in ZTEST() local 124 result = bt_dh_key_gen(remote_pk, bt_dh_key_unreachable_2nd_trial_cb); in ZTEST() 126 zassert_true(result == -EBUSY, "Unexpected error code '%d' was returned", result); in ZTEST() 141 int result; in ZTEST() local 146 result = bt_dh_key_gen(remote_pk, bt_dh_key_unreachable_cb); in ZTEST() 148 zassert_true(result == -EBUSY, "Unexpected error code '%d' was returned", result); in ZTEST() 163 int result; in ZTEST() local [all …]
|
/Zephyr-Core-3.5.0/tests/bluetooth/host/ecc/bt_pub_key_gen/src/ |
D | test_suite_invalid_inputs.c | 79 int result; in ZTEST() local 87 result = bt_pub_key_gen(&new_cb); in ZTEST() 89 zassert_true(result == -ENOTSUP, "Unexpected error code '%d' was returned", result); in ZTEST() 104 int result; in ZTEST() local 112 result = bt_pub_key_gen(&new_cb); in ZTEST() 114 zassert_true(result == -ENOTSUP, "Unexpected error code '%d' was returned", result); in ZTEST() 130 int result; in ZTEST() local 139 result = bt_pub_key_gen(&new_cb); in ZTEST() 141 zassert_true(result == -EALREADY, "Unexpected error code '%d' was returned", result); in ZTEST() 164 int result; in ZTEST() local [all …]
|
/Zephyr-Core-3.5.0/samples/net/mqtt_publisher/ |
D | docker-test.sh | 19 result=$? 21 if [ $result -ne 0 ]; then 22 return $result 36 result=$? 38 if [ $result -ne 0 ]; then 39 return $result 43 return $result 55 result=$?
|
/Zephyr-Core-3.5.0/subsys/testsuite/include/zephyr/ |
D | tc_util.h | 85 static inline const char *TC_RESULT_TO_STR(int result) in TC_RESULT_TO_STR() argument 87 switch (result) { in TC_RESULT_TO_STR() 168 #define TC_END(result, fmt, ...) PRINT_DATA(fmt, ##__VA_ARGS__) argument 174 #define TC_END_PRINT(result, fmt, ...) PRINT_DATA(fmt, ##__VA_ARGS__); PRINT_LINE argument 176 #define TC_END_PRINT(result, fmt, ...) print_nothing(fmt) argument 179 #define TC_END_PRINT(result, fmt, ...) PRINT_DATA(fmt, ##__VA_ARGS__); PRINT_LINE argument 185 #define Z_TC_END_RESULT(result, func) \ argument 187 TC_END_PRINT(result, " %s - %s in %u.%03u seconds\n", \ 188 TC_RESULT_TO_STR(result), func, tc_spend_time/1000, \ 194 #define TC_END_RESULT(result) \ argument [all …]
|
/Zephyr-Core-3.5.0/drivers/flash/ |
D | flash_shell.c | 78 int result; in cmd_erase() local 81 result = parse_helper(sh, &argc, &argv, &flash_dev, &page_addr); in cmd_erase() 82 if (result) { in cmd_erase() 83 return result; in cmd_erase() 90 result = flash_get_page_info_by_offs(flash_dev, page_addr, in cmd_erase() 93 if (result != 0) { in cmd_erase() 95 "code %d.", result); in cmd_erase() 102 result = flash_erase(flash_dev, page_addr, size); in cmd_erase() 104 if (result) { in cmd_erase() 105 shell_error(sh, "Erase Failed, code %d.", result); in cmd_erase() [all …]
|