mirror of
https://github.com/yuri91/ili9341-rs.git
synced 2024-11-21 14:30:58 +00:00
Merge pull request #30 from plaes/min-doc-example
Add basic usage example to the index screen
This commit is contained in:
commit
8aeefc4abc
1 changed files with 25 additions and 0 deletions
25
src/lib.rs
25
src/lib.rs
|
@ -1,5 +1,30 @@
|
|||
#![no_std]
|
||||
|
||||
//! ILI9341 Display Driver
|
||||
//!
|
||||
//! ### Usage
|
||||
//!
|
||||
//! To control the display you need to set up:
|
||||
//!
|
||||
//! * Interface for communicating with display ([display-interface-spi crate] for SPI)
|
||||
//! * Configuration (reset pin, delay, orientation and size) for display
|
||||
//!
|
||||
//! ```ignore
|
||||
//! let iface = SPIInterface::new(spi, dc, cs);
|
||||
//!
|
||||
//! let mut display = Ili9341::new(
|
||||
//! iface,
|
||||
//! reset_gpio,
|
||||
//! &mut delay,
|
||||
//! Orientation::Landscape,
|
||||
//! ili9341::DisplaySize240x320,
|
||||
//! )
|
||||
//! .unwrap();
|
||||
//!
|
||||
//! display.clear(Rgb565::RED).unwrap()
|
||||
//! ```
|
||||
//!
|
||||
//! [display-interface-spi crate]: https://crates.io/crates/display-interface-spi
|
||||
use embedded_hal::blocking::delay::DelayMs;
|
||||
use embedded_hal::digital::v2::OutputPin;
|
||||
|
||||
|
|
Loading…
Reference in a new issue