Home
last modified time | relevance | path

Searched refs:ret (Results 1 – 25 of 544) sorted by relevance

12345678910>>...22

/hal_espressif-2.7.6/examples/bluetooth/esp_ble_mesh/common_components/light_driver/
Dlight_driver.c123 esp_err_t ret = ESP_OK; in light_driver_deinit() local
127 return ret; in light_driver_deinit()
140 esp_err_t ret = 0; in light_driver_set_rgb() local
142 ret = iot_led_set_channel(CHANNEL_ID_RED, red, 0); in light_driver_set_rgb()
143 LIGHT_ERROR_CHECK(ret < 0, ret, "iot_led_set_channel, ret: %d", ret); in light_driver_set_rgb()
145 ret = iot_led_set_channel(CHANNEL_ID_GREEN, green, 0); in light_driver_set_rgb()
146 LIGHT_ERROR_CHECK(ret < 0, ret, "iot_led_set_channel, ret: %d", ret); in light_driver_set_rgb()
148 ret = iot_led_set_channel(CHANNEL_ID_BLUE, blue, 0); in light_driver_set_rgb()
149 LIGHT_ERROR_CHECK(ret < 0, ret, "iot_led_set_channel, ret: %d", ret); in light_driver_set_rgb()
151 ret = iot_led_set_channel(CHANNEL_ID_WARM, 0, 0); in light_driver_set_rgb()
[all …]
/hal_espressif-2.7.6/examples/protocols/smtp_client/main/
Dsmtp_client_example_main.c59 #define VALIDATE_MBEDTLS_RETURN(ret, min_valid_ret, max_valid_ret, goto_label) \ argument
61 if (ret < min_valid_ret || ret > max_valid_ret) { \
86 int ret; in write_and_get_response() local
96 if (len && (ret = mbedtls_net_send(sock_fd, buf, len)) <= 0) { in write_and_get_response()
97 ESP_LOGE(TAG, "mbedtls_net_send failed with error -0x%x", -ret); in write_and_get_response()
98 return ret; in write_and_get_response()
103 ret = mbedtls_net_recv(sock_fd, data, len); in write_and_get_response()
105 if (ret <= 0) { in write_and_get_response()
106 ESP_LOGE(TAG, "mbedtls_net_recv failed with error -0x%x", -ret); in write_and_get_response()
112 len = ret; in write_and_get_response()
[all …]
/hal_espressif-2.7.6/examples/protocols/cbor/main/
Dcbor_example_main.c21 ret = ret_value; \
45 CborError ret = CborNoError; in example_dump_cbor_buffer() local
55 ret = cbor_value_enter_container(it, &recursed); in example_dump_cbor_buffer()
56 CBOR_CHECK(ret, "enter container failed", err, ret); in example_dump_cbor_buffer()
57 ret = example_dump_cbor_buffer(&recursed, nestingLevel + 1); in example_dump_cbor_buffer()
58 CBOR_CHECK(ret, "recursive dump failed", err, ret); in example_dump_cbor_buffer()
59 ret = cbor_value_leave_container(it, &recursed); in example_dump_cbor_buffer()
60 CBOR_CHECK(ret, "leave container failed", err, ret); in example_dump_cbor_buffer()
69 ret = cbor_value_enter_container(it, &recursed); in example_dump_cbor_buffer()
70 CBOR_CHECK(ret, "enter container failed", err, ret); in example_dump_cbor_buffer()
[all …]
/hal_espressif-2.7.6/examples/bluetooth/esp_ble_mesh/ble_mesh_coex_test/components/case/
Dble_unit.c128 esp_err_t ret; in ble_gap_util_set_adv_data() local
130 ret = esp_ble_gap_config_adv_data_raw(adv_data, adv_data_len); in ble_gap_util_set_adv_data()
131 if (ret != ESP_OK) { in ble_gap_util_set_adv_data()
132 ESP_LOGE(TAG, "esp_ble_gap_config_adv_data_raw error, %d", ret); in ble_gap_util_set_adv_data()
133 return ret; in ble_gap_util_set_adv_data()
135 ret = esp_ble_gap_config_scan_rsp_data_raw(scan_rsp_data, scan_rsp_data_len); in ble_gap_util_set_adv_data()
136 if (ret != ESP_OK) { in ble_gap_util_set_adv_data()
137 ESP_LOGE(TAG, "esp_ble_gap_config_scan_rsp_data_raw error, %d", ret); in ble_gap_util_set_adv_data()
138 return ret; in ble_gap_util_set_adv_data()
150 esp_err_t ret; in ble_gap_util_start_adv() local
[all …]
Dwifi_unit.c26 esp_err_t ret = 0; in wifi_unit_client_establish() local
43 ret = connect(s, (struct sockaddr *)&sock_addr, sizeof(sock_addr)); in wifi_unit_client_establish()
44 if (ret == 0) { in wifi_unit_client_establish()
51 return ret; in wifi_unit_client_establish()
56 esp_err_t ret = -1; in wifi_unit_server_establish() local
74 ret = bind(ls_sock, (struct sockaddr *)&local_addr, sizeof(local_addr)); in wifi_unit_server_establish()
75 if (ret != 0) { in wifi_unit_server_establish()
77 return ret; in wifi_unit_server_establish()
80 ret = listen(ls_sock, 1); in wifi_unit_server_establish()
81 if (ret < 0) { in wifi_unit_server_establish()
[all …]
Drun_tc.c23 const char *ret = NULL; in coex_get_case_env() local
25 ret = test_env->ap_ssid; in coex_get_case_env()
27 ret = test_env->ap_password; in coex_get_case_env()
29 ret = test_env->test_port; in coex_get_case_env()
31 ret = test_env->server_ip; in coex_get_case_env()
33 ret = test_env->duration; in coex_get_case_env()
36 return ret; in coex_get_case_env()
60 esp_err_t ret; in create_statistic_timer() local
67 ret = esp_timer_create(&tca, timer_hdl); in create_statistic_timer()
68 if (ret != ESP_OK) { in create_statistic_timer()
[all …]
/hal_espressif-2.7.6/examples/peripherals/secure_element/atecc608_ecdsa/main/
Decdsa_example_main.c51 int ret; in configure_mbedtls_rng() local
58 ret = mbedtls_ctr_drbg_seed(&ctr_drbg, mbedtls_entropy_func, &entropy, in configure_mbedtls_rng()
60 if (ret != 0) { in configure_mbedtls_rng()
61 ESP_LOGI(TAG, " failed ! mbedtls_ctr_drbg_seed returned %d", ret); in configure_mbedtls_rng()
65 return ret; in configure_mbedtls_rng()
113 int ret; in atca_ecdsa_test() local
122 ret = atca_mbedtls_pk_init(&pkey, 0); in atca_ecdsa_test()
123 if (ret != 0) { in atca_ecdsa_test()
124 ESP_LOGI(TAG, " failed ! atca_mbedtls_pk_init returned %02x", ret); in atca_ecdsa_test()
131 ret = mbedtls_pk_setup(&pkey, in atca_ecdsa_test()
[all …]
/hal_espressif-2.7.6/components/esp-tls/
Desp_tls_mbedtls.c73 int ret; in esp_create_mbedtls_handle() local
100 if ((ret = mbedtls_ctr_drbg_seed(&tls->ctr_drbg, in esp_create_mbedtls_handle()
102 ESP_LOGE(TAG, "mbedtls_ctr_drbg_seed returned -0x%x", -ret); in esp_create_mbedtls_handle()
103 ESP_INT_EVENT_TRACKER_CAPTURE(tls->error_handle, ESP_TLS_ERR_TYPE_MBEDTLS, -ret); in esp_create_mbedtls_handle()
114 if ((ret = mbedtls_ssl_setup(&tls->ssl, &tls->conf)) != 0) { in esp_create_mbedtls_handle()
115 ESP_LOGE(TAG, "mbedtls_ssl_setup returned -0x%x", -ret); in esp_create_mbedtls_handle()
116 ESP_INT_EVENT_TRACKER_CAPTURE(tls->error_handle, ESP_TLS_ERR_TYPE_MBEDTLS, -ret); in esp_create_mbedtls_handle()
132 int ret; in esp_mbedtls_handshake() local
133 ret = mbedtls_ssl_handshake(&tls->ssl); in esp_mbedtls_handshake()
134 if (ret == 0) { in esp_mbedtls_handshake()
[all …]
/hal_espressif-2.7.6/components/espcoredump/src/
Dcore_dump_elf.c180 int ret = elf_write_segment_header(self, &seg_hdr); in elf_add_segment() local
181 ELF_CHECK_ERR((ret > 0), ret, in elf_add_segment()
182 "Write ELF segment data failure (%d)", ret); in elf_add_segment()
184 return ret; in elf_add_segment()
287 int ret = elf_add_segment(self, PT_LOAD, in elf_add_stack() local
291 return ret; in elf_add_stack()
301 int ret = elf_add_segment(self, PT_LOAD, in elf_add_tcb() local
305 return ret; in elf_add_tcb()
310 int ret = ELF_PROC_ERR_OTHER; in elf_process_task_tcb() local
315 ret = elf_add_tcb(self, task); in elf_process_task_tcb()
[all …]
/hal_espressif-2.7.6/examples/protocols/https_mbedtls/main/
Dhttps_mbedtls_example_main.c69 int ret, flags, len; in https_get_task() local
86 if((ret = mbedtls_ctr_drbg_seed(&ctr_drbg, mbedtls_entropy_func, &entropy, in https_get_task()
89 ESP_LOGE(TAG, "mbedtls_ctr_drbg_seed returned %d", ret); in https_get_task()
95 ret = esp_crt_bundle_attach(&conf); in https_get_task()
97 if(ret < 0) in https_get_task()
99 ESP_LOGE(TAG, "esp_crt_bundle_attach returned -0x%x\n\n", -ret); in https_get_task()
106 if((ret = mbedtls_ssl_set_hostname(&ssl, WEB_SERVER)) != 0) in https_get_task()
108 ESP_LOGE(TAG, "mbedtls_ssl_set_hostname returned -0x%x", -ret); in https_get_task()
114 if((ret = mbedtls_ssl_config_defaults(&conf, in https_get_task()
119 ESP_LOGE(TAG, "mbedtls_ssl_config_defaults returned %d", ret); in https_get_task()
[all …]
/hal_espressif-2.7.6/examples/peripherals/sdio/host/main/
Dapp_main.c101 esp_err_t ret; in slave_reset() local
103 ret = essl_write_reg(handle, 0, JOB_RESET, NULL, TIMEOUT_MAX); in slave_reset()
104 if (ret != ESP_OK) { in slave_reset()
105 return ret; in slave_reset()
107 ret = essl_send_slave_intr(handle, BIT(SLAVE_INTR_NOTIFY), TIMEOUT_MAX); in slave_reset()
108 if (ret != ESP_OK) { in slave_reset()
109 return ret; in slave_reset()
113 ret = essl_wait_for_ready(handle, TIMEOUT_MAX); in slave_reset()
115 return ret; in slave_reset()
136 esp_err_t ret = ESP_OK; in print_sdio_cis_information() local
[all …]
/hal_espressif-2.7.6/components/app_trace/
Dhost_file_io.c87 esp_err_t ret; in esp_apptrace_file_cmd_send() local
103 ret = esp_apptrace_buffer_put(dest, ptr, ESP_APPTRACE_TMO_INFINITE);//TODO: finite tmo in esp_apptrace_file_cmd_send()
104 if (ret != ESP_OK) { in esp_apptrace_file_cmd_send()
105 ESP_EARLY_LOGE(TAG, "Failed to put apptrace buffer (%d)!", ret); in esp_apptrace_file_cmd_send()
106 return ret; in esp_apptrace_file_cmd_send()
109 ret = esp_apptrace_flush(dest, ESP_APPTRACE_TMO_INFINITE);//TODO: finite tmo in esp_apptrace_file_cmd_send()
110 if (ret != ESP_OK) { in esp_apptrace_file_cmd_send()
111 ESP_EARLY_LOGE(TAG, "Failed to flush apptrace buffer (%d)!", ret); in esp_apptrace_file_cmd_send()
112 return ret; in esp_apptrace_file_cmd_send()
123 …esp_err_t ret = esp_apptrace_read(dest, buf + tot_rd, &rd_size, ESP_APPTRACE_TMO_INFINITE); //TODO… in esp_apptrace_file_rsp_recv() local
[all …]
/hal_espressif-2.7.6/examples/peripherals/sdio/slave/main/
Dapp_main.c89 esp_err_t ret; in slave_reset() local
91 ret = sdio_slave_reset(); in slave_reset()
92 if (ret != ESP_OK) return ret; in slave_reset()
93 ret = sdio_slave_start(); in slave_reset()
94 if (ret != ESP_OK) return ret; in slave_reset()
99 ret = sdio_slave_send_get_finished(&handle, 0); in slave_reset()
100 if (ret != ESP_OK) break; in slave_reset()
101 ret = sdio_slave_recv_load_buf(handle); in slave_reset()
102 ESP_ERROR_CHECK(ret); in slave_reset()
161 esp_err_t ret; in app_main() local
[all …]
/hal_espressif-2.7.6/components/bt/host/bluedroid/btc/core/
Dbtc_ble_storage.c132 int ret = btc_config_set_bin(bdstr, name, (const uint8_t *)key, key_length); in _btc_storage_add_ble_bonding_key() local
134 return ret ? BT_STATUS_SUCCESS : BT_STATUS_FAIL; in _btc_storage_add_ble_bonding_key()
142 bt_status_t ret; in btc_storage_add_ble_bonding_key() local
145 ret = _btc_storage_add_ble_bonding_key(remote_bd_addr, key, key_type, key_length); in btc_storage_add_ble_bonding_key()
148 return ret; in btc_storage_add_ble_bonding_key()
191 int ret = btc_config_get_bin(bdstr, name, (uint8_t *)key_value, &length); in _btc_storage_get_ble_bonding_key() local
192 return ret ? BT_STATUS_SUCCESS : BT_STATUS_FAIL; in _btc_storage_get_ble_bonding_key()
201 bt_status_t ret; in btc_storage_get_ble_bonding_key() local
204 ret = _btc_storage_get_ble_bonding_key(remote_bd_addr, key_type, key_value, key_length); in btc_storage_get_ble_bonding_key()
207 return ret; in btc_storage_get_ble_bonding_key()
[all …]
/hal_espressif-2.7.6/components/wpa_supplicant/src/wps/
Dwps.c167 int ret; in wps_is_selected_pin_registrar() local
178 ret = is_selected_pin_registrar(attr, bssid); in wps_is_selected_pin_registrar()
181 return ret; in wps_is_selected_pin_registrar()
198 int ret = 0; in wps_is_addr_authorized() local
209 ret = -99; in wps_is_addr_authorized()
214 ret = 0; in wps_is_addr_authorized()
225 ret = is_selected_pin_registrar(attr, sm->config.bssid); in wps_is_addr_authorized()
231 ret = 0; in wps_is_addr_authorized()
238 ret = 2; in wps_is_addr_authorized()
242 ret = 1; in wps_is_addr_authorized()
[all …]
Dwps_validate.c1019 int ret; in wps_validate_cred() local
1023 ret = -99; in wps_validate_cred()
1028 ret = -1; in wps_validate_cred()
1034 ret = -1; in wps_validate_cred()
1049 ret = -1; in wps_validate_cred()
1053 ret = 0; in wps_validate_cred()
1058 return ret; in wps_validate_cred()
1089 int ret; in wps_validate_beacon() local
1093 ret = -99; in wps_validate_beacon()
1099 ret = -1; in wps_validate_beacon()
[all …]
/hal_espressif-2.7.6/components/openssl/platform/
Dssl_pm.c131 int ret; in ssl_pm_new() local
157ret = mbedtls_ctr_drbg_seed(&ssl_pm->ctr_drbg, mbedtls_entropy_func, &ssl_pm->entropy, pers, pers_… in ssl_pm_new()
158 if (ret) { in ssl_pm_new()
159 SSL_DEBUG(SSL_PLATFORM_ERROR_LEVEL, "mbedtls_ctr_drbg_seed() return -0x%x", -ret); in ssl_pm_new()
160 OPENSSL_PUT_LIB_ERROR(ERR_LIB_RAND, ret); in ssl_pm_new()
169ret = mbedtls_ssl_config_defaults(&ssl_pm->conf, endpoint, MBEDTLS_SSL_TRANSPORT_STREAM, MBEDTLS_S… in ssl_pm_new()
170 if (ret) { in ssl_pm_new()
171 SSL_DEBUG(SSL_PLATFORM_ERROR_LEVEL, "mbedtls_ssl_config_defaults() return -0x%x", -ret); in ssl_pm_new()
172 OPENSSL_PUT_LIB_ERROR(ERR_LIB_CONF, ret); in ssl_pm_new()
204 ret = mbedtls_ssl_setup(&ssl_pm->ssl, &ssl_pm->conf); in ssl_pm_new()
[all …]
/hal_espressif-2.7.6/components/protocomm/src/simple_ble/
Dsimple_ble.c73 esp_err_t ret; in gatts_profile_event_handler() local
92ret = esp_ble_gatts_create_attr_tab(g_ble_cfg_p->gatt_db, gatts_if, g_ble_cfg_p->gatt_db_count, se… in gatts_profile_event_handler()
93 if (ret) { in gatts_profile_event_handler()
94 ESP_LOGE(TAG, "create attr table failed, error code = 0x%x", ret); in gatts_profile_event_handler()
97 ret = esp_ble_gap_set_device_name(g_ble_cfg_p->device_name); in gatts_profile_event_handler()
98 if (ret) { in gatts_profile_event_handler()
99 ESP_LOGE(TAG, "set device name failed, error code = 0x%x", ret); in gatts_profile_event_handler()
102 ret = esp_ble_gap_config_adv_data_raw(g_ble_cfg_p->raw_adv_data_p, in gatts_profile_event_handler()
104 if (ret) { in gatts_profile_event_handler()
105 ESP_LOGE(TAG, "config raw adv data failed, error code = 0x%x ", ret); in gatts_profile_event_handler()
[all …]
/hal_espressif-2.7.6/examples/bluetooth/esp_ble_mesh/ble_mesh_console/main/
Dtransaction.c39 trans->ret = ESP_OK; in transaction_reset()
52 esp_err_t ret = ESP_OK; in transaction_set_events() local
56 ret = TRANS_RET_STATE_ERR; in transaction_set_events()
65 …set events: %x, %x, %x, %x; ret: %x", (uint32_t) trans, trans->type, trans->sub_type, events, ret); in transaction_set_events()
67 ret = TRANS_RET_INVALID_TRNSACTION; in transaction_set_events()
70 return ret; in transaction_set_events()
75 esp_err_t ret = TRANS_RET_TEST_EVENT_FAILED; in transaction_test_events() local
80 ret = TRANS_RET_STATE_ERR; in transaction_test_events()
83 ret = ESP_OK; in transaction_test_events()
86 ESP_LOGV(TAG, "transactions test events: %x, %x; ret: %x", (uint32_t) trans, events, ret); in transaction_test_events()
[all …]
/hal_espressif-2.7.6/components/touch_element/
Dtouch_element.c39 bool ret = false; \
43 ret |= TE_CLASS_ITEM(cls, cls_method, check_channel(channel)); \
46 ret; \
152 esp_err_t ret = ESP_ERR_NO_MEM; in touch_element_install() local
158 ret = te_hw_init(&global_config->hardware); in touch_element_install()
159 if (ret != ESP_OK) { in touch_element_install()
162 ret = te_sw_init(&global_config->software); in touch_element_install()
163 if (ret != ESP_OK) { in touch_element_install()
176 return ret; in touch_element_install()
182 esp_err_t ret; in touch_element_start() local
[all …]
/hal_espressif-2.7.6/examples/bluetooth/esp_hid_device/main/
Desp_hid_gap.c405 esp_err_t ret; in init_bt_gap() local
421 if ((ret = esp_bt_gap_register_callback(bt_gap_event_handler)) != ESP_OK) { in init_bt_gap()
422 ESP_LOGE(TAG, "esp_bt_gap_register_callback failed: %d", ret); in init_bt_gap()
423 return ret; in init_bt_gap()
427 if ((ret = esp_bt_gap_set_scan_mode(ESP_BT_CONNECTABLE, ESP_BT_NON_DISCOVERABLE)) != ESP_OK) { in init_bt_gap()
428 ESP_LOGE(TAG, "esp_bt_gap_set_scan_mode failed: %d", ret); in init_bt_gap()
429 return ret; in init_bt_gap()
431 return ret; in init_bt_gap()
436 esp_err_t ret = ESP_OK; in start_bt_scan() local
437 …if ((ret = esp_bt_gap_start_discovery(ESP_BT_INQ_MODE_GENERAL_INQUIRY, (int)(seconds / 1.28), 0)) … in start_bt_scan()
[all …]
/hal_espressif-2.7.6/examples/bluetooth/esp_hid_host/main/
Desp_hid_gap.c405 esp_err_t ret; in init_bt_gap() local
421 if ((ret = esp_bt_gap_register_callback(bt_gap_event_handler)) != ESP_OK) { in init_bt_gap()
422 ESP_LOGE(TAG, "esp_bt_gap_register_callback failed: %d", ret); in init_bt_gap()
423 return ret; in init_bt_gap()
427 if ((ret = esp_bt_gap_set_scan_mode(ESP_BT_CONNECTABLE, ESP_BT_NON_DISCOVERABLE)) != ESP_OK) { in init_bt_gap()
428 ESP_LOGE(TAG, "esp_bt_gap_set_scan_mode failed: %d", ret); in init_bt_gap()
429 return ret; in init_bt_gap()
431 return ret; in init_bt_gap()
436 esp_err_t ret = ESP_OK; in start_bt_scan() local
437 …if ((ret = esp_bt_gap_start_discovery(ESP_BT_INQ_MODE_GENERAL_INQUIRY, (int)(seconds / 1.28), 0)) … in start_bt_scan()
[all …]
/hal_espressif-2.7.6/components/wpa_supplicant/src/crypto/
Dcrypto_mbedtls-rsa.c50 int ret; in crypto_verify_cert() local
66 ret = mbedtls_x509_crt_parse(cert, cert_start, certlen); in crypto_verify_cert()
67 if (ret < 0) { in crypto_verify_cert()
71 ret = mbedtls_x509_crt_parse(ca_cert, ca_cert_start, ca_certlen); in crypto_verify_cert()
72 if (ret < 0) { in crypto_verify_cert()
77 ret = mbedtls_x509_crt_verify(cert, ca_cert, NULL, NULL, &flags, NULL, NULL ); in crypto_verify_cert()
80 if (ret != 0) in crypto_verify_cert()
90 return ret; in crypto_verify_cert()
95 int ret; in crypto_public_key_import() local
102 ret = mbedtls_pk_parse_public_key(pkey, key, len); in crypto_public_key_import()
[all …]
/hal_espressif-2.7.6/components/bt/esp_ble_mesh/mesh_common/
Dmesh_atomic.c57 bt_mesh_atomic_val_t ret = 0; in bt_mesh_atomic_set() local
61 ret = *target; in bt_mesh_atomic_set()
66 return ret; in bt_mesh_atomic_set()
84 bt_mesh_atomic_val_t ret = 0; in bt_mesh_atomic_or() local
88 ret = *target; in bt_mesh_atomic_or()
93 return ret; in bt_mesh_atomic_or()
111 bt_mesh_atomic_val_t ret = 0; in bt_mesh_atomic_and() local
115 ret = *target; in bt_mesh_atomic_and()
120 return ret; in bt_mesh_atomic_and()
136 bt_mesh_atomic_val_t ret = 0; in bt_mesh_atomic_dec() local
[all …]
/hal_espressif-2.7.6/components/console/
Desp_console_repl.c66 esp_err_t ret = ESP_OK; in esp_console_new_repl_usb_cdc() local
69 ret = ESP_ERR_INVALID_ARG; in esp_console_new_repl_usb_cdc()
75 ret = ESP_ERR_NO_MEM; in esp_console_new_repl_usb_cdc()
92 ret = esp_console_common_init(&cdc_repl->repl_com); in esp_console_new_repl_usb_cdc()
93 if (ret != ESP_OK) { in esp_console_new_repl_usb_cdc()
98ret = esp_console_setup_history(repl_config->history_save_path, repl_config->max_history_len, &cdc… in esp_console_new_repl_usb_cdc()
99 if (ret != ESP_OK) { in esp_console_new_repl_usb_cdc()
109 ret = ESP_FAIL; in esp_console_new_repl_usb_cdc()
125 return ret; in esp_console_new_repl_usb_cdc()
130 esp_err_t ret = ESP_OK; in esp_console_new_repl_uart() local
[all …]

12345678910>>...22