forked from AbleOS/ableos
Did some shitty docs.
This commit is contained in:
parent
95998acb99
commit
c674fcc6e6
|
@ -8,7 +8,7 @@ build-std-features = ["compiler-builtins-mem"]
|
||||||
|
|
||||||
[target.'cfg(target_arch = "x86_64")']
|
[target.'cfg(target_arch = "x86_64")']
|
||||||
# --quiet suppresses warning messages from the bootimage crate
|
# --quiet suppresses warning messages from the bootimage crate
|
||||||
runner = "bootimage runner --quiet"
|
runner = "bootimage runner"
|
||||||
|
|
||||||
[target.riscv64gc-unknown-none-elf]
|
[target.riscv64gc-unknown-none-elf]
|
||||||
rustflags = "-C link-arg=-T../ableos/src/arch/riscv/virt.lds"
|
rustflags = "-C link-arg=-T../ableos/src/arch/riscv/virt.lds"
|
||||||
|
|
2
ableos/Cargo.lock
generated
2
ableos/Cargo.lock
generated
|
@ -167,7 +167,7 @@ checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650"
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "externc-libm"
|
name = "externc-libm"
|
||||||
version = "0.1.0"
|
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 = [
|
dependencies = [
|
||||||
"libm",
|
"libm",
|
||||||
]
|
]
|
||||||
|
|
|
@ -83,7 +83,7 @@ features = ["spin_no_std"]
|
||||||
version = "1.0"
|
version = "1.0"
|
||||||
|
|
||||||
[dependencies.externc-libm]
|
[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]
|
[target.'cfg(target_arch = "x86_64")'.dependencies]
|
||||||
bootloader = { version = "0.9.8", features = ["map_physical_memory"] }
|
bootloader = { version = "0.9.8", features = ["map_physical_memory"] }
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
nightly
|
nightly-2022-01-04
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
//! hi
|
//! hi
|
||||||
|
#![deny(missing_docs)]
|
||||||
#![no_std]
|
#![no_std]
|
||||||
#![feature(
|
#![feature(
|
||||||
abi_x86_interrupt,
|
abi_x86_interrupt,
|
||||||
|
@ -14,14 +14,17 @@
|
||||||
)]
|
)]
|
||||||
#![feature(exclusive_range_pattern)]
|
#![feature(exclusive_range_pattern)]
|
||||||
|
|
||||||
|
/// Contains architecture specific code for aarch64.
|
||||||
#[cfg(target_arch = "aarch64")]
|
#[cfg(target_arch = "aarch64")]
|
||||||
#[path = "arch/aarch64/mod.rs"]
|
#[path = "arch/aarch64/mod.rs"]
|
||||||
pub mod arch;
|
pub mod arch;
|
||||||
|
|
||||||
|
/// Contains architecture specific code for x86_64.
|
||||||
#[cfg(target_arch = "x86_64")]
|
#[cfg(target_arch = "x86_64")]
|
||||||
#[path = "arch/x86_64/mod.rs"]
|
#[path = "arch/x86_64/mod.rs"]
|
||||||
pub mod arch;
|
pub mod arch;
|
||||||
|
|
||||||
|
/// Contains architecture specific code for riscv64.
|
||||||
#[cfg(target_arch = "riscv64")]
|
#[cfg(target_arch = "riscv64")]
|
||||||
#[path = "arch/riscv/mod.rs"]
|
#[path = "arch/riscv/mod.rs"]
|
||||||
pub mod arch;
|
pub mod arch;
|
||||||
|
|
|
@ -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_X: spin::Mutex<u8> = spin::Mutex::new(0);
|
||||||
pub static ref VGAE_BUFF_OFFSET_Y: 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) {
|
pub fn draw_char(previous_character: Option<char>, character: char, _offset: usize) {
|
||||||
let mode = *VGAE.lock();
|
let mode = *VGAE.lock();
|
||||||
let mut offset_x = VGAE_BUFF_OFFSET_X.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 {
|
pub fn num_to_vga16(num: u8) -> Color16 {
|
||||||
use Color16::*;
|
use Color16::*;
|
||||||
match num {
|
match num {
|
||||||
|
|
Loading…
Reference in a new issue