mirror of
https://github.com/rcore-os/rCore-Tutorial-v3.git
synced 2024-11-24 18:36:24 +04:00
fix ch9 && remove some warnings
This commit is contained in:
parent
3d3d702b34
commit
ca30fac18b
@ -1,15 +1,3 @@
|
||||
/// use sbi call to putchar in console (qemu uart handler)
|
||||
pub fn console_putchar(c: usize) {
|
||||
#[allow(deprecated)]
|
||||
sbi_rt::legacy::console_putchar(c);
|
||||
}
|
||||
|
||||
/// use sbi call to getchar from console (qemu uart handler)
|
||||
pub fn console_getchar() -> usize {
|
||||
#[allow(deprecated)]
|
||||
sbi_rt::legacy::console_getchar()
|
||||
}
|
||||
|
||||
/// use sbi call to set timer
|
||||
pub fn set_timer(timer: usize) {
|
||||
sbi_rt::set_timer(timer as _);
|
||||
|
@ -57,7 +57,6 @@ pub fn block_current_and_run_next() {
|
||||
let task_cx_ptr = block_current_task();
|
||||
schedule(task_cx_ptr);
|
||||
}
|
||||
use crate::board::QEMUExit;
|
||||
|
||||
/// Exit the current 'Running' task and run the next task in task list.
|
||||
pub fn exit_current_and_run_next(exit_code: i32) {
|
||||
|
@ -58,8 +58,8 @@ impl DrawingBoard {
|
||||
pub fn main() -> i32 {
|
||||
let mut board = DrawingBoard::new();
|
||||
let _ = board.disp.clear(Rgb888::BLACK).unwrap();
|
||||
for i in 0..5 {
|
||||
board.latest_pos.x += (RECT_SIZE as i32 + 20);
|
||||
for _ in 0..5 {
|
||||
board.latest_pos.x += RECT_SIZE as i32 + 20;
|
||||
//board.latest_pos.y += i;
|
||||
board.paint();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user