From c674fcc6e62f2fce4f380da3cf413782b65e944f Mon Sep 17 00:00:00 2001 From: Elfein Landers Date: Wed, 26 Jan 2022 20:06:04 -0800 Subject: [PATCH] Did some shitty docs. --- ableos/.cargo/config.toml | 2 +- ableos/Cargo.lock | 2 +- ableos/Cargo.toml | 8 ++++---- ableos/rust-toolchain | 2 +- ableos/src/lib.rs | 5 ++++- ableos/src/vga_e.rs | 3 ++- 6 files changed, 13 insertions(+), 9 deletions(-) diff --git a/ableos/.cargo/config.toml b/ableos/.cargo/config.toml index ef48109..2cc8583 100644 --- a/ableos/.cargo/config.toml +++ b/ableos/.cargo/config.toml @@ -8,7 +8,7 @@ build-std-features = ["compiler-builtins-mem"] [target.'cfg(target_arch = "x86_64")'] # --quiet suppresses warning messages from the bootimage crate -runner = "bootimage runner --quiet" +runner = "bootimage runner" [target.riscv64gc-unknown-none-elf] rustflags = "-C link-arg=-T../ableos/src/arch/riscv/virt.lds" diff --git a/ableos/Cargo.lock b/ableos/Cargo.lock index 9cf3fa3..ff20fbf 100644 --- a/ableos/Cargo.lock +++ b/ableos/Cargo.lock @@ -167,7 +167,7 @@ checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" [[package]] name = "externc-libm" version = "0.1.0" -source = "git+ssh://root@git.ablecorp.us:20/able/externc-libm.git#0781df85c094bcd7e5ef7505e9c5cc6317eeda75" +source = "git+https://git.ablecorp.us/able/externc-libm.git#0781df85c094bcd7e5ef7505e9c5cc6317eeda75" dependencies = [ "libm", ] diff --git a/ableos/Cargo.toml b/ableos/Cargo.toml index ee3afed..dec2dae 100644 --- a/ableos/Cargo.toml +++ b/ableos/Cargo.toml @@ -36,7 +36,7 @@ lliw = "0.2.0" # qoi_rs = "*" spin = "0.5.2" vga = "*" -log= "*" +log = "*" pretty-hex = "0.2.1" unicode-width = "0.1.7" picorand = "*" @@ -57,10 +57,10 @@ version = "0.7.29" default-features = false features = ["size_64", "alloc"] -[dependencies.smoltcp] +[dependencies.smoltcp] version = "0.8.0" default-features = false -features = ["log", "proto-ipv4"] +features = ["log", "proto-ipv4"] [dependencies.y-compositor-protocol] git = "https://git.ablecorp.us:443/able/y-compositor-protocol.git" @@ -83,7 +83,7 @@ features = ["spin_no_std"] version = "1.0" [dependencies.externc-libm] -git = "ssh://root@git.ablecorp.us:20/able/externc-libm.git" +git = "https://git.ablecorp.us/able/externc-libm.git" [target.'cfg(target_arch = "x86_64")'.dependencies] bootloader = { version = "0.9.8", features = ["map_physical_memory"] } diff --git a/ableos/rust-toolchain b/ableos/rust-toolchain index bf867e0..c6d365e 100644 --- a/ableos/rust-toolchain +++ b/ableos/rust-toolchain @@ -1 +1 @@ -nightly +nightly-2022-01-04 diff --git a/ableos/src/lib.rs b/ableos/src/lib.rs index 47e4c6f..8b17140 100644 --- a/ableos/src/lib.rs +++ b/ableos/src/lib.rs @@ -1,5 +1,5 @@ //! hi - +#![deny(missing_docs)] #![no_std] #![feature( abi_x86_interrupt, @@ -14,14 +14,17 @@ )] #![feature(exclusive_range_pattern)] +/// Contains architecture specific code for aarch64. #[cfg(target_arch = "aarch64")] #[path = "arch/aarch64/mod.rs"] pub mod arch; +/// Contains architecture specific code for x86_64. #[cfg(target_arch = "x86_64")] #[path = "arch/x86_64/mod.rs"] pub mod arch; +/// Contains architecture specific code for riscv64. #[cfg(target_arch = "riscv64")] #[path = "arch/riscv/mod.rs"] pub mod arch; diff --git a/ableos/src/vga_e.rs b/ableos/src/vga_e.rs index 773193f..f2d6468 100644 --- a/ableos/src/vga_e.rs +++ b/ableos/src/vga_e.rs @@ -15,7 +15,7 @@ lazy_static::lazy_static! { pub static ref VGAE_BUFF_OFFSET_X: spin::Mutex = spin::Mutex::new(0); pub static ref VGAE_BUFF_OFFSET_Y: spin::Mutex = spin::Mutex::new(0); } - +/// pub fn draw_char(previous_character: Option, character: char, _offset: usize) { let mode = *VGAE.lock(); let mut offset_x = VGAE_BUFF_OFFSET_X.lock(); @@ -96,6 +96,7 @@ pub fn draw_char(previous_character: Option, character: char, _offset: usi } } } +/// Converts a number to ... i forgor 💀 pub fn num_to_vga16(num: u8) -> Color16 { use Color16::*; match num {