From 609d9f07c82c33a8a8aade406692d95a431d20f1 Mon Sep 17 00:00:00 2001 From: Ryan Kennedy Date: Thu, 12 Mar 2020 17:40:53 -0500 Subject: [PATCH] Added example to README.md --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index 371a9dd..13f0858 100644 --- a/README.md +++ b/README.md @@ -4,3 +4,16 @@ and access to various registers. Memory addresses `0xA0000 -> 0xBFFFF` must be readable and writeable this crate to work properly. + +## Usage +```rust +use vga::colors::{Color16Bit, TextModeColor}; +use vga::Text80x25; + +let text_mode = Text80x25::new(); +let color = TextModeColor::new(Color16Bit::Yellow, Color16Bit::Black); + +text_mode.set_mode(); +text_mode.clear_screen(); +text_mode.write_character(0, 0, b'H', color); +```