LCDPhidget

Struct LCDPhidget 

Source
pub struct LCDPhidget { /* private fields */ }

Implementations§

Source§

impl LCDPhidget

Source

pub fn setup( hub_port: i32, remote: bool, max_wait_millis: u32, ) -> Result<LCDPhidget, u32>

Source

pub fn create() -> Result<LCDPhidget, u32>

Source

pub fn delete(&mut self) -> Result<(), u32>

Source

pub fn close(&self) -> Result<(), u32>

Source

pub fn get_backlight(&self) -> Result<f64, u32>

Source

pub fn set_backlight(&self, backlight: f64) -> Result<&Self, u32>

Source

pub fn get_min_backlight(&self) -> Result<f64, u32>

Source

pub fn get_max_backlight(&self) -> Result<f64, u32>

Source

pub fn clear(&self) -> Result<&Self, u32>

Source

pub fn get_contrast(&self) -> Result<f64, u32>

Source

pub fn get_min_contrast(&self) -> Result<f64, u32>

Source

pub fn get_max_contrast(&self) -> Result<f64, u32>

Source

pub fn draw_line( &self, x1: i32, y1: i32, x2: i32, y2: i32, ) -> Result<&Self, u32>

Source

pub fn draw_pixel( &self, x1: i32, y1: i32, pixel_state: PhidgetLCD_PixelState, ) -> Result<&Self, u32>

Source

pub fn draw_rect( &self, x1: i32, y1: i32, x2: i32, y2: i32, filled: bool, inverted: bool, ) -> Result<&Self, u32>

Draws a rectangle in the current frame buffer using the specified points.

Changes made to the frame buffer must be flushed to the LCD screen using flush.

Source

pub fn flush(&self) -> Result<(), u32>

Source

pub fn set_font_size( &self, font: PhidgetLCD_Font, width: i32, height: i32, ) -> Result<&Self, u32>

Source

pub fn get_frame_buffer(&self) -> Result<i32, u32>

Source

pub fn set_frame_buffer(&self, frame_buffer: i32) -> Result<&Self, u32>

Source

pub fn get_height(&self) -> Result<i32, u32>

Source

pub fn write_text( &self, font: PhidgetLCD_Font, x_position: i32, y_position: i32, text: &str, ) -> Result<(), u32>

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