Chapter3: power2/3/5 & sleep test worked on k210/qemu based on timer.

This commit is contained in:
Yifan Wu 2020-11-29 10:31:15 +08:00
parent adbe671fe1
commit 1cef77eac7
17 changed files with 183 additions and 82 deletions

View file

@ -24,6 +24,10 @@ fn sbi_call(which: usize, arg0: usize, arg1: usize, arg2: usize) -> usize {
ret
}
pub fn set_timer(timer: usize) {
sbi_call(SBI_SET_TIMER, timer, 0, 0);
}
pub fn console_putchar(c: usize) {
sbi_call(SBI_CONSOLE_PUTCHAR, c, 0, 0);
}