From f7896669aa0433090dd3c6988bcf2429a0e8878f Mon Sep 17 00:00:00 2001 From: Folkert van Heusden Date: Wed, 26 Jun 2024 20:53:34 +0200 Subject: [PATCH] race in kw11-l --- kw11-l.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/kw11-l.cpp b/kw11-l.cpp index 863438e..8aef37d 100644 --- a/kw11-l.cpp +++ b/kw11-l.cpp @@ -67,6 +67,11 @@ void kw11_l::begin(console *const cnsl) void kw11_l::reset() { +#if defined(BUILD_FOR_RP2040) + xSemaphoreTake(lf_csr_lock, portMAX_DELAY); +#else + std::unique_lock lck(lf_csr_lock); +#endif lf_csr = 0; }