Struct ssd1325::Ssd1325
[−]
[src]
pub struct Ssd1325<'a> { /* fields omitted */ }
An SSD1325 display interface command adapter.
Methods
impl<'a> Ssd1325<'a>
[src]
fn new(
transport: &'a mut Write,
control_channel: &'a mut ControlChannel
) -> Self
transport: &'a mut Write,
control_channel: &'a mut ControlChannel
) -> Self
Returns a new instance of the receiver.
The transport
instance is used to send data to the display, typically over SPI although
the MCU interface can be used if a suitable adapter is provided.
The control_channel
is used to put the display into a given mode before writing data.
Typically, this is done using sysfs gpio.
The display must be initialized prior to use, and is left Off.
fn init(&mut self) -> Result<(), Box<Error>>
Resets and initializes the display. Blocks for approximately 600ms.
fn clear(&mut self) -> Result<(), Box<Error>>
Clears the display.
fn set_on(&mut self, on: bool) -> Result<(), Box<Error>>
Turn the display on or off. Configured to Off after initialization.
fn set_inverted(&mut self, inverted: bool) -> Result<(), Box<Error>>
Make the display inverted or normal. Configured to Normal after initialization.
fn blit_l1(&mut self, frame: &[[u8; 16]; 64]) -> Result<(), Box<Error>>
Send an entire bitmap frame to the display.
The input image must be a 1-bit bitmap image arranged as 64 rows of 128 pixels.
Pixels must be packed 8 per byte, with the most significant bit corresponding to
the first pixel in the group (i.e. 0b1234567
).