mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
44 lines
1.3 KiB
Diff
44 lines
1.3 KiB
Diff
From 51ef344603e2f1bfdaf8da49d6c4e0384f242a5e Mon Sep 17 00:00:00 2001
|
|
From: Gunar Schorcht <gunar@schorcht.net>
|
|
Date: Sun, 30 Jan 2022 11:27:00 +0100
|
|
Subject: [PATCH 11/12] esp_system: conditional compilation of functions
|
|
|
|
These functions are either not required in RIOT or should only be compiled in if module `esp_idf_heap` is usd.
|
|
---
|
|
components/esp_system/esp_system.c | 4 ++++
|
|
1 file changed, 4 insertions(+)
|
|
|
|
diff --git a/components/esp_system/esp_system.c b/components/esp_system/esp_system.c
|
|
index 8d2457b2c0..abdc3f558c 100644
|
|
--- a/components/esp_system/esp_system.c
|
|
+++ b/components/esp_system/esp_system.c
|
|
@@ -103,6 +103,7 @@ void IRAM_ATTR esp_restart(void)
|
|
esp_restart_noos();
|
|
}
|
|
|
|
+#ifdef MODULE_ESP_IDF_HEAP
|
|
uint32_t esp_get_free_heap_size( void )
|
|
{
|
|
return heap_caps_get_free_size( MALLOC_CAP_DEFAULT );
|
|
@@ -112,6 +113,7 @@ uint32_t esp_get_free_internal_heap_size( void )
|
|
{
|
|
return heap_caps_get_free_size( MALLOC_CAP_8BIT | MALLOC_CAP_DMA | MALLOC_CAP_INTERNAL );
|
|
}
|
|
+#endif
|
|
|
|
uint32_t esp_get_minimum_free_heap_size( void )
|
|
{
|
|
@@ -123,7 +125,9 @@ const char *esp_get_idf_version(void)
|
|
return IDF_VER;
|
|
}
|
|
|
|
+#ifndef RIOT_VERSION
|
|
void __attribute__((noreturn)) esp_system_abort(const char *details)
|
|
{
|
|
panic_abort(details);
|
|
}
|
|
+#endif
|
|
--
|
|
2.17.1
|
|
|