Skip to content

Commit

Permalink
bump esp32-c3
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeGstefan committed Nov 15, 2024
1 parent d251ba7 commit e4d991d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion rtic-monotonics/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ stm32-metapac = { version = "15.0.0", optional = true }
imxrt-ral = { version = "0.5.3", optional = true }


esp32c3 = {version = "0.25.0", optional = true }
esp32c3 = {version = "0.26.0", optional = true }
riscv = {version = "0.12.1", optional = true }


Expand Down
2 changes: 1 addition & 1 deletion rtic/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ name = "rtic"

[dependencies]
riscv-slic = { version = "0.1.1", optional = true }
esp32c3 = { version = "0.25.0", optional = true }
esp32c3 = { version = "0.26.0", optional = true }
riscv = { version = "0.12.1", optional = true }
cortex-m = { version = "0.7.0", optional = true }
bare-metal = "1.0.0"
Expand Down
8 changes: 4 additions & 4 deletions rtic/src/export/riscv_esp32c3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,13 @@ pub unsafe fn lock<T, R>(ptr: *mut T, ceiling: u8, f: impl FnOnce(&mut T) -> R)
unsafe {
(*INTERRUPT_CORE0::ptr())
.cpu_int_thresh()
.write(|w| w.cpu_int_thresh().bits(ceiling + 1))
.write(|w| w.cpu_int_thresh().bits(ceiling + 1));
} //esp32c3 lets interrupts with prio equal to threshold through so we up it by one
let r = f(&mut *ptr);
unsafe {
(*INTERRUPT_CORE0::ptr())
.cpu_int_thresh()
.write(|w| w.cpu_int_thresh().bits(current))
.write(|w| w.cpu_int_thresh().bits(current));
}
r
}
Expand Down Expand Up @@ -106,7 +106,7 @@ pub fn pend(int: Interrupt) {
.cpu_intr_from_cpu_3()
.write(|w| w.cpu_intr_from_cpu_3().bit(true)),
_ => panic!("Unsupported software interrupt"), //should never happen, checked at compile time
}
};
}
}

Expand All @@ -132,7 +132,7 @@ pub fn unpend(int: Interrupt) {
.cpu_intr_from_cpu_3()
.write(|w| w.cpu_intr_from_cpu_3().bit(false)),
_ => panic!("Unsupported software interrupt"),
}
};
}
}

Expand Down

0 comments on commit e4d991d

Please sign in to comment.