pub struct I2cProxy<'a, M> { /* private fields */ }
Expand description

Proxy type for I2C bus sharing.

The I2cProxy implements all (blocking) I2C traits so it can be passed to drivers instead of the bus instance. Internally, it holds reference to the bus via a mutex, ensuring that all accesses are strictly synchronized.

An I2cProxy is created by calling BusManager::acquire_i2c().

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Error type

Reads enough bytes from slave with address to fill buffer Read more

Error type

Writes bytes to slave with address address Read more

Error type

Writes bytes to slave with address address and then reads enough bytes to fill buffer in a single transaction Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

Should always be Self

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.