LibTiePie
0.9.16
Library for interfacing TiePie engineering instruments
|
Functions to write data to an I2C device.
Functions | |
bool8_t | I2CWrite (LibTiePieHandle_t hDevice, uint16_t wAddress, const void *pBuffer, uint32_t dwSize, bool8_t bStop) |
Write data to a specified address on the I2C bus, using a specified I2C host. More... | |
bool8_t | I2CWriteByte (LibTiePieHandle_t hDevice, uint16_t wAddress, uint8_t byValue) |
Write one byte to a specified address on the I2C bus, using a specified I2C host. More... | |
bool8_t | I2CWriteByteByte (LibTiePieHandle_t hDevice, uint16_t wAddress, uint8_t byValue1, uint8_t byValue2) |
Write two bytes to a specified address on the I2C bus, using a specified I2C host. More... | |
bool8_t | I2CWriteByteWord (LibTiePieHandle_t hDevice, uint16_t wAddress, uint8_t byValue1, uint16_t wValue2) |
Write one byte and one word to a specified address on the I2C bus, using a specified I2C host. More... | |
bool8_t | I2CWriteWord (LibTiePieHandle_t hDevice, uint16_t wAddress, uint16_t wValue) |
Write one word to a specified address on the I2C bus, using a specified I2C host. More... | |
bool8_t I2CWrite | ( | LibTiePieHandle_t | hDevice, |
uint16_t | wAddress, | ||
const void * | pBuffer, | ||
uint32_t | dwSize, | ||
bool8_t | bStop | ||
) |
Write data to a specified address on the I2C bus, using a specified I2C host.
[in] | hDevice | A device handle identifying the I2C host. |
[in] | wAddress | The I2C address to write to. |
[in] | pBuffer | A pointer to the write buffer. |
[in] | dwSize | The number of bytes to write. |
[in] | bStop | Indicates whether an I2C stop is generated after the transaction, when BOOL8_TRUE, an I2C stop is generated, when BOOL8_FALSE not. |
INTERNAL_ADDRESS | The requested I2C address is an internally used address in the device. |
BIT_ERROR | The requested I2C operation generated a bit error. |
NO_ACKNOWLEDGE | The requested I2C operation generated "No acknowledge". |
INVALID_HANDLE | The handle is not a valid I2C host handle. |
OBJECT_GONE | The object indicated by the handle is no longer available. |
LIBRARY_NOT_INITIALIZED | The library is not initialized, see LibInit(). |
SUCCESS | The function executed successfully. |
bool8_t I2CWriteByte | ( | LibTiePieHandle_t | hDevice, |
uint16_t | wAddress, | ||
uint8_t | byValue | ||
) |
Write one byte to a specified address on the I2C bus, using a specified I2C host.
An I2C stop is generated after the transaction.
[in] | hDevice | A device handle identifying the I2C host. |
[in] | wAddress | The I2C address to write to. |
[in] | byValue | The byte value to write. |
INTERNAL_ADDRESS | The requested I2C address is an internally used address in the device. |
BIT_ERROR | The requested I2C operation generated a bit error. |
NO_ACKNOWLEDGE | The requested I2C operation generated "No acknowledge". |
INVALID_HANDLE | The handle is not a valid I2C host handle. |
OBJECT_GONE | The object indicated by the handle is no longer available. |
LIBRARY_NOT_INITIALIZED | The library is not initialized, see LibInit(). |
SUCCESS | The function executed successfully. |
bool8_t I2CWriteByteByte | ( | LibTiePieHandle_t | hDevice, |
uint16_t | wAddress, | ||
uint8_t | byValue1, | ||
uint8_t | byValue2 | ||
) |
Write two bytes to a specified address on the I2C bus, using a specified I2C host.
An I2C stop is generated after the transaction.
[in] | hDevice | A device handle identifying the I2C host. |
[in] | wAddress | The I2C address to write to. |
[in] | byValue1 | The first byte value to write. |
[in] | byValue2 | The second byte value to write. |
INTERNAL_ADDRESS | The requested I2C address is an internally used address in the device. |
BIT_ERROR | The requested I2C operation generated a bit error. |
NO_ACKNOWLEDGE | The requested I2C operation generated "No acknowledge". |
INVALID_HANDLE | The handle is not a valid I2C host handle. |
OBJECT_GONE | The object indicated by the handle is no longer available. |
LIBRARY_NOT_INITIALIZED | The library is not initialized, see LibInit(). |
SUCCESS | The function executed successfully. |
bool8_t I2CWriteByteWord | ( | LibTiePieHandle_t | hDevice, |
uint16_t | wAddress, | ||
uint8_t | byValue1, | ||
uint16_t | wValue2 | ||
) |
Write one byte and one word to a specified address on the I2C bus, using a specified I2C host.
An I2C stop is generated after the transaction.
[in] | hDevice | A device handle identifying the I2C host. |
[in] | wAddress | The I2C address to write to. |
[in] | byValue1 | The byte value to write. |
[in] | wValue2 | The word value to write. |
INTERNAL_ADDRESS | The requested I2C address is an internally used address in the device. |
BIT_ERROR | The requested I2C operation generated a bit error. |
NO_ACKNOWLEDGE | The requested I2C operation generated "No acknowledge". |
INVALID_HANDLE | The handle is not a valid I2C host handle. |
OBJECT_GONE | The object indicated by the handle is no longer available. |
LIBRARY_NOT_INITIALIZED | The library is not initialized, see LibInit(). |
SUCCESS | The function executed successfully. |
bool8_t I2CWriteWord | ( | LibTiePieHandle_t | hDevice, |
uint16_t | wAddress, | ||
uint16_t | wValue | ||
) |
Write one word to a specified address on the I2C bus, using a specified I2C host.
An I2C stop is generated after the transaction.
[in] | hDevice | A device handle identifying the I2C host. |
[in] | wAddress | The I2C address to write to. |
[in] | wValue | The word value to write. |
INTERNAL_ADDRESS | The requested I2C address is an internally used address in the device. |
BIT_ERROR | The requested I2C operation generated a bit error. |
NO_ACKNOWLEDGE | The requested I2C operation generated "No acknowledge". |
INVALID_HANDLE | The handle is not a valid I2C host handle. |
OBJECT_GONE | The object indicated by the handle is no longer available. |
LIBRARY_NOT_INITIALIZED | The library is not initialized, see LibInit(). |
SUCCESS | The function executed successfully. |