9#include <esp_clk_tree.h>
11#include <esp_idf_version.h>
12#include <esp_ota_ops.h>
13#include <esp_task_wdt.h>
15#include <freertos/FreeRTOS.h>
16#include <freertos/task.h>
25void HOT
yield() { vPortYield(); }
40#ifdef USE_ESP32_CRASH_HANDLER
46 esp_task_wdt_add(
nullptr);
50#ifndef USE_OTA_ROLLBACK
51 esp_ota_mark_app_valid_cancel_rollback();
59 esp_clk_tree_src_get_freq_hz(SOC_MOD_CLK_CPU, ESP_CLK_TREE_SRC_FREQ_PRECISION_CACHED, &freq);
64static StaticTask_t loop_task_tcb;
66 loop_task_stack[ESPHOME_LOOP_TASK_STACK_SIZE];
78#if CONFIG_FREERTOS_UNICORE
83 loop_task_stack, &loop_task_tcb, 1);
void ESPHOME_ALWAYS_INLINE loop()
Make a loop iteration. Call this in your loop() function.
struct @65::@66 __attribute__
Wake the main loop task from an ISR. ISR-safe.
void crash_handler_read_and_clear()
Read and validate crash data from NOINIT memory.
Providing packet encoding functions for exchanging data with a remote host.
uint32_t arch_get_cpu_cycle_count()
void IRAM_ATTR HOT delayMicroseconds(uint32_t us)
uint32_t arch_get_cpu_freq_hz()
TaskHandle_t loop_task_handle
uint32_t IRAM_ATTR HOT micros()
void IRAM_ATTR HOT delay_microseconds_safe(uint32_t us)
Delay for the given amount of microseconds, possibly yielding to other processes during the wait.
constexpr ESPHOME_ALWAYS_INLINE ReturnT micros_to_millis(uint64_t us)
Convert a 64-bit microsecond count to milliseconds without calling __udivdi3 (software 64-bit divide,...
void HOT delay(uint32_t ms)
uint32_t IRAM_ATTR HOT millis()
Application App
Global storage of Application pointer - only one Application can exist.
void loop_task(void *pv_params)