From 252f685ef1502016ed00be4eeaa4a217386fbce0 Mon Sep 17 00:00:00 2001 From: jacqueline Date: Tue, 26 Sep 2023 21:07:44 +1000 Subject: Make NVS access synchronous again Everything relevant is back in internal ram, and likely to stay there. --- src/tasks/tasks.cpp | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'src/tasks/tasks.cpp') diff --git a/src/tasks/tasks.cpp b/src/tasks/tasks.cpp index 689011ea..7bab93f9 100644 --- a/src/tasks/tasks.cpp +++ b/src/tasks/tasks.cpp @@ -39,10 +39,6 @@ template <> auto Name() -> std::pmr::string { return "db_bg"; } -template <> -auto Name() -> std::pmr::string { - return "nvs"; -} template auto AllocateStack() -> cpp::span; @@ -86,12 +82,6 @@ auto AllocateStack() -> cpp::span { return {static_cast(heap_caps_malloc(size, MALLOC_CAP_SPIRAM)), size}; } -template <> -auto AllocateStack() -> cpp::span { - constexpr std::size_t size = 4 * 1024; - static StackType_t sStack[size]; - return {sStack, size}; -} // 2 KiB in internal ram // 612 KiB in external ram. @@ -132,13 +122,6 @@ template <> auto Priority() -> UBaseType_t { return 1; } -// NVS writing requires suspending one of our cores, and disabling tasks with -// their stacks in PSRAM. Only do it when there's not more important work -// pending. -template <> -auto Priority() -> UBaseType_t { - return 2; -} template auto WorkerQueueSize() -> std::size_t; @@ -152,11 +135,6 @@ auto WorkerQueueSize() -> std::size_t { return 8; } -template <> -auto WorkerQueueSize() -> std::size_t { - return 2; -} - auto PersistentMain(void* fn) -> void { auto* function = reinterpret_cast*>(fn); std::invoke(*function); -- cgit v1.2.3