transfer_with

Function transfer_with 

Source
pub async fn transfer_with<I: I2c>(
    bus: &mut I,
    request: TransferRequest<'_>,
    out: &mut [u8],
) -> Result<usize, Status>
Expand description

Perform request on bus, writing the concatenated read data into out and returning its length.

The operations are handed to the HAL as one transaction, so the wire semantics—repeated START on a change of direction, no restart between consecutive operations of the same direction, one STOP—are the HAL’s transaction contract. Consecutive reads are coalesced before carving out. Write data is packed into scratch space so consecutive writes also reach the HAL as one operation, without an extra START/address.