ssd1362

Crates.iossd1362
lib.rsssd1362
version0.1.0
sourcesrc
created_at2020-08-11 12:10:03.961324
updated_at2020-08-11 12:10:03.961324
descriptionDriver to interface with SSD1362 based 256x64 OLED displays through SPI
homepage
repositoryhttps://github.com/devboard-io/ssd1362
max_upload_size
id275331
size825,604
Ingmar Jager (ijager)

documentation

https://docs.rs/ssd1362

README

SSD1362 OLED Driver crate

SPI Driver crate for SSD1362 OLED displays with resolution of 256x64.

How to build and run:

cargo build --example terminal
cargo run --example terminal

Example usage:

use ssd1362::{self, display::DisplayRotation, terminal};

// ... code omitted

let spi = dp.SPI1.spi(
    (sck, miso, mosi),
    spi::MODE_0,
    10.mhz(),
    &mut rcc);

// do power on reset
rst.set_low().unwrap();
delay.delay(1.ms());
rst.set_high().unwrap();

en_16v.set_high().unwrap();

let interface = display_interface_spi::SPIInterface::new(spi, dc, cs);
let display = ssd1362::display::Display::new(interface, DisplayRotation::Rotate180);
let font = terminal::Font6x8 {};
let mut terminal = terminal::TerminalView::new(display, font);
terminal.init().unwrap();

writeln!(terminal, "Write a string to the terminal").unwrap();
terminal.render().unwrap();
Commit count: 24

cargo fmt