Struct nrf52840_hal::Twim

source ·
pub struct Twim<T>(_);
Expand description

Interface to a TWIM instance

This is a very basic interface that comes with the following limitation: The TWIM instances share the same address space with instances of SPIM, SPIS, SPI, TWIS, and TWI. For example, TWIM0 conflicts with SPIM0, SPIS0, etc.; TWIM1 conflicts with SPIM1, SPIS1, etc. You need to make sure that conflicting instances are disabled before using Twim. Please refer to the product specification for more information (section 15.2 for nRF52832, section 6.1.2 for nRF52840).

Implementations

Write to an I2C slave

The buffer must have a length of at most 255 bytes.

Read from an I2C slave

Write data to an I2C slave, then read data from the slave without triggering a stop condition between the two

The buffer must have a length of at most 255 bytes.

Return the raw interface to the underlying TWIM peripheral

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