mirror of
https://github.com/iceHtwoO/novaOS.git
synced 2026-04-17 20:52:27 +00:00
Trying to fix exception in el1
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
use core::result::Result;
|
||||
use core::result::Result::Ok;
|
||||
|
||||
use crate::timer::delay_nops;
|
||||
use crate::timer::{delay_nops, sleep_ms};
|
||||
use crate::{mmio_read, mmio_write};
|
||||
|
||||
const GPFSEL_BASE: u32 = 0x3F20_0000;
|
||||
@@ -164,3 +164,11 @@ pub fn set_rising_edge_detect(gpio: u8, enable: bool) {
|
||||
|
||||
mmio_write(register_addr, new_val);
|
||||
}
|
||||
|
||||
pub fn blink_gpio(gpio: u8, duration_ms: u32) {
|
||||
let _ = gpio_high(gpio);
|
||||
|
||||
sleep_ms(duration_ms);
|
||||
let _ = gpio_low(gpio);
|
||||
sleep_ms(duration_ms);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user