Struct capsules_extra::lpm013m126::Lpm013m126

source ·
pub struct Lpm013m126<'a, A: Alarm<'a>, P: Pin, S: SpiMasterDevice<'a>> { /* private fields */ }

Implementations§

source§

impl<'a, A: Alarm<'a>, P: Pin, S: SpiMasterDevice<'a>> Lpm013m126<'a, A, P, S>
where Self: 'static,

source

pub fn new( spi: &'a S, extcomin: &'a P, disp: &'a P, alarm: &'a A, frame_buffer: &'static mut [u8; 15842], ) -> Result<Self, InitError>

source

pub fn setup(&'static self) -> Result<(), ErrorCode>

Set up internal data structures. Does not touch the hardware. Idempotent.

Trait Implementations§

source§

impl<'a, A: Alarm<'a>, P: Pin, S: SpiMasterDevice<'a>> AlarmClient for Lpm013m126<'a, A, P, S>
where Self: 'static,

source§

fn alarm(&self)

Callback indicating the alarm time has been reached. The alarm MUST be disabled when this is called. If a new alarm is needed, the client can call Alarm::set_alarm.
source§

impl<'a, A: Alarm<'a>, P: Pin, S: SpiMasterDevice<'a>> Screen<'a> for Lpm013m126<'a, A, P, S>
where Self: 'static,

source§

fn get_resolution(&self) -> (usize, usize)

Get a tuple (width, height) with the current resolution (in pixels). Read more
source§

fn get_pixel_format(&self) -> ScreenPixelFormat

Get the current pixel format. Read more
source§

fn get_rotation(&self) -> ScreenRotation

Get the current rotation. Read more
source§

fn set_write_frame( &self, x: usize, y: usize, width: usize, height: usize, ) -> Result<(), ErrorCode>

Sets the write frame. Read more
source§

fn write( &self, data: SubSliceMut<'static, u8>, _continue_write: bool, ) -> Result<(), ErrorCode>

Write data from buffer to the selected write frame. Read more
source§

fn set_client(&self, client: &'a dyn ScreenClient)

Set the object to receive the asynchronous command callbacks.
source§

fn set_power(&self, enable: bool) -> Result<(), ErrorCode>

Controls the screen power supply. Read more
source§

fn set_brightness(&self, _brightness: u16) -> Result<(), ErrorCode>

Set the display brightness value. Read more
source§

fn set_invert(&self, _inverted: bool) -> Result<(), ErrorCode>

Controls the color inversion mode. Read more
source§

impl<'a, A: Alarm<'a>, P: Pin, S: SpiMasterDevice<'a>> ScreenSetup<'a> for Lpm013m126<'a, A, P, S>

source§

fn set_client(&self, _client: &'a dyn ScreenSetupClient)

source§

fn set_resolution(&self, resolution: (usize, usize)) -> Result<(), ErrorCode>

Set the screen resolution in pixels with (X, Y). Read more
source§

fn set_pixel_format(&self, format: ScreenPixelFormat) -> Result<(), ErrorCode>

Set the pixel format. Read more
source§

fn set_rotation(&self, _rotation: ScreenRotation) -> Result<(), ErrorCode>

Set the rotation of the display. Read more
source§

fn get_num_supported_resolutions(&self) -> usize

Get the number of supported resolutions. Read more
source§

fn get_supported_resolution(&self, index: usize) -> Option<(usize, usize)>

Get the resolution specified by the given index. Read more
source§

fn get_num_supported_pixel_formats(&self) -> usize

Get the number of the pixel formats supported. Read more
source§

fn get_supported_pixel_format(&self, index: usize) -> Option<ScreenPixelFormat>

Get the pixel format specified by the given index. Read more
source§

impl<'a, A: Alarm<'a>, P: Pin, S: SpiMasterDevice<'a>> SpiMasterClient for Lpm013m126<'a, A, P, S>

source§

fn read_write_done( &self, write_buffer: SubSliceMut<'static, u8>, _read_buffer: Option<SubSliceMut<'static, u8>>, status: Result<usize, ErrorCode>, )

Callback issued when a read/write operation finishes. Read more

Auto Trait Implementations§

§

impl<'a, A, P, S> !Freeze for Lpm013m126<'a, A, P, S>

§

impl<'a, A, P, S> !RefUnwindSafe for Lpm013m126<'a, A, P, S>

§

impl<'a, A, P, S> !Send for Lpm013m126<'a, A, P, S>

§

impl<'a, A, P, S> !Sync for Lpm013m126<'a, A, P, S>

§

impl<'a, A, P, S> Unpin for Lpm013m126<'a, A, P, S>

§

impl<'a, A, P, S> !UnwindSafe for Lpm013m126<'a, A, P, S>

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> 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>,

§

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>,

§

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.
source§

impl<'a, T> ScreenAdvanced<'a> for T
where T: Screen<'a> + ScreenSetup<'a>,