English
Language : 

AN496 Datasheet, PDF (10/36 Pages) Silicon Laboratories – HID USB-TO-SMBUS API SPECIFICATION
AN496
2.12. HidSmbus_AddressReadRequest
Description:
Prototype:
Parameters:
This function intiates a read transfer to the specified slave device address and specifies the
address to read from on the device. Read and write timeouts as well as transfer retries can be set
using HidSmbus_SetSmbusConfig() as described in "HidSmbus_SetSmbusConfig" on page 17.
HID_SMBUS_STATUS HidSmbus_AddressReadRequest (HID_SMBUS_DEVICE device,
BYTE slaveAddress, WORD numBytesToRead, BYTE targetAddressSize, BYTE
targetAddress[16])
1. device is the device object pointer as returned by HidSmbus_Open().
2. slaveAddress is the address of the slave device to read from. This value must be between
0x02 - 0xFE. The least significant bit is the read/write bit for the SMBus transaction and must
be 0.
3. numBytesToRead is the number of bytes to read from the device (1–512).
4. targetAddressSize is the size of the target address in bytes (1-16).
5. targetAddress is the address to read from the slave device.
Return Value: HID_SMBUS_STATUS = HID_SMBUS_SUCCESS
HID_SMBUS_INVALID_DEVICE_OBJECT
HID_SMBUS_INVALID_PARAMETER
HID_SMBUS_INVALID_REQUEST_LENGTH
HID_SMBUS_DEVICE_IO_FAILED
Remarks:
HidSmbus_AddressReadRequest() initiates a read transfer. SMBus is a half-duplex bus which
means that only one read, address read, or write transfer can be active at a time. The device will
attempt to read up to transferRetries number of times and for readTimeout milliseconds before
timing out. See HidSmbus_SetSmbusConfig() for more information on configuring read timeouts. If
the autoReadRespond setting is enabled, then call HidSmbus_GetReadResponse() to return the
results of the read transfer. The device will transmit the target address on the bus after the slave
device has acknowledged its address. This function is designed to read from EEPROMs with an
SMBus interface.
10
Rev. 0.2