CALIBRE
3.3.23.SendAddressNoStatus
Function specification | void SendAddressNoStatus(int SlaveAddress, int SetNack, int NoTries) |
Parameters are: | int SlaveAddress |
| This is the address to be accessed via the I2C, e.g. A0H. |
| int SetNack |
| This controls whether the Adapter transmits an acknowledge down the I2C bus |
| on reception of a byte. The last byte received during a transfer must not be |
| acknowledged, in all other cases acknowledge must be enabled. If SetNack = 0 |
| then acknowledge is enabled, if SetNack = 1 then acknowledge is disabled. |
| Normally there will be another transfer (data read or write) after the |
| SendAddress and so SetNack should be enabled (0); |
| Int NoTries |
| This is the number of times the Adapter is to try to send the address. |
Parameters returned | None. |
Prerequisites | The Adapter must be configured by running Setup. |
Functional description | The function waits for the bus to be free. Then sends the slave address with the |
| appropriate acknowledge. |
| The acknowledge must equal 0. |
| The function will generate a start and send the address. If the slave does not |
| acknowledge then the Adapter will generate a stop. It will try to send the |
| address a number of times equal to NoTries. |
3.3.24.WriteByteNoStatus
Function specification | void WriteByteNoStatus(int DataByte) |
Parameters are: | int DataByte |
| This is the byte of data to be written. |
Parameters returned | None. |
Prerequisites | Adapter must be configured using Setup, start and write address sent by |
| SendAddressNoStatus. |
Functional description | The function writes the data to the Adapter and then waits for it to be sent. |
| WriteByteNoStatus is compatible with both master write and slave write modes. |
3.3.25.ReadByteNoStatus
Function specification | Int ReadByte(int SetNack) |
Parameters are: | int SetNack |
| This controls whether the Adapter transmits an acknowledge down the I2C bus |
| on reception of a byte. The last byte received during a transfer must not be |
| acknowledged, in all other cases acknowledge must be enabled. If SetNack = 0 |
Parameters returned | then acknowledge is enabled, if SetNack = 1 then acknowledge is disabled. |
None | |
Prerequisites | Adapter must be configured using Setup, start and read address sent by |
| SendAddressNoStatus. |
Functional description | The data is read from the Adapter. |
| ReadByteNoStatus is compatible with both master read and slave read modes. |
3.3.26.SendStopNoStatus
Function specification | void SendStopNoStatus(void) |
Parameters are: | None |
Parameters returned | None. |
Prerequisites | Adapter must be configured using Setup. Should normally only be used at the |
| end of a transmission. |
Functional description | Instructs the Adapter to send a stop code and wait for it to be sent. |
Issue 1.0 | Page 15 |
01/07/03 |
|