Home
last modified time | relevance | path

Searched refs:ESP_ERROR_CHECK (Results 1 – 25 of 380) sorted by relevance

12345678910>>...16

/hal_espressif-3.6.0/examples/peripherals/mcpwm/mcpwm_sync_example/main/
Dmcpwm_sync_example.c45 ESP_ERROR_CHECK(mcpwm_init(TARGET_MCPWM_UNIT, MCPWM_TIMER_0, &pwm_config)); in app_main()
46 ESP_ERROR_CHECK(mcpwm_init(TARGET_MCPWM_UNIT, MCPWM_TIMER_1, &pwm_config)); in app_main()
47 ESP_ERROR_CHECK(mcpwm_init(TARGET_MCPWM_UNIT, MCPWM_TIMER_2, &pwm_config)); in app_main()
50 ESP_ERROR_CHECK(mcpwm_gpio_init(TARGET_MCPWM_UNIT, MCPWM0A, TIMER0_OUTPUT_GPIO)); in app_main()
51 ESP_ERROR_CHECK(mcpwm_gpio_init(TARGET_MCPWM_UNIT, MCPWM1A, TIMER1_OUTPUT_GPIO)); in app_main()
52 ESP_ERROR_CHECK(mcpwm_gpio_init(TARGET_MCPWM_UNIT, MCPWM2A, TIMER2_OUTPUT_GPIO)); in app_main()
57 ESP_ERROR_CHECK(mcpwm_gpio_init(TARGET_MCPWM_UNIT, MCPWM0B, TIMER0_OUTPUT_GPIO)); in app_main()
58 ESP_ERROR_CHECK(mcpwm_gpio_init(TARGET_MCPWM_UNIT, MCPWM1B, TIMER1_OUTPUT_GPIO)); in app_main()
59 ESP_ERROR_CHECK(mcpwm_gpio_init(TARGET_MCPWM_UNIT, MCPWM2B, TIMER2_OUTPUT_GPIO)); in app_main()
69 ESP_ERROR_CHECK(mcpwm_sync_configure(TARGET_MCPWM_UNIT, MCPWM_TIMER_0, &sync_conf)); in app_main()
[all …]
/hal_espressif-3.6.0/examples/peripherals/rmt/step_motor/components/step_motor/src/
Dstep_motor_driver_io_a4988.c35 ESP_ERROR_CHECK(gpio_config(&io_conf)); in a4988_init()
37 ESP_ERROR_CHECK(gpio_set_level(a4988_motor->conf.direction_pin, 0)); in a4988_init()
38 ESP_ERROR_CHECK(gpio_set_level(a4988_motor->conf.sleep_pin, 0)); // default sleep in a4988_init()
39 ESP_ERROR_CHECK(gpio_set_level(a4988_motor->conf.reset_pin, 0)); // keep reset in a4988_init()
40 ESP_ERROR_CHECK(gpio_set_level(a4988_motor->conf.ms3_pin, 0)); // 1/1 phase in a4988_init()
41 ESP_ERROR_CHECK(gpio_set_level(a4988_motor->conf.ms2_pin, 0)); in a4988_init()
42 ESP_ERROR_CHECK(gpio_set_level(a4988_motor->conf.ms1_pin, 0)); in a4988_init()
43 ESP_ERROR_CHECK(gpio_set_level(a4988_motor->conf.enable_pin, 1)); // disable by default in a4988_init()
45 ESP_ERROR_CHECK(gpio_set_level(a4988_motor->conf.reset_pin, 1)); in a4988_init()
46 ESP_ERROR_CHECK(gpio_set_level(a4988_motor->conf.sleep_pin, 1)); in a4988_init()
[all …]
/hal_espressif-3.6.0/components/esp_system/test/
Dtest_sleep.c350 ESP_ERROR_CHECK( esp_timer_create(&timer_args, &timer) ); in prepare_wake_stub_from_rtc()
351 ESP_ERROR_CHECK( esp_timer_start_periodic(timer, 200) ); in prepare_wake_stub_from_rtc()
370 ESP_ERROR_CHECK(rtc_gpio_init(GPIO_NUM_13));
371 ESP_ERROR_CHECK(gpio_pullup_dis(GPIO_NUM_13));
372 ESP_ERROR_CHECK(gpio_pulldown_en(GPIO_NUM_13));
373 ESP_ERROR_CHECK(esp_sleep_enable_ext0_wakeup(GPIO_NUM_13, ESP_EXT0_WAKEUP_LEVEL_HIGH));
379 ESP_ERROR_CHECK(rtc_gpio_init(GPIO_NUM_13));
380 ESP_ERROR_CHECK(gpio_pullup_en(GPIO_NUM_13));
381 ESP_ERROR_CHECK(gpio_pulldown_dis(GPIO_NUM_13));
382 ESP_ERROR_CHECK(esp_sleep_enable_ext0_wakeup(GPIO_NUM_13, ESP_EXT0_WAKEUP_LEVEL_LOW));
[all …]
/hal_espressif-3.6.0/examples/wifi/wps/main/
Dwps.c75 ESP_ERROR_CHECK(esp_wifi_set_config(WIFI_IF_STA, &wps_ap_creds[ap_idx++]) ); in wifi_event_handler()
102 ESP_ERROR_CHECK(esp_wifi_set_config(WIFI_IF_STA, &wps_ap_creds[0]) ); in wifi_event_handler()
109 ESP_ERROR_CHECK(esp_wifi_wps_disable()); in wifi_event_handler()
115 ESP_ERROR_CHECK(esp_wifi_wps_disable()); in wifi_event_handler()
116 ESP_ERROR_CHECK(esp_wifi_wps_enable(&config)); in wifi_event_handler()
117 ESP_ERROR_CHECK(esp_wifi_wps_start(0)); in wifi_event_handler()
121 ESP_ERROR_CHECK(esp_wifi_wps_disable()); in wifi_event_handler()
122 ESP_ERROR_CHECK(esp_wifi_wps_enable(&config)); in wifi_event_handler()
123 ESP_ERROR_CHECK(esp_wifi_wps_start(0)); in wifi_event_handler()
146 ESP_ERROR_CHECK(esp_netif_init()); in start_wps()
[all …]
/hal_espressif-3.6.0/examples/common_components/protocol_examples_common/
Dconnect.c208 ESP_ERROR_CHECK(esp_register_shutdown_handler(&stop)); in example_connect()
220 ESP_ERROR_CHECK(esp_netif_get_ip_info(netif, &ip)); in example_connect()
245 ESP_ERROR_CHECK(esp_unregister_shutdown_handler(&stop)); in example_disconnect()
259 ESP_ERROR_CHECK(err); in on_wifi_disconnect()
276 ESP_ERROR_CHECK(esp_wifi_init(&cfg)); in wifi_start()
288ESP_ERROR_CHECK(esp_event_handler_register(WIFI_EVENT, WIFI_EVENT_STA_DISCONNECTED, &on_wifi_disco… in wifi_start()
289 ESP_ERROR_CHECK(esp_event_handler_register(IP_EVENT, IP_EVENT_STA_GOT_IP, &on_got_ip, NULL)); in wifi_start()
291ESP_ERROR_CHECK(esp_event_handler_register(WIFI_EVENT, WIFI_EVENT_STA_CONNECTED, &on_wifi_connect,… in wifi_start()
292 ESP_ERROR_CHECK(esp_event_handler_register(IP_EVENT, IP_EVENT_GOT_IP6, &on_got_ipv6, NULL)); in wifi_start()
295 ESP_ERROR_CHECK(esp_wifi_set_storage(WIFI_STORAGE_RAM)); in wifi_start()
[all …]
/hal_espressif-3.6.0/examples/wifi/wifi_eap_fast/main/
Dwifi_eap_fast_main.c78 ESP_ERROR_CHECK(esp_netif_init()); in initialise_wifi()
80 ESP_ERROR_CHECK(esp_event_loop_create_default()); in initialise_wifi()
85 ESP_ERROR_CHECK( esp_wifi_init(&cfg) ); in initialise_wifi()
86ESP_ERROR_CHECK( esp_event_handler_register(WIFI_EVENT, ESP_EVENT_ANY_ID, &event_handler, NULL) ); in initialise_wifi()
87ESP_ERROR_CHECK( esp_event_handler_register(IP_EVENT, IP_EVENT_STA_GOT_IP, &event_handler, NULL) ); in initialise_wifi()
88 ESP_ERROR_CHECK( esp_wifi_set_storage(WIFI_STORAGE_RAM) ); in initialise_wifi()
101 ESP_ERROR_CHECK( esp_wifi_set_mode(WIFI_MODE_STA) ); in initialise_wifi()
102 ESP_ERROR_CHECK( esp_wifi_set_config(WIFI_IF_STA, &wifi_config) ); in initialise_wifi()
103ESP_ERROR_CHECK( esp_wifi_sta_wpa2_ent_set_identity((uint8_t *)EXAMPLE_EAP_ID, strlen(EXAMPLE_EAP_… in initialise_wifi()
107 ESP_ERROR_CHECK( esp_wifi_sta_wpa2_ent_set_ca_cert(ca_pem_start, ca_pem_bytes) ); in initialise_wifi()
[all …]
/hal_espressif-3.6.0/examples/wifi/wifi_enterprise/main/
Dwifi_enterprise_main.c111 ESP_ERROR_CHECK(esp_netif_init()); in initialise_wifi()
113 ESP_ERROR_CHECK(esp_event_loop_create_default()); in initialise_wifi()
118 ESP_ERROR_CHECK( esp_wifi_init(&cfg) ); in initialise_wifi()
119ESP_ERROR_CHECK( esp_event_handler_register(WIFI_EVENT, ESP_EVENT_ANY_ID, &event_handler, NULL) ); in initialise_wifi()
120ESP_ERROR_CHECK( esp_event_handler_register(IP_EVENT, IP_EVENT_STA_GOT_IP, &event_handler, NULL) ); in initialise_wifi()
121 ESP_ERROR_CHECK( esp_wifi_set_storage(WIFI_STORAGE_RAM) ); in initialise_wifi()
133 ESP_ERROR_CHECK( esp_wifi_set_mode(WIFI_MODE_STA) ); in initialise_wifi()
134 ESP_ERROR_CHECK( esp_wifi_set_config(WIFI_IF_STA, &wifi_config) ); in initialise_wifi()
135ESP_ERROR_CHECK( esp_wifi_sta_wpa2_ent_set_identity((uint8_t *)EXAMPLE_EAP_ID, strlen(EXAMPLE_EAP_… in initialise_wifi()
140 ESP_ERROR_CHECK( esp_wifi_sta_wpa2_ent_set_ca_cert(ca_pem_start, ca_pem_bytes) ); in initialise_wifi()
[all …]
/hal_espressif-3.6.0/examples/system/esp_event/default_event_loop/main/
Dmain.c54 ESP_ERROR_CHECK(esp_event_post(TIMER_EVENTS, TIMER_EVENT_EXPIRY, NULL, 0, portMAX_DELAY)); in timer_callback()
81 ESP_ERROR_CHECK(esp_timer_stop(TIMER)); in timer_expiry_handler()
86 ESP_ERROR_CHECK(esp_event_post(TIMER_EVENTS, TIMER_EVENT_STOPPED, NULL, 0, portMAX_DELAY)); in timer_expiry_handler()
128ESP_ERROR_CHECK(esp_event_post(TASK_EVENTS, TASK_ITERATION_EVENT, &iteration, sizeof(iteration), p… in task_event_source()
132ESP_ERROR_CHECK(esp_event_handler_instance_unregister(TASK_EVENTS, TASK_ITERATION_EVENT, s_instanc… in task_event_source()
157 ESP_ERROR_CHECK(esp_event_loop_create_default()); in app_main()
160ESP_ERROR_CHECK(esp_event_handler_instance_register(TIMER_EVENTS, TIMER_EVENT_STARTED, timer_start… in app_main()
161ESP_ERROR_CHECK(esp_event_handler_instance_register(TIMER_EVENTS, TIMER_EVENT_STARTED, timer_start… in app_main()
162ESP_ERROR_CHECK(esp_event_handler_instance_register(TIMER_EVENTS, TIMER_EVENT_STARTED, timer_start… in app_main()
163ESP_ERROR_CHECK(esp_event_handler_instance_register(TIMER_EVENTS, TIMER_EVENT_EXPIRY, timer_expiry… in app_main()
[all …]
/hal_espressif-3.6.0/examples/wifi/wifi_easy_connect/dpp-enrollee/main/
Ddpp_enrollee_main.c55 ESP_ERROR_CHECK(esp_supp_dpp_start_listen()); in event_handler()
96 ESP_ERROR_CHECK(esp_supp_dpp_start_listen()); in dpp_enrollee_event_cb()
111 ESP_ERROR_CHECK(esp_netif_init()); in dpp_enrollee_init()
113 ESP_ERROR_CHECK(esp_event_loop_create_default()); in dpp_enrollee_init()
116 ESP_ERROR_CHECK(esp_event_handler_register(WIFI_EVENT, ESP_EVENT_ANY_ID, &event_handler, NULL)); in dpp_enrollee_init()
117ESP_ERROR_CHECK(esp_event_handler_register(IP_EVENT, IP_EVENT_STA_GOT_IP, &event_handler, NULL)); in dpp_enrollee_init()
120 ESP_ERROR_CHECK(esp_wifi_init(&cfg)); in dpp_enrollee_init()
122 ESP_ERROR_CHECK(esp_supp_dpp_init(dpp_enrollee_event_cb)); in dpp_enrollee_init()
124ESP_ERROR_CHECK(esp_supp_dpp_bootstrap_gen(EXAMPLE_DPP_LISTEN_CHANNEL_LIST, DPP_BOOTSTRAP_QR_CODE, in dpp_enrollee_init()
127 ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_STA)); in dpp_enrollee_init()
[all …]
/hal_espressif-3.6.0/examples/bluetooth/esp_ble_mesh/ble_mesh_coex_test/components/case/
Dwifi_connect.c70 ESP_ERROR_CHECK(esp_register_shutdown_handler(&stop)); in example_connect()
100 ESP_ERROR_CHECK(err); in on_wifi_disconnect()
106 ESP_ERROR_CHECK(esp_wifi_init(&cfg)); in start()
119ESP_ERROR_CHECK(esp_event_handler_register(WIFI_EVENT, WIFI_EVENT_STA_DISCONNECTED, &on_wifi_disco… in start()
120 ESP_ERROR_CHECK(esp_event_handler_register(IP_EVENT, IP_EVENT_STA_GOT_IP, &on_got_ip, NULL)); in start()
121 ESP_ERROR_CHECK(esp_wifi_set_storage(WIFI_STORAGE_RAM)); in start()
133 ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_STA)); in start()
134 ESP_ERROR_CHECK(esp_wifi_set_config(WIFI_IF_STA, &wifi_config)); in start()
135 ESP_ERROR_CHECK(esp_wifi_start()); in start()
142ESP_ERROR_CHECK(esp_event_handler_unregister(WIFI_EVENT, WIFI_EVENT_STA_DISCONNECTED, &on_wifi_dis… in stop()
[all …]
/hal_espressif-3.6.0/examples/system/esp_timer/main/
Desp_timer_example_main.c38 ESP_ERROR_CHECK(esp_timer_create(&periodic_timer_args, &periodic_timer)); in app_main()
48 ESP_ERROR_CHECK(esp_timer_create(&oneshot_timer_args, &oneshot_timer)); in app_main()
51 ESP_ERROR_CHECK(esp_timer_start_periodic(periodic_timer, 500000)); in app_main()
52 ESP_ERROR_CHECK(esp_timer_start_once(oneshot_timer, 5000000)); in app_main()
57 ESP_ERROR_CHECK(esp_timer_dump(stdout)); in app_main()
67 ESP_ERROR_CHECK(esp_sleep_enable_timer_wakeup(500000)); in app_main()
77 ESP_ERROR_CHECK(esp_timer_stop(periodic_timer)); in app_main()
78 ESP_ERROR_CHECK(esp_timer_delete(periodic_timer)); in app_main()
79 ESP_ERROR_CHECK(esp_timer_delete(oneshot_timer)); in app_main()
95 ESP_ERROR_CHECK(esp_timer_stop(periodic_timer_handle)); in oneshot_timer_callback()
[all …]
/hal_espressif-3.6.0/examples/system/efuse/main/
Defuse_main.c53 ESP_ERROR_CHECK(esp_efuse_read_field_blob(ESP_EFUSE_MODULE_VERSION, &desc->module_version, 8)); in read_device_desc_efuse_fields()
54 ESP_ERROR_CHECK(esp_efuse_read_field_blob(ESP_EFUSE_DEVICE_ROLE, &desc->device_role, 3)); in read_device_desc_efuse_fields()
55 ESP_ERROR_CHECK(esp_efuse_read_field_blob(ESP_EFUSE_SETTING_1, &desc->setting_1, 6)); in read_device_desc_efuse_fields()
56 ESP_ERROR_CHECK(esp_efuse_read_field_blob(ESP_EFUSE_SETTING_2, &desc->setting_2, 5)); in read_device_desc_efuse_fields()
57ESP_ERROR_CHECK(esp_efuse_read_field_cnt(ESP_EFUSE_CUSTOM_SECURE_VERSION, &desc->custom_secure_ver… in read_device_desc_efuse_fields()
67 ESP_ERROR_CHECK(esp_efuse_read_field_blob(ESP_EFUSE_MAC_FACTORY, &mac, sizeof(mac) * 8)); in read_efuse_fields()
71 ESP_ERROR_CHECK(esp_efuse_read_field_cnt(ESP_EFUSE_SECURE_VERSION, &secure_version)); in read_efuse_fields()
92 ESP_ERROR_CHECK(esp_efuse_batch_write_begin()); in write_efuse_fields()
95 ESP_ERROR_CHECK(esp_efuse_write_field_blob(ESP_EFUSE_MODULE_VERSION, &desc->module_version, 8)); in write_efuse_fields()
96 ESP_ERROR_CHECK(esp_efuse_write_field_blob(ESP_EFUSE_DEVICE_ROLE, &desc->device_role, 3)); in write_efuse_fields()
[all …]
/hal_espressif-3.6.0/examples/wifi/smart_config/main/
Dsmartconfig_main.c72 ESP_ERROR_CHECK( esp_smartconfig_get_rvd_data(rvd_data, sizeof(rvd_data)) ); in event_handler()
80 ESP_ERROR_CHECK( esp_wifi_disconnect() ); in event_handler()
81 ESP_ERROR_CHECK( esp_wifi_set_config(WIFI_IF_STA, &wifi_config) ); in event_handler()
90 ESP_ERROR_CHECK(esp_netif_init()); in initialise_wifi()
92 ESP_ERROR_CHECK(esp_event_loop_create_default()); in initialise_wifi()
97 ESP_ERROR_CHECK( esp_wifi_init(&cfg) ); in initialise_wifi()
99ESP_ERROR_CHECK( esp_event_handler_register(WIFI_EVENT, ESP_EVENT_ANY_ID, &event_handler, NULL) ); in initialise_wifi()
100ESP_ERROR_CHECK( esp_event_handler_register(IP_EVENT, IP_EVENT_STA_GOT_IP, &event_handler, NULL) ); in initialise_wifi()
101 ESP_ERROR_CHECK( esp_event_handler_register(SC_EVENT, ESP_EVENT_ANY_ID, &event_handler, NULL) ); in initialise_wifi()
103 ESP_ERROR_CHECK( esp_wifi_set_mode(WIFI_MODE_STA) ); in initialise_wifi()
[all …]
/hal_espressif-3.6.0/examples/wifi/getting_started/station/main/
Dstation_example_main.c70 ESP_ERROR_CHECK(esp_netif_init()); in wifi_init_sta()
72 ESP_ERROR_CHECK(esp_event_loop_create_default()); in wifi_init_sta()
76 ESP_ERROR_CHECK(esp_wifi_init(&cfg)); in wifi_init_sta()
80 ESP_ERROR_CHECK(esp_event_handler_instance_register(WIFI_EVENT, in wifi_init_sta()
85 ESP_ERROR_CHECK(esp_event_handler_instance_register(IP_EVENT, in wifi_init_sta()
101 ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_STA) ); in wifi_init_sta()
102 ESP_ERROR_CHECK(esp_wifi_set_config(WIFI_IF_STA, &wifi_config) ); in wifi_init_sta()
103 ESP_ERROR_CHECK(esp_wifi_start() ); in wifi_init_sta()
128ESP_ERROR_CHECK(esp_event_handler_instance_unregister(IP_EVENT, IP_EVENT_STA_GOT_IP, instance_got_… in wifi_init_sta()
129ESP_ERROR_CHECK(esp_event_handler_instance_unregister(WIFI_EVENT, ESP_EVENT_ANY_ID, instance_any_i… in wifi_init_sta()
[all …]
/hal_espressif-3.6.0/examples/mesh/manual_networking/main/
Dmesh_main.c118 ESP_ERROR_CHECK(esp_mesh_set_parent(&parent, NULL, my_type, my_layer)); in mesh_scan_done_handler()
120 ESP_ERROR_CHECK(esp_mesh_set_ap_authmode(parent_record.authmode)); in mesh_scan_done_handler()
132ESP_ERROR_CHECK(esp_mesh_set_parent(&parent, (mesh_addr_t *)&parent_assoc.mesh_id, my_type, my_lay… in mesh_scan_done_handler()
155 ESP_ERROR_CHECK(esp_mesh_set_self_organized(0, 0)); in mesh_event_handler()
286 ESP_ERROR_CHECK(mesh_light_init()); in app_main()
287 ESP_ERROR_CHECK(nvs_flash_init()); in app_main()
289 ESP_ERROR_CHECK(esp_netif_init()); in app_main()
291 ESP_ERROR_CHECK(esp_event_loop_create_default()); in app_main()
293 ESP_ERROR_CHECK(esp_netif_create_default_wifi_mesh_netifs(&netif_sta, NULL)); in app_main()
296 ESP_ERROR_CHECK(esp_wifi_init(&config)); in app_main()
[all …]
/hal_espressif-3.6.0/examples/protocols/esp_local_ctrl/main/
Dapp_main.c73 ESP_ERROR_CHECK(esp_netif_init()); in wifi_init_sta()
75 ESP_ERROR_CHECK(esp_event_loop_create_default()); in wifi_init_sta()
80 ESP_ERROR_CHECK(esp_wifi_init(&cfg)); in wifi_init_sta()
82 ESP_ERROR_CHECK(esp_event_handler_register(WIFI_EVENT, ESP_EVENT_ANY_ID, &event_handler, NULL)); in wifi_init_sta()
83ESP_ERROR_CHECK(esp_event_handler_register(IP_EVENT, IP_EVENT_STA_GOT_IP, &event_handler, NULL)); in wifi_init_sta()
91 ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_STA) ); in wifi_init_sta()
92 ESP_ERROR_CHECK(esp_wifi_set_config(WIFI_IF_STA, &wifi_config) ); in wifi_init_sta()
93 ESP_ERROR_CHECK(esp_wifi_start() ); in wifi_init_sta()
119 ESP_ERROR_CHECK(esp_event_handler_unregister(IP_EVENT, IP_EVENT_STA_GOT_IP, &event_handler)); in wifi_init_sta()
120 ESP_ERROR_CHECK(esp_event_handler_unregister(WIFI_EVENT, ESP_EVENT_ANY_ID, &event_handler)); in wifi_init_sta()
[all …]
/hal_espressif-3.6.0/examples/network/simple_sniffer/main/
Dsimple_sniffer_example_main.c79 ESP_ERROR_CHECK(nvs_flash_erase()); in initialize_nvs()
82 ESP_ERROR_CHECK(err); in initialize_nvs()
89 ESP_ERROR_CHECK(esp_wifi_init(&cfg)); in initialize_wifi()
90 ESP_ERROR_CHECK(esp_wifi_set_storage(WIFI_STORAGE_RAM)); in initialize_wifi()
91 ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_NULL)); in initialize_wifi()
131ESP_ERROR_CHECK(esp_event_handler_register(ETH_EVENT, ESP_EVENT_ANY_ID, &eth_event_handler, NULL)); in initialize_eth()
164 ESP_ERROR_CHECK(spi_bus_initialize(CONFIG_SNIFFER_ETH_SPI_HOST, &buscfg, SPI_DMA_CH_AUTO)); in initialize_eth()
173 ESP_ERROR_CHECK(spi_bus_add_device(CONFIG_SNIFFER_ETH_SPI_HOST, &devcfg, &spi_handle)); in initialize_eth()
188 ESP_ERROR_CHECK(spi_bus_add_device(CONFIG_SNIFFER_ETH_SPI_HOST, &devcfg, &spi_handle)); in initialize_eth()
203 ESP_ERROR_CHECK(spi_bus_add_device(CONFIG_SNIFFER_ETH_SPI_HOST, &devcfg, &spi_handle)); in initialize_eth()
[all …]
/hal_espressif-3.6.0/examples/wifi/power_save/main/
Dpower_save.c58 ESP_ERROR_CHECK(esp_netif_init()); in wifi_power_save()
59 ESP_ERROR_CHECK(esp_event_loop_create_default()); in wifi_power_save()
64 ESP_ERROR_CHECK(esp_wifi_init(&cfg)); in wifi_power_save()
66ESP_ERROR_CHECK(esp_event_handler_instance_register(WIFI_EVENT, ESP_EVENT_ANY_ID, &event_handler, … in wifi_power_save()
67ESP_ERROR_CHECK(esp_event_handler_instance_register(IP_EVENT, IP_EVENT_STA_GOT_IP, &event_handler,… in wifi_power_save()
76 ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_STA)); in wifi_power_save()
77 ESP_ERROR_CHECK(esp_wifi_set_config(WIFI_IF_STA, &wifi_config)); in wifi_power_save()
78 ESP_ERROR_CHECK(esp_wifi_start()); in wifi_power_save()
89 ESP_ERROR_CHECK(nvs_flash_erase());
92 ESP_ERROR_CHECK( ret );
[all …]
/hal_espressif-3.6.0/examples/protocols/static_ip/main/
Dstatic_ip_example_main.c60 ESP_ERROR_CHECK(esp_netif_set_dns_info(netif, type, &dns)); in example_set_dns_server()
81ESP_ERROR_CHECK(example_set_dns_server(netif, ipaddr_addr(EXAMPLE_MAIN_DNS_SERVER), ESP_NETIF_DNS_… in example_set_static_ip()
82ESP_ERROR_CHECK(example_set_dns_server(netif, ipaddr_addr(EXAMPLE_BACKUP_DNS_SERVER), ESP_NETIF_DN… in example_set_static_ip()
113 ESP_ERROR_CHECK(esp_netif_init()); in wifi_init_sta()
115 ESP_ERROR_CHECK(esp_event_loop_create_default()); in wifi_init_sta()
121 ESP_ERROR_CHECK(esp_wifi_init(&cfg)); in wifi_init_sta()
125 ESP_ERROR_CHECK(esp_event_handler_instance_register(WIFI_EVENT, in wifi_init_sta()
130 ESP_ERROR_CHECK(esp_event_handler_instance_register(IP_EVENT, in wifi_init_sta()
146 ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_STA) ); in wifi_init_sta()
147 ESP_ERROR_CHECK(esp_wifi_set_config(WIFI_IF_STA, &wifi_config) ); in wifi_init_sta()
[all …]
/hal_espressif-3.6.0/examples/mesh/internal_communication/main/
Dmesh_main.c389 ESP_ERROR_CHECK(mesh_light_init()); in app_main()
390 ESP_ERROR_CHECK(nvs_flash_init()); in app_main()
392 ESP_ERROR_CHECK(esp_netif_init()); in app_main()
394 ESP_ERROR_CHECK(esp_event_loop_create_default()); in app_main()
396 ESP_ERROR_CHECK(esp_netif_create_default_wifi_mesh_netifs(&netif_sta, NULL)); in app_main()
399 ESP_ERROR_CHECK(esp_wifi_init(&config)); in app_main()
400ESP_ERROR_CHECK(esp_event_handler_register(IP_EVENT, IP_EVENT_STA_GOT_IP, &ip_event_handler, NULL)… in app_main()
401 ESP_ERROR_CHECK(esp_wifi_set_storage(WIFI_STORAGE_FLASH)); in app_main()
402 ESP_ERROR_CHECK(esp_wifi_start()); in app_main()
404 ESP_ERROR_CHECK(esp_mesh_init()); in app_main()
[all …]
/hal_espressif-3.6.0/examples/ethernet/eth2ap/main/
Dethernet_example_main.c108 ESP_ERROR_CHECK(esp_wifi_start()); in eth_event_handler()
113 ESP_ERROR_CHECK(esp_wifi_stop()); in eth_event_handler()
155ESP_ERROR_CHECK(esp_event_handler_register(ETH_EVENT, ESP_EVENT_ANY_ID, eth_event_handler, NULL)); in initialize_ethernet()
187 ESP_ERROR_CHECK(spi_bus_initialize(CONFIG_EXAMPLE_ETH_SPI_HOST, &buscfg, SPI_DMA_CH_AUTO)); in initialize_ethernet()
196 ESP_ERROR_CHECK(spi_bus_add_device(CONFIG_EXAMPLE_ETH_SPI_HOST, &devcfg, &spi_handle)); in initialize_ethernet()
211 ESP_ERROR_CHECK(spi_bus_add_device(CONFIG_EXAMPLE_ETH_SPI_HOST, &devcfg, &spi_handle)); in initialize_ethernet()
226 ESP_ERROR_CHECK(spi_bus_add_device(CONFIG_EXAMPLE_ETH_SPI_HOST, &devcfg, &spi_handle)); in initialize_ethernet()
236 ESP_ERROR_CHECK(esp_eth_driver_install(&config, &s_eth_handle)); in initialize_ethernet()
241 ESP_ERROR_CHECK(esp_eth_ioctl(s_eth_handle, ETH_CMD_S_MAC_ADDR, (uint8_t[]) { in initialize_ethernet()
252ESP_ERROR_CHECK(esp_event_handler_register(WIFI_EVENT, ESP_EVENT_ANY_ID, wifi_event_handler, NULL)… in initialize_wifi()
[all …]
/hal_espressif-3.6.0/examples/peripherals/usb/host/cdc/cdc_acm_host/main/
Dusb-cdc.c38 ESP_ERROR_CHECK(usb_host_device_free_all()); in usb_lib_task()
46 ESP_ERROR_CHECK(usb_host_uninstall()); in usb_lib_task()
59 ESP_ERROR_CHECK(usb_host_install(&host_config)); in app_main()
65 ESP_ERROR_CHECK(cdc_acm_host_install(NULL)); in app_main()
76ESP_ERROR_CHECK(cdc_acm_host_open(EXAMPLE_USB_DEVICE_VID, EXAMPLE_USB_DEVICE_PID, 0, &dev_config, … in app_main()
83 ESP_ERROR_CHECK(cdc_acm_host_data_tx_blocking(cdc_dev, (uint8_t *)text1, strlen(text1), 1000)); in app_main()
87 ESP_ERROR_CHECK(cdc_acm_host_data_tx_blocking(cdc_dev, (uint8_t *)text2, strlen(text2), 1000)); in app_main()
94 ESP_ERROR_CHECK(cdc_acm_host_line_coding_get(cdc_dev, &line_coding)); in app_main()
102 ESP_ERROR_CHECK(cdc_acm_host_line_coding_set(cdc_dev, &line_coding)); in app_main()
106 ESP_ERROR_CHECK(cdc_acm_host_line_coding_get(cdc_dev, &line_coding)); in app_main()
[all …]
/hal_espressif-3.6.0/examples/protocols/modbus/serial/mb_slave/main/
Dslave.c98ESP_ERROR_CHECK(mbc_slave_init(MB_PORT_SERIAL_SLAVE, &mbc_slave_handler)); // Initialization of Mo… in app_main()
110 ESP_ERROR_CHECK(mbc_slave_setup((void*)&comm_info)); in app_main()
123 ESP_ERROR_CHECK(mbc_slave_set_descriptor(reg_area)); in app_main()
128 ESP_ERROR_CHECK(mbc_slave_set_descriptor(reg_area)); in app_main()
135 ESP_ERROR_CHECK(mbc_slave_set_descriptor(reg_area)); in app_main()
140 ESP_ERROR_CHECK(mbc_slave_set_descriptor(reg_area)); in app_main()
147 ESP_ERROR_CHECK(mbc_slave_set_descriptor(reg_area)); in app_main()
154 ESP_ERROR_CHECK(mbc_slave_set_descriptor(reg_area)); in app_main()
159 ESP_ERROR_CHECK(mbc_slave_start()); in app_main()
162 ESP_ERROR_CHECK(uart_set_pin(MB_PORT_NUM, CONFIG_MB_UART_TXD, in app_main()
[all …]
/hal_espressif-3.6.0/examples/peripherals/sdio/host/main/
Dapp_main.c146 ESP_ERROR_CHECK(ret); in print_sdio_cis_information()
191 ESP_ERROR_CHECK(err); in slave_init()
194 ESP_ERROR_CHECK(err); in slave_init()
201 ESP_ERROR_CHECK(err); in slave_init()
212 ESP_ERROR_CHECK(err); in slave_init()
216 ESP_ERROR_CHECK(err); in slave_init()
218 ESP_ERROR_CHECK(err); in slave_init()
257 ESP_ERROR_CHECK(err); in slave_init()
260 ESP_ERROR_CHECK(ret); in slave_init()
263 ESP_ERROR_CHECK(ret); in slave_init()
[all …]
/hal_espressif-3.6.0/examples/peripherals/lcd/tjpgd/main/
Dlcd_tjpgd_example_main.c91 ESP_ERROR_CHECK(gpio_config(&bk_gpio_config)); in app_main()
112 ESP_ERROR_CHECK(spi_bus_initialize(LCD_HOST, &buscfg, SPI_DMA_CH_AUTO)); in app_main()
129ESP_ERROR_CHECK(esp_lcd_new_panel_io_spi((esp_lcd_spi_bus_handle_t)LCD_HOST, &io_config, &io_handl… in app_main()
138 ESP_ERROR_CHECK(esp_lcd_new_panel_st7789(io_handle, &panel_config, &panel_handle)); in app_main()
142 ESP_ERROR_CHECK(gpio_set_level(EXAMPLE_PIN_NUM_BK_LIGHT, EXAMPLE_LCD_BK_LIGHT_OFF_LEVEL)); in app_main()
145 ESP_ERROR_CHECK(esp_lcd_panel_reset(panel_handle)); in app_main()
148 ESP_ERROR_CHECK(esp_lcd_panel_init(panel_handle)); in app_main()
151 ESP_ERROR_CHECK(esp_lcd_panel_swap_xy(panel_handle, true)); in app_main()
154 ESP_ERROR_CHECK(gpio_set_level(EXAMPLE_PIN_NUM_BK_LIGHT, EXAMPLE_LCD_BK_LIGHT_ON_LEVEL)); in app_main()
157 ESP_ERROR_CHECK(pretty_effect_init()); in app_main()
[all …]

12345678910>>...16