ProtoCore v0.0.2
Deterministic, zero-heap network stack for embedded targets
Loading...
Searching...
No Matches
esp_platform.cpp
Go to the documentation of this file.
1// Copyright (C) 2026 Douglas Quigg (dstroy0) <dquigg123@gmail.com>
2// SPDX-License-Identifier: AGPL-3.0-or-later
3
4/**
5 * @file esp_platform.cpp
6 * @brief Espressif answers to the platform questions the core asks.
7 *
8 * The core cannot name FreeRTOS, so it asks pc_platform_context_id() and this supplies it. Only ever
9 * compared for equality by the pools' debug tripwire, so the task handle is exactly the right answer
10 * and needs no interpretation.
11 */
12
14
15#if PC_VENDOR_ESP
16
17#include "freertos/FreeRTOS.h"
18#include "freertos/task.h"
19
20uintptr_t pc_platform_context_id(void)
21{
22 return (uintptr_t)xTaskGetCurrentTaskHandle();
23}
24
25#endif // PC_VENDOR_ESP
The one vendor/die selector for the whole library.
uintptr_t pc_platform_context_id(void)