From 44bb434c2315303f42adf604bdb9ba535f05a6f9 Mon Sep 17 00:00:00 2001 From: Ryan Kennedy Date: Mon, 16 Mar 2020 19:07:44 -0500 Subject: [PATCH] Readme, test and version number updates. --- Cargo.toml | 2 +- README.md | 10 ++++++---- src/writers/text_40x25.rs | 5 ++++- src/writers/text_40x50.rs | 5 ++++- src/writers/text_80x25.rs | 5 ++++- 5 files changed, 19 insertions(+), 8 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 694ce9c..ed4879b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "vga" -version = "0.1.0" +version = "0.1.1" authors = ["Ryan Kennedy "] edition = "2018" description = "Support for vga specific functions, data structures, and registers." diff --git a/README.md b/README.md index 13f0858..e80e967 100644 --- a/README.md +++ b/README.md @@ -5,15 +5,17 @@ and access to various registers. Memory addresses `0xA0000 -> 0xBFFFF` must be readable and writeable this crate to work properly. +**Note: This crate is currently experimental and subject to change since it's in active development.** + ## Usage ```rust -use vga::colors::{Color16Bit, TextModeColor}; -use vga::Text80x25; +use vga::colors::Color16Bit; +use vga::writers::{ScreenCharacter, TextWriter, Text80x25}; let text_mode = Text80x25::new(); -let color = TextModeColor::new(Color16Bit::Yellow, Color16Bit::Black); +let screen_character = ScreenCharacter::new(b'T'Color16Bit::Yellow, Color16Bit::Black); text_mode.set_mode(); text_mode.clear_screen(); -text_mode.write_character(0, 0, b'H', color); +text_mode.write_character(0, 0, screen_character); ``` diff --git a/src/writers/text_40x25.rs b/src/writers/text_40x25.rs index 9ff796c..3ce2328 100644 --- a/src/writers/text_40x25.rs +++ b/src/writers/text_40x25.rs @@ -15,12 +15,15 @@ const HEIGHT: usize = 25; /// Basic usage: /// /// ```no_run -/// use vga::writers::{TextWriter, Text40x25}; +/// use vga::colors::Color16Bit; +/// use vga::writers::{ScreenCharacter, TextWriter, Text40x25}; /// /// let text_mode = Text40x25::new(); +/// let screen_character = ScreenCharacter::new(b'T', Color16Bit::Yellow, Color16Bit::Black); /// /// text_mode.set_mode(); /// text_mode.clear_screen(); +/// text_mode.write_character(0, 0, screen_character); /// ``` #[derive(Default)] pub struct Text40x25; diff --git a/src/writers/text_40x50.rs b/src/writers/text_40x50.rs index 67078dc..0e0397b 100644 --- a/src/writers/text_40x50.rs +++ b/src/writers/text_40x50.rs @@ -15,12 +15,15 @@ const HEIGHT: usize = 50; /// Basic usage: /// /// ```no_run -/// use vga::writers::{TextWriter, Text40x50}; +/// use vga::colors::Color16Bit; +/// use vga::writers::{ScreenCharacter, TextWriter, Text40x50}; /// /// let text_mode = Text40x50::new(); +/// let screen_character = ScreenCharacter::new(b'T', Color16Bit::Yellow, Color16Bit::Black); /// /// text_mode.set_mode(); /// text_mode.clear_screen(); +/// text_mode.write_character(0, 0, screen_character); /// ``` #[derive(Default)] pub struct Text40x50; diff --git a/src/writers/text_80x25.rs b/src/writers/text_80x25.rs index c8936e9..5dcf524 100644 --- a/src/writers/text_80x25.rs +++ b/src/writers/text_80x25.rs @@ -15,12 +15,15 @@ const HEIGHT: usize = 25; /// Basic usage: /// /// ```no_run -/// use vga::writers::{TextWriter, Text80x25}; +/// use vga::colors::Color16Bit; +/// use vga::writers::{ScreenCharacter, TextWriter, Text80x25}; /// /// let text_mode = Text80x25::new(); +/// let screen_character = ScreenCharacter::new(b'T', Color16Bit::Yellow, Color16Bit::Black); /// /// text_mode.set_mode(); /// text_mode.clear_screen(); +/// text_mode.write_character(0, 0, screen_character); /// ``` #[derive(Default)] pub struct Text80x25;