Did some shitty docs.

This commit is contained in:
Elfein Landers 2022-01-26 20:06:04 -08:00
parent 95998acb99
commit c674fcc6e6
6 changed files with 13 additions and 9 deletions

View file

@ -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"

2
ableos/Cargo.lock generated
View file

@ -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",
]

View file

@ -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"] }

View file

@ -1 +1 @@
nightly
nightly-2022-01-04

View file

@ -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;

View file

@ -15,7 +15,7 @@ lazy_static::lazy_static! {
pub static ref VGAE_BUFF_OFFSET_X: spin::Mutex<u8> = spin::Mutex::new(0);
pub static ref VGAE_BUFF_OFFSET_Y: spin::Mutex<u8> = spin::Mutex::new(0);
}
///
pub fn draw_char(previous_character: Option<char>, 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<char>, character: char, _offset: usi
}
}
}
/// Converts a number to ... i forgor 💀
pub fn num_to_vga16(num: u8) -> Color16 {
use Color16::*;
match num {