idfxx 1.0.0
Modern C++23 components for ESP-IDF
Loading...
Searching...
No Matches
intr_types.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: Apache-2.0
2// Copyright 2026 Chris Leishman
3
4#pragma once
5
14#include <esp_intr_types.h>
15
16namespace idfxx {
17
24 automatic = ESP_INTR_CPU_AFFINITY_AUTO,
26 cpu_0 = ESP_INTR_CPU_AFFINITY_0,
27 cpu_1 = ESP_INTR_CPU_AFFINITY_1,
28};
29
31[[nodiscard]] constexpr int intr_cpu_affinity_to_core_id(intr_cpu_affinity_t cpu_affinity) {
32 return ESP_INTR_CPU_AFFINITY_TO_CORE_ID(static_cast<esp_intr_cpu_affinity_t>(cpu_affinity));
33}
34
35} // namespace idfxx
intr_cpu_affinity_t
Interrupt CPU core affinity.
@ automatic
Install the peripheral interrupt to ANY CPU core, decided by on which CPU the interrupt allocator is ...
@ cpu_1
Install the peripheral interrupt to CPU core 1.
@ cpu_0
Install the peripheral interrupt to CPU core 0.
constexpr int intr_cpu_affinity_to_core_id(intr_cpu_affinity_t cpu_affinity)
Convert esp_intr_cpu_affinity_t to CPU core ID.