메소드 | 설명 | |
---|---|---|
Close ( ) : void |
Closes the connection.
|
|
Dispose ( ) : void |
Releases all resource used by the CyrusBuilt.MonoPi.IO.I2C.I2CBus object. Call Dispose when you are finished using the CyrusBuilt.MonoPi.IO.I2C.I2CBus. The Dispose method leaves the CyrusBuilt.MonoPi.IO.I2C.I2CBus in an unusable state. After calling Dispose, you must release all references to the CyrusBuilt.MonoPi.IO.I2C.I2CBus so the garbage collector can reclaim the memory that the CyrusBuilt.MonoPi.IO.I2C.I2CBus was occupying. |
|
I2CBus ( BoardRevision boardRev ) : System |
Initializes a new instance of the CyrusBuilt.MonoPi.IO.I2C.I2CBus class with the path the I2C bus.
|
|
Open ( BoardRevision boardRev ) : |
Gets an open I2C connection instance.
|
|
Open ( ) : void |
Open a connection to the I2C bus.
|
|
Read ( |
Reads a single byte from the device at the specified address.
|
|
ReadBytes ( |
Reads bytes from the device at the specified address.
|
|
WriteByte ( |
Writes a single byte to the specified device address.
|
|
WriteBytes ( |
Writes an array of bytes to the specified device address. Currently, RPi drivers do not allow writing more than 3 bytes at a time. As such, if an array of greater than 3 bytes is provided, an exception is thrown. |
|
WriteCommand ( |
Writes a command with data to the specified device address.
|
|
WriteCommand ( |
Writes a command with data to the specified device address.
|
|
WriteCommand ( |
Writes a command with data to the specified device address.
|
메소드 | 설명 | |
---|---|---|
Dispose ( System.Boolean disposing ) : void |
Releases all resource used by the CyrusBuilt.MonoPi.IO.I2C.I2CBus object.
|
protected Dispose ( System.Boolean disposing ) : void | ||
disposing | System.Boolean | /// Set true if disposing managed resources as well as unmanaged. /// |
리턴 | void |
public I2CBus ( BoardRevision boardRev ) : System | ||
boardRev | BoardRevision | /// Specifies the revision of the RPi board in use. This /// used to determine the path to the system file associated /// with the i2c bus. /// |
리턴 | System |
public static Open ( BoardRevision boardRev ) : |
||
boardRev | BoardRevision | /// Specifies the revision of the RPi board in use. This /// used to determine the path to the system file associated /// with the i2c bus. /// |
리턴 |
public Read ( |
||
address | /// The address of the device to read from. /// | |
리턴 | Byte |
public ReadBytes ( |
||
address | /// The address of the device to read from. /// | |
count | /// The number of bytes to read. /// | |
리턴 | Byte[] |
public WriteByte ( |
||
address | /// The address of the target device. /// | |
b | Byte | /// The byte to write. /// |
리턴 | void |
public WriteBytes ( |
||
address | /// The address of the target device. /// | |
bytes | Byte | /// The byte array to write. /// |
리턴 | void |
public WriteCommand ( |
||
address | /// The address of the target device. /// | |
command | Byte | /// The command to send to the device. /// |
data | Byte | /// The data to send with the command. /// |
리턴 | void |
public WriteCommand ( |
||
address | /// The address of the target device. /// | |
command | Byte | /// The command to send to the device. /// |
data1 | Byte | /// The data to send as the first parameter. /// |
data2 | Byte | /// The data to send as the second parameter. /// |
리턴 | void |
public WriteCommand ( |
||
address | /// The address of the target device. /// | |
command | Byte | /// The command to send to the device. /// |
data | ushort | /// The data to send with the command. /// |
리턴 | void |