Struct I2cDdc

Source
pub struct I2cDdc<I> { /* private fields */ }
Expand description

A handle to provide DDC/CI operations on an I2C device.

Implementations§

Source§

impl<I> I2cDdc<I>

Source

pub fn new(i2c: I) -> Self

Create a new DDC/CI handle with an existing open device.

Source

pub fn into_inner(self) -> I

Consume the handle to return the inner device.

Source

pub fn inner_ref(&self) -> &I

Borrow the inner device.

Source

pub fn inner_mut(&mut self) -> &mut I

Mutably borrow the inner device.

Trait Implementations§

Source§

impl<I: Clone> Clone for I2cDdc<I>

Source§

fn clone(&self) -> I2cDdc<I>

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

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

Performs copy-assignment from source. Read more
Source§

impl<I: Address + ReadWrite> DdcCommandRaw for I2cDdc<I>

Source§

fn execute_raw<'a>( &mut self, data: &[u8], out: &'a mut [u8], response_delay: Duration, ) -> Result<&'a mut [u8], Error<I::Error>>

Executes a raw DDC/CI command. Read more
Source§

impl<I: Address + ReadWrite> DdcCommandRawMarker for I2cDdc<I>

Source§

fn set_sleep_delay(&mut self, delay: Delay)

Sets an internal Delay that must expire before the next command is attempted.
Source§

impl<I: Master> DdcHost for I2cDdc<I>

Source§

type Error = Error<<I as Master>::Error>

An error that can occur when communicating with a DDC device. Read more
Source§

fn sleep(&mut self)

Wait for any previous commands to complete. Read more
Source§

impl<I: Debug> Debug for I2cDdc<I>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<I: Address + BlockTransfer + BulkTransfer> Eddc for I2cDdc<I>

Source§

fn read_eddc_edid( &mut self, segment: u8, offset: u8, data: &mut [u8], ) -> Result<usize, I::Error>

Read part of the EDID using the segments added in the Enhanced Display Data Channel (E-DDC) protocol.
Source§

impl<I: Address + BlockTransfer> Edid for I2cDdc<I>

Source§

type EdidError = <I as Master>::Error

An error that can occur when reading the EDID from a device.
Source§

fn read_edid(&mut self, offset: u8, data: &mut [u8]) -> Result<usize, I::Error>

Read up to 256 bytes of the monitor’s EDID.
Source§

impl<I: Address + ReadWrite> DdcCommandMarker for I2cDdc<I>

Auto Trait Implementations§

§

impl<I> Freeze for I2cDdc<I>
where I: Freeze,

§

impl<I> RefUnwindSafe for I2cDdc<I>
where I: RefUnwindSafe,

§

impl<I> Send for I2cDdc<I>
where I: Send,

§

impl<I> Sync for I2cDdc<I>
where I: Sync,

§

impl<I> Unpin for I2cDdc<I>
where I: Unpin,

§

impl<I> UnwindSafe for I2cDdc<I>
where I: UnwindSafe,

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, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.