Méthode | Description | |
---|---|---|
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. |
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. |
Résultat | void |
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. |
Résultat | void |
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. |
Résultat | bool |
public static WriteReadByte ( this device, byte writeData ) : byte | ||
device | this | Device to use. |
writeData | byte | Data to write. |
Résultat | byte |
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. |
Résultat | byte[] |
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. |
Résultat | void |
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. |
Résultat | byte |