Table of Contents

Class I2cStep

Namespace
Pamoja.Hal
Assembly
Pamoja.Hal.dll

One transfer a script expects, and what the part answers.

public sealed class I2cStep
Inheritance
I2cStep
Inherited Members

Methods

Fault(byte, I2cFault)

The next transfer to the address fails, the way a missing or busy part does.

public static I2cStep Fault(byte address, I2cFault fault)

Parameters

address byte

The 7-bit address the failing transfer must go to.

fault I2cFault

The failure the driver sees.

Returns

I2cStep

The step.

Read(byte, ReadOnlySpan<byte>)

The driver reads from the address and receives reply.

public static I2cStep Read(byte address, ReadOnlySpan<byte> reply)

Parameters

address byte

The 7-bit address the read must come from.

reply ReadOnlySpan<byte>

The bytes the part answers with; the driver must ask for exactly this many.

Returns

I2cStep

The step.

Write(byte, ReadOnlySpan<byte>)

The driver writes exactly bytes to the address.

public static I2cStep Write(byte address, ReadOnlySpan<byte> bytes)

Parameters

address byte

The 7-bit address the write must go to.

bytes ReadOnlySpan<byte>

The bytes the driver must send.

Returns

I2cStep

The step.

WriteRead(byte, ReadOnlySpan<byte>, ReadOnlySpan<byte>)

The driver writes bytes and then reads reply in one transaction, the shape of a register read.

public static I2cStep WriteRead(byte address, ReadOnlySpan<byte> bytes, ReadOnlySpan<byte> reply)

Parameters

address byte

The 7-bit address of the part.

bytes ReadOnlySpan<byte>

The bytes the driver must send first, usually a register address.

reply ReadOnlySpan<byte>

The bytes the part answers with.

Returns

I2cStep

The step.