Philips Bluetooth QuickStart Kit GPS Receiver User Manual


 
Bluetooth QuickStart Kit Version 1.0 - User’s Guide Page 66
Copyright 2004-2005 © Embedded Artists AB
tS8 i2cRepeatStart( void )
Generates a start condition on I2C when bus is free. Master mode will also automatically
be entered.
Note: After a stop condition, you may need a bus free time before you can generate a
new start condition.
Returns:
I2C_CODE_OK or I2C status code (see i2cCheckStatus)
B.8.4 i2cPutChar
tS8 i2cPutChar( tU8 data )
Sends a character on the I2C network
Parameters:
[in] data – the character to send
Returns:
I2C_CODE_OK – The function completed successfully
I2C_CODE_BUSY – data register is not ready -> byte was not sent
B.8.5 i2cGetChar
tS8 i2cGetChar( tU8 mode, tU8* pData )
Read a character. I2C master mode is used. This function is also used to prepare if the
master shall generate acknowledge or not acknowledge.
Parameters:
[in] mode – I2C_MODE_ACK0 Set ACK=0. Slave sends next byte
I2C_MODE_ACK1 Set ACK=1. Slave sends last byte
I2C_MODE_READ Read data from data register
[out] pData – a pointer to where the data shall be saved
Returns:
I2C_CODE_OK – The function completed successfully
I2C_CODE_EMPTY – no data is available
B.8.6 i2cWrite
tS8 i2cWrite( tU8 addr, tU8* pData, tU16 len )
Sends data on the I2C network
Note: After this function is run, you may need a bus free time before a new data transfer
can be initiated.
Parameters:
[in] addr – the address to write to
[in] pData – the data to transmit
[in] len – number of bytes to transmit
Returns: