race in kw11-l

This commit is contained in:
Folkert van Heusden 2024-06-26 20:53:34 +02:00
parent cc38bd8b17
commit f7896669aa
Signed by untrusted user who does not match committer: folkert
GPG key ID: 30190E8C1F28D8AE

View file

@ -67,6 +67,11 @@ void kw11_l::begin(console *const cnsl)
void kw11_l::reset() void kw11_l::reset()
{ {
#if defined(BUILD_FOR_RP2040)
xSemaphoreTake(lf_csr_lock, portMAX_DELAY);
#else
std::unique_lock<std::mutex> lck(lf_csr_lock);
#endif
lf_csr = 0; lf_csr = 0;
} }