[][src]Module ssd1306::mode::terminal

Unbuffered terminal display mode

This mode uses the 7x7 pixel MarioChrome font to draw characters to the display without needing a framebuffer. It will write characters from top left to bottom right in an 8x8 pixel grid, restarting at the top left of the display once full. The display itself takes care of wrapping lines.

use core::fmt::Write;
use ssd1306::{mode::TerminalMode, Builder};

let mut display: TerminalMode<_> = Builder::new().connect_i2c(i2c).into();

display.init().unwrap();
display.clear().unwrap();

// Print a-zA-Z
for c in 97..123 {
    display.write_str(unsafe { core::str::from_utf8_unchecked(&[c]) }).unwrap();
}

Structs

TerminalMode

Terminal mode handler

Enums

TerminalModeError

Errors which can occur when interacting with the terminal mode