Skip to content

Commit

Permalink
Small fixes
Browse files Browse the repository at this point in the history
Will not work, needs another patch for PACs
  • Loading branch information
playfulFence committed Aug 9, 2024
1 parent 715ed4e commit 698fe48
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions esp-hal/src/interrupt/riscv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -733,15 +733,15 @@ mod plic {
.read()
.cpu_mxint_pri()
.bits();
core::mem::transmute::<u8, Priority>(prio as u8)
core::mem::transmute::<u8, Priority>(prio)
}
#[no_mangle]
#[link_section = ".trap"]
pub(super) unsafe extern "C" fn _handle_priority() -> u32 {
use super::mcause;
let plic = &*crate::peripherals::PLIC_MX::PTR;

let interrupt_id: usize = unwrap!(mcause::read().code().try_into()); // MSB is whether its exception or interrupt.
let interrupt_id: usize = unwrap!(mcause::read().code()); // MSB is whether its exception or interrupt.
let interrupt_priority = plic.mxint_pri(interrupt_id).read().cpu_mxint_pri().bits();

let prev_interrupt_priority = plic.mxint_thresh().read().cpu_mxint_thresh().bits();
Expand Down
4 changes: 2 additions & 2 deletions esp-hal/src/soc/esp32h2/radio_clocks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,9 @@ fn init_clocks() {
pmu.hp_active_icg_modem()
.modify(|_, w| w.hp_active_dig_icg_modem_code().bits(2));
pmu.imm_modem_icg()
.modify(|_, w| w.update_dig_icg_modem_en().set_bit());
.write(|w| w.update_dig_icg_modem_en().set_bit());
pmu.imm_sleep_sysclk()
.modify(|_, w| w.update_dig_icg_switch().set_bit());
.write(|w| w.update_dig_icg_switch().set_bit());

(*esp32h2::MODEM_LPCON::PTR).clk_conf().modify(|_, w| {
w.clk_i2c_mst_en()
Expand Down

0 comments on commit 698fe48

Please sign in to comment.