C# 클래스 Emlid.WindowsIot.Hardware.Components.I2cExtensions

파일 보기 프로젝트 열기: emlid/Navio-SDK-Windows-IoT

공개 메소드들

메소드 설명
WriteJoinByte ( this device, byte data1, byte data2 ) : void

Joins two byte values then writes them.

WriteJoinBytes ( this device, byte data1, byte data2 ) : void

Joins two byte values then writes them.

WriteReadBit ( this device, byte writeData, byte mask ) : bool

Writes data, reads a byte result then tests on or more bits.

Commonly used to test register flags.

WriteReadByte ( this device, byte writeData ) : byte

Writes data then reads a single byte result.

WriteReadBytes ( this device, byte writeData, int size ) : byte[]

Writes data then reads a single byte result.

WriteReadBytes ( this device, byte writeData, int size, byte buffer, int offset ) : void

Writes data then reads one or more bytes into an existing buffer.

WriteReadWriteBit ( this device, byte writeData, byte mask, bool value ) : byte

Sets or clears one or more bits.

Commonly used to set register flags. Reads the current byte value, merges the positive or negative bit mask according to value, then writes the modified byte back.

메소드 상세

WriteJoinByte() 공개 정적인 메소드

Joins two byte values then writes them.
public static WriteJoinByte ( this device, byte data1, byte data2 ) : void
device this Device to use.
data1 byte First part of data to write.
data2 byte Second part of data to write.
리턴 void

WriteJoinBytes() 공개 정적인 메소드

Joins two byte values then writes them.
public static WriteJoinBytes ( this device, byte data1, byte data2 ) : void
device this Device to use.
data1 byte First part of data to write.
data2 byte Second part of data to write.
리턴 void

WriteReadBit() 공개 정적인 메소드

Writes data, reads a byte result then tests on or more bits.
Commonly used to test register flags.
public static WriteReadBit ( this device, byte writeData, byte mask ) : bool
device this Device to use.
writeData byte Data to write.
mask byte Index of the bit to read, zero based.
리턴 bool

WriteReadByte() 공개 정적인 메소드

Writes data then reads a single byte result.
public static WriteReadByte ( this device, byte writeData ) : byte
device this Device to use.
writeData byte Data to write.
리턴 byte

WriteReadBytes() 공개 정적인 메소드

Writes data then reads a single byte result.
public static WriteReadBytes ( this device, byte writeData, int size ) : byte[]
device this Device to use.
writeData byte Data to write.
size int Amount of data to read.
리턴 byte[]

WriteReadBytes() 공개 정적인 메소드

Writes data then reads one or more bytes into an existing buffer.
public static WriteReadBytes ( this device, byte writeData, int size, byte buffer, int offset ) : void
device this Device to use.
writeData byte Data to write.
size int Amount of data to read.
buffer byte Target buffer.
offset int Target buffer offset.
리턴 void

WriteReadWriteBit() 공개 정적인 메소드

Sets or clears one or more bits.
Commonly used to set register flags. Reads the current byte value, merges the positive or negative bit mask according to value, then writes the modified byte back.
public static WriteReadWriteBit ( this device, byte writeData, byte mask, bool value ) : byte
device this Device to use.
writeData byte Data to write.
mask byte /// Mask of the bit to set or clear according to value. /// Supports setting or clearing multiple bits. ///
value bool Value of the bits, i.e. set or clear.
리턴 byte