capsules_extra::ssd1306

Enum Command

Source
#[repr(usize)]
pub enum Command {
Show 25 variants SetChargePump { enable: bool, }, SetContrast { contrast: u8, }, EntireDisplayOn { ignore_ram: bool, }, SetDisplayInvert { inverse: bool, }, SetDisplayOnOff { on: bool, }, ContinuousHorizontalScroll { left: bool, page_start: u8, interval: u8, page_end: u8, }, ContinuousVerticalHorizontalScroll { left: bool, page_start: u8, interval: u8, page_end: u8, vertical_offset: u8, }, DeactivateScroll = 46, ActivateScroll = 47, SetVerticalScrollArea { rows_fixed: u8, rows_scroll: u8, }, SetLowerColumnStartAddress { address: u8, }, SetHigherColumnStartAddress { address: u8, }, SetMemoryAddressingMode { mode: u8, }, SetColumnAddress { column_start: u8, column_end: u8, }, SetPageAddress { page_start: u8, page_end: u8, }, SetPageStartAddress { address: u8, }, SetDisplayStartLine { line: u8, }, SetSegmentRemap { reverse: bool, }, SetMultiplexRatio { ratio: u8, }, SetComScanDirection { decrement: bool, }, SetDisplayOffset { vertical_shift: u8, }, SetComPins { alternative: bool, enable_com: bool, }, SetDisplayClockDivide { divide_ratio: u8, oscillator_frequency: u8, }, SetPrechargePeriod { phase1: u8, phase2: u8, }, SetVcomDeselect { level: u8, },
}

Variants§

§

SetChargePump

Charge Pump Setting.

Fields

§enable: bool
§

SetContrast

SetContrastControl. Double byte command to select 1 out of 256 contrast steps. Contrast increases as the value increases.

Fields

§contrast: u8
§

EntireDisplayOn

Entire Display On.

Fields

§ignore_ram: bool
§

SetDisplayInvert

Set Normal Display.

Fields

§inverse: bool
§

SetDisplayOnOff

Set Display Off.

Fields

§on: bool
§

ContinuousHorizontalScroll

Continuous Horizontal Scroll. Right or Left Horizontal Scroll.

Fields

§left: bool
§page_start: u8
§interval: u8
§page_end: u8
§

ContinuousVerticalHorizontalScroll

Continuous Vertical and Horizontal Scroll. Vertical and Right Horizontal Scroll.

Fields

§left: bool
§page_start: u8
§interval: u8
§page_end: u8
§vertical_offset: u8
§

DeactivateScroll = 46

Deactivate Scroll. Stop scrolling that is configured by scroll commands.

§

ActivateScroll = 47

Activate Scroll. Start scrolling that is configured by scroll commands.

§

SetVerticalScrollArea

Set Vertical Scroll Area. Set number of rows in top fixed area. The number of rows in top fixed area is referenced to the top of the GDDRAM (i.e. row 0).

Fields

§rows_fixed: u8
§rows_scroll: u8
§

SetLowerColumnStartAddress

Set Lower Column Start Address for Page Addressing Mode.

Set the lower nibble of the column start address register for Page Addressing Mode using X[3:0] as data bits. The initial display line register is reset to 0000b after RESET.

Fields

§address: u8
§

SetHigherColumnStartAddress

Set Higher Column Start Address for Page Addressing Mode.

Set the higher nibble of the column start address register for Page Addressing Mode using X[3:0] as data bits. The initial display line register is reset to 0000b after RESET.

Fields

§address: u8
§

SetMemoryAddressingMode

Set Memory Addressing Mode.

Fields

§mode: u8
§

SetColumnAddress

Set Column Address. Setup column start and end address.

Fields

§column_start: u8
§column_end: u8
§

SetPageAddress

Set Page Address. Setup page start and end address.

Fields

§page_start: u8
§page_end: u8
§

SetPageStartAddress

Set Page Start Address for Page Addressing Mode. Set GDDRAM Page Start Address (PAGE0~PAGE7) for Page Addressing Mode using X[2:0].

Fields

§address: u8
§

SetDisplayStartLine

Set Display Start Line. Set display RAM display start line register from 0-63 using X[5:0].

Fields

§line: u8
§

SetSegmentRemap

Set Segment Remap.

Fields

§reverse: bool
§

SetMultiplexRatio

Set Multiplex Ratio.

Fields

§ratio: u8
§

SetComScanDirection

Set COM Output Scan Direction.

Fields

§decrement: bool
§

SetDisplayOffset

Set Display Offset. Set vertical shift by COM from 0-63.

Fields

§vertical_shift: u8
§

SetComPins

Set COM Pins Hardware Configuration

Fields

§alternative: bool
§enable_com: bool
§

SetDisplayClockDivide

Set Display Clock Divide Ratio/Oscillator Frequency.

Fields

§divide_ratio: u8
§oscillator_frequency: u8
§

SetPrechargePeriod

Set Pre-charge Period.

Fields

§phase1: u8
§phase2: u8
§

SetVcomDeselect

Set VCOMH Deselect Level.

Fields

§level: u8

Implementations§

Source§

impl Command

Source

pub fn encode(self, buffer: &mut SubSliceMut<'static, u8>)

Trait Implementations§

Source§

impl Clone for Command

Source§

fn clone(&self) -> Command

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl PartialEq for Command

Source§

fn eq(&self, other: &Command) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for Command

Source§

impl StructuralPartialEq for Command

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.