Device class used to abstract i2C interfacing
More...
Device class used to abstract i2C interfacing
◆ SMBusDevice()
Create a new SMBus device
- Parameters
-
| address | The 7-bit address of the device |
| i2CModule | The i2C module this device is connected to. |
| rateKHz | the rate, in kHz, that should be used to communicate with this device. |
◆ ReadByteAsync()
| async Task<byte> ReadByteAsync |
( |
| ) |
|
Read a single byte from the device
- Returns
◆ WriteByteAsync()
| Task WriteByteAsync |
( |
byte |
data | ) |
|
Write a single byte to the device
- Parameters
-
- Returns
◆ WriteDataAsync()
| Task WriteDataAsync |
( |
byte [] |
data | ) |
|
Write data directly to the device
- Parameters
-
| data | an array of bytes to write |
- Returns
◆ ReadDataAsync()
| Task<byte[]> ReadDataAsync |
( |
byte |
numBytesToRead | ) |
|
Read data directly from a device
- Parameters
-
| numBytesToRead | the number of bytes to read |
- Returns
◆ ReadByteDataAsync() [1/2]
| Task<byte> ReadByteDataAsync |
( |
int |
register | ) |
|
Read an 8-bit register's value from the device
- Parameters
-
| register | the register address to read |
- Returns
- the register's value as a byte
◆ ReadByteDataAsync() [2/2]
| async Task<byte> ReadByteDataAsync |
( |
byte |
register | ) |
|
Read an 8-bit register's value from the device
- Parameters
-
| register | the register address to read |
- Returns
- the register's value as a byte
◆ ReadWordDataAsync()
| async Task<ushort> ReadWordDataAsync |
( |
byte |
register | ) |
|
Read a 16-bit little-endian register value from the device
- Parameters
-
| register | the 8-bit register address to read from |
- Returns
- the register's 16-bit value
◆ ReadWordDataBEAsync()
| async Task<ushort> ReadWordDataBEAsync |
( |
byte |
register | ) |
|
Read a 16-bit big-endian register value from the device
- Parameters
-
| register | the 8-bit register address to read from |
- Returns
- the register's 16-bit value
◆ ReadWordAsync()
| async Task<ushort> ReadWordAsync |
( |
| ) |
|
Read a 16-bit little-endian value from the device
- Returns
- the 16-bit value
◆ ReadWordBEAsync()
| async Task<ushort> ReadWordBEAsync |
( |
| ) |
|
Read a 16-bit little-endian value from the device
- Returns
- the 16-bit value
◆ WriteByteDataAsync()
| Task WriteByteDataAsync |
( |
byte |
register, |
|
|
byte |
data |
|
) |
| |
Write a byte to a register
- Parameters
-
| register | the register to write the byte to |
| data | the byte to be written to the specified register |
- Returns
- an awaitable task
◆ WriteWordDataAsync()
| Task WriteWordDataAsync |
( |
byte |
register, |
|
|
ushort |
data |
|
) |
| |
Write a 16-bit little-endian word to a register
- Parameters
-
| register | the register to write the 16-bit word to |
| data | the 16-bit word to write to the specified register |
- Returns
- an awaitable task
◆ WriteWordDataBEAsync()
| Task WriteWordDataBEAsync |
( |
byte |
register, |
|
|
ushort |
data |
|
) |
| |
Write a 16-bit big-endian word to a register
- Parameters
-
| register | the register to write the 16-bit word to |
| data | the 16-bit word to write to the specified register |
- Returns
- an awaitable task
◆ ReadBufferDataAsync()
| Task<byte[]> ReadBufferDataAsync |
( |
byte |
register, |
|
|
int |
numBytes |
|
) |
| |
Read one or more bytes from the specified register
- Parameters
-
| register | The register to read from |
| numBytes | The number of bytes to read |
- Returns
- An awaitable array of bytes read
◆ WriteBufferDataAsync()
| Task WriteBufferDataAsync |
( |
byte |
register, |
|
|
byte [] |
buffer |
|
) |
| |
- Parameters
-
- Returns
- An awaitable task that completes upon success.
The documentation for this class was generated from the following file: