|
| CALIBRE |
| ||
|
|
| |||
|
|
|
| ||
| This is the number of times the Adapter is to try to send the address. | ||||
Parameters returned | None. | ||||
Prerequisites | Adapter must be configured using setup. | ||||
Functional description | This function causes the Adapter to read a block of data via the I2C bus. |
3.3.13.GetBlockData
Function specification | int GetBlockData(void) |
Parameters are: | None |
Parameters returned | int RdData. |
Prerequisites | Adapter must be configured using Setup. The block read function MUST have |
| been called and the BlockReadStatus should be called to determine if the |
| transfer has been completed |
Functional description | Read data from the driver buffers. MAXIMUM DATA SIZE 2048 bytes. |
3.3.14.BlockReadStatus
Function specification | int BlockReadStatus (void)) |
Parameters are: | None |
Parameters returned | int TransferStatus. |
| Returns 0 if the transfer has not been completed. |
| Returns the I2C Bus status if the transfer is completed. |
| Returns 900AH if the transfer time out. |
Prerequisites | Adapter must be configured using Setup. The transfer must be started using |
| the BlockRead function. |
Functional description | Returns the current status of the BlockWrite transfer NOTE this function will |
| time out if the block is not sent in NoBytes / 100 seconds (or 1 second which |
| ever is the greater). |
3.3.15.BlockSlaveTransmittter
Function specification | int BlockSlaveTransmitter(int NoBytesToTransmit, int Timeout) |
Parameters are: | int NoBytesToTransmit |
| The number of bytes to be sent which MUST be pre loaded into the driver |
| buffers. The maximum size of this buffer is 2048 exceeding this WILL cause |
| the data to be corrupted. |
| Int Timeout |
| If the transfer is not completed within Timeout seconds the |
| BlockSlaveTansmitStatus will return a Timeout error. |
Parameters returned | Returns an unused integer. |
Prerequisites | Adapter must be configured using Setup. The data MUST be loaded into the |
| driver buffers PRIOR to calling this functions (see SetBlockData). |
Functional description | This function causes the Adapter to respond to I2C master requests for data. |
| This function supports transfers where the master sends WordAddress pointers |
| to data locations within the transfer block. If the master does not request to |
| read data from the beginning of the data block the Adapter will remove the data |
| from the buffer until the byte requested by the master is reached it will then |
| transmit the data. |
| Should the master exceed the number of bytes available the Adapter will |
| honour all requests for data and the overflow will be reported see |
| BlockSlaveTransmitterStatus. |
| This function allows the user to emulate simple slave devices e.g. EEPROM |
| BUT once the master has completed the transfer the Adapter will NOT respond |
| to any further requests for data until the BlockSlaveTransmitter is called again. |
Issue 1.0 | Page 11 |
01/07/03 |
|