Skip to content
This repository has been archived by the owner on Feb 6, 2024. It is now read-only.

Commit

Permalink
Merge pull request #47 from esp-rs/bugfix/allow-interrupt-level-preem…
Browse files Browse the repository at this point in the history
…ption

allow interrupt level preemption
  • Loading branch information
bjoernQ authored Jul 20, 2022
2 parents 70c56b1 + 439aeda commit 654c930
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "xtensa-lx-rt"
version = "0.12.0"
version = "0.13.0"
description = "Low level access for Xtensa LX processors"
categories = ["embedded", "hardware-support", "no-std"]
keywords = ["xtensa", "lx", "register", "peripheral"]
Expand Down
6 changes: 5 additions & 1 deletion src/exception/assembly_esp32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,10 @@ unsafe extern "C" fn __default_naked_exception() {
j .RestoreContext
.Level1Interrupt:
movi a0, (1 | PS_WOE) // set PS.INTLEVEL accordingly
wsr a0, PS
rsync
movi a6, 1 // put interrupt level in a6 = a2 in callee
mov a7, sp // put address of save frame in a7=a3 in callee
call4 __level_1_interrupt // call handler <= actual call!
Expand Down Expand Up @@ -569,7 +573,7 @@ global_asm!(
.macro HANDLE_INTERRUPT_LEVEL level
SAVE_CONTEXT \level
movi a0, (PS_INTLEVEL_EXCM | PS_WOE)
movi a0, (\level | PS_WOE)
wsr a0, PS
rsync
Expand Down

0 comments on commit 654c930

Please sign in to comment.