Blockslavereceiverstatus, Checkbusvoltage, Checkpullupvoltage – Calibre UK UCA93 User Manual

Page 16: Calibre

Advertising
background image

CALIBRE

Issue 1.0

Page 13

01/07/03

3.3.18.

BlockSlaveReceiverStatus

Function specification

int BlockSlaveReceiverStatus (void))

Parameters are:

None

Parameters returned

int TransferStatus.
Returns 0 if the no data has been received.
Returns the a status if the transfer is completed (see below).
Bit 0

Not Used

Bit 1

Not Used

Bit 2

Not Used

Bit 3

Not Used

Bit 4

Stop detected

Bit 5

Set if the transfer timeout (Value in Setup function) occurred

Returns 900DH if the expected number of bytes is exceeded
Returns 900CH if the transfer time out.

Prerequisites

Adapter must be configured using Setup. The transfer must be started using
the BlockSlaveReceiver function.

Functional description

Returns the current status of the BlockSlaveReceiver transfer NOTE this
function will time out the BlockSlaveReceiver function.
Read two bytes of data from the Adapter using GetBlockData to determine how
many bytes of data the master read from the slave.
Read the first two bytes to determine how many bytes of data the master read
from the slave (high byte first), read 1 byte to determine the status.

3.3.19.

CheckBusVoltage

Function specification

int CheckBusVoltage (void))

Parameters are:

None

Parameters returned

int BusVoltage
Returns the I2C bus output voltage multiplied by 100.
Returns 0x800C if the transfer timed out.

Prerequisites

Adapter should be configured using Setup. If this is not done the I2C bus
voltage will default to 3.3V.

Functional description

Returns the current bus voltage multiplied by 100 as measured on pin 7 of the
output socket. For example, will return 330 for a 3.3V bus voltage , 500 for a
5.0V bus voltage and 200 for a 2.0V bus voltage.

3.3.20.

CheckPullupVoltage

Function specification

int CheckPullupVoltage (void))

Parameters are:

None

Parameters returned

int PullupVoltage
Returns the I2C pullup voltage multiplied by 100 measured upstream of the
output overcurrent protection device.
Returns 0x800C if the transfer timed out.

Prerequisites

Adapter should be configured using Setup. If this is not done the I2C bus
voltage will default to 3.3V.

Functional description

The pullup voltage is the same as the I2C output voltage but measured
upstream of the resettable polyfuse protection device. Returns the current
pullup voltage multiplied by 100. For example, will return 330 for a 3.3V pullup
voltage , 500 for a 5.0V pullup voltage and 200 for a 2.0V pullup voltage. If the
pullup voltage differs from the bus voltage (measured by the previous function)
by more than a few tens of millivolts then too much current is being drawn from
the Adapter. No more than 250mA should be drawn from the Adapter.

Advertising