Readme, test and version number updates.

This commit is contained in:
Ryan Kennedy 2020-03-16 19:07:44 -05:00
parent cfeca28530
commit 44bb434c23
5 changed files with 19 additions and 8 deletions

View file

@ -1,6 +1,6 @@
[package] [package]
name = "vga" name = "vga"
version = "0.1.0" version = "0.1.1"
authors = ["Ryan Kennedy <rkennedy9064@gmail.com>"] authors = ["Ryan Kennedy <rkennedy9064@gmail.com>"]
edition = "2018" edition = "2018"
description = "Support for vga specific functions, data structures, and registers." description = "Support for vga specific functions, data structures, and registers."

View file

@ -5,15 +5,17 @@ and access to various registers.
Memory addresses `0xA0000 -> 0xBFFFF` must be readable and writeable Memory addresses `0xA0000 -> 0xBFFFF` must be readable and writeable
this crate to work properly. this crate to work properly.
**Note: This crate is currently experimental and subject to change since it's in active development.**
## Usage ## Usage
```rust ```rust
use vga::colors::{Color16Bit, TextModeColor}; use vga::colors::Color16Bit;
use vga::Text80x25; use vga::writers::{ScreenCharacter, TextWriter, Text80x25};
let text_mode = Text80x25::new(); 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.set_mode();
text_mode.clear_screen(); text_mode.clear_screen();
text_mode.write_character(0, 0, b'H', color); text_mode.write_character(0, 0, screen_character);
``` ```

View file

@ -15,12 +15,15 @@ const HEIGHT: usize = 25;
/// Basic usage: /// Basic usage:
/// ///
/// ```no_run /// ```no_run
/// use vga::writers::{TextWriter, Text40x25}; /// use vga::colors::Color16Bit;
/// use vga::writers::{ScreenCharacter, TextWriter, Text40x25};
/// ///
/// let text_mode = Text40x25::new(); /// let text_mode = Text40x25::new();
/// let screen_character = ScreenCharacter::new(b'T', Color16Bit::Yellow, Color16Bit::Black);
/// ///
/// text_mode.set_mode(); /// text_mode.set_mode();
/// text_mode.clear_screen(); /// text_mode.clear_screen();
/// text_mode.write_character(0, 0, screen_character);
/// ``` /// ```
#[derive(Default)] #[derive(Default)]
pub struct Text40x25; pub struct Text40x25;

View file

@ -15,12 +15,15 @@ const HEIGHT: usize = 50;
/// Basic usage: /// Basic usage:
/// ///
/// ```no_run /// ```no_run
/// use vga::writers::{TextWriter, Text40x50}; /// use vga::colors::Color16Bit;
/// use vga::writers::{ScreenCharacter, TextWriter, Text40x50};
/// ///
/// let text_mode = Text40x50::new(); /// let text_mode = Text40x50::new();
/// let screen_character = ScreenCharacter::new(b'T', Color16Bit::Yellow, Color16Bit::Black);
/// ///
/// text_mode.set_mode(); /// text_mode.set_mode();
/// text_mode.clear_screen(); /// text_mode.clear_screen();
/// text_mode.write_character(0, 0, screen_character);
/// ``` /// ```
#[derive(Default)] #[derive(Default)]
pub struct Text40x50; pub struct Text40x50;

View file

@ -15,12 +15,15 @@ const HEIGHT: usize = 25;
/// Basic usage: /// Basic usage:
/// ///
/// ```no_run /// ```no_run
/// use vga::writers::{TextWriter, Text80x25}; /// use vga::colors::Color16Bit;
/// use vga::writers::{ScreenCharacter, TextWriter, Text80x25};
/// ///
/// let text_mode = Text80x25::new(); /// let text_mode = Text80x25::new();
/// let screen_character = ScreenCharacter::new(b'T', Color16Bit::Yellow, Color16Bit::Black);
/// ///
/// text_mode.set_mode(); /// text_mode.set_mode();
/// text_mode.clear_screen(); /// text_mode.clear_screen();
/// text_mode.write_character(0, 0, screen_character);
/// ``` /// ```
#[derive(Default)] #[derive(Default)]
pub struct Text80x25; pub struct Text80x25;