From 1b0fc6b3f3c8eaeb4ca37d4ef2931ff151e507a5 Mon Sep 17 00:00:00 2001 From: Fan Jiang Date: Tue, 30 Jan 2024 02:02:11 -0500 Subject: [PATCH] Fix get_raw_core (#1126) --- CHANGELOG.md | 1 + esp-hal-common/src/lib.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index be5c4a20fd1..b67f2365bd9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Fix embassy-time tick rate not set when using systick as the embassy timebase (#1124) +- Fix `get_raw_core` on Xtensa (#1126) ### Changed diff --git a/esp-hal-common/src/lib.rs b/esp-hal-common/src/lib.rs index 28c3996a5a2..771f9f4628c 100644 --- a/esp-hal-common/src/lib.rs +++ b/esp-hal-common/src/lib.rs @@ -221,7 +221,7 @@ fn get_raw_core() -> usize { #[cfg(xtensa)] fn get_raw_core() -> usize { - xtensa_lx::get_processor_id() as usize & 0x2000 + ((xtensa_lx::get_processor_id() as usize & 0x2000) != 0) as usize } mod critical_section_impl {