Struct vga_framebuffer::FrameBuffer[][src]

pub struct FrameBuffer<'a, T> where
    T: Hardware
{ /* fields omitted */ }

This structure represents the framebuffer - a 2D array of monochome pixels.

The framebuffer is stored as an array of horizontal lines, where each line is comprised of 8 bit words. This suits our timing needs as although the SPI peripheral on an LM4F120 which can emit 16 bits at a time, 8 proves easier to work with.

Methods

impl<'a, T> FrameBuffer<'a, T> where
    T: Hardware
[src]

Create a new FrameBuffer

Initialise the hardware (by calling the configure callback).

Enable mode2 - a 1-bit-per-pixel graphical buffer which is coloured according to the colour attributes for the matching text cells. Supply a u8 slice that is some multiple of USABLE_HORIZONTAL_OCTETS long. The buffer will be line-doubled and so can be up to 288 lines long.

Releases the memory for mode2. The rendering code may keep reading this memory buffer up until the end of the frame.

Returns the current frame number.

Returns the current visible line number or None in the blanking period.

Returns the number of lines since startup.

Call this at the start of every line.

Clears the screen and resets the cursor to 0,0.

Puts a glyph on screen at the specified place

Puts a glyph on screen at the current position.

Changes the attribute for a given position, leaving the glyph unchanged.

Change the current character attribute

Get the current character attribute

Trait Implementations

impl<'a, T> BaseConsole for FrameBuffer<'a, T> where
    T: Hardware
[src]

Gets the last col on the screen.

Gets the last row on the screen.

Set the horizontal position for the next text output.

Set the vertical position for the next text output.

Set the horizontal and vertical position for the next text output.

Get the current screen position.

Set the control char mode

Get the current control char mode

Set the escape char mode

Get the current escape char mode

Called when the screen needs to scroll up one row.

Set the horizontal and vertical position for the next text output. Don't bounds check the value, we've already done it. Read more

Move the current cursor right one position. Wraps at the end of the line. Returns Ok(true) if the screen needs to scroll, or Ok(false) if it does not. Read more

impl<'a, T> AsciiConsole for FrameBuffer<'a, T> where
    T: Hardware
[src]

Handle an escape char. We take a, b, c, d, e, f, g, h as being a background colour and A..H as being a foreground colour. 'Z' means clear the screen.

Write a single Unicode char to the screen at the given position without updating the current position.

Write an 8-bit string to the screen at the given position. Updates the current position to the end of the string. Strings will wrap across the end of the screen and scroll the screen if they reach the bottom. Read more

Write a single 8-bit char to the screen at the current position.

Write an 8-bit string to the screen at the given position. Updates the current position to the end of the string. Strings will wrap across the end of the screen and scroll the screen if they reach the bottom. Read more

Check if an 8-bit char is special

impl<'a, T> Write for FrameBuffer<'a, T> where
    T: Hardware
[src]

Writes a slice of bytes into this writer, returning whether the write succeeded. Read more

Writes a [char] into this writer, returning whether the write succeeded. Read more

Glue for usage of the [write!] macro with implementors of this trait. Read more

Auto Trait Implementations

impl<'a, T> Send for FrameBuffer<'a, T> where
    T: Send

impl<'a, T> Sync for FrameBuffer<'a, T> where
    T: Sync