@CHIP-RTOS C Library V2.06 - I2C Bus API
I2C_receive_char
Receive a single character int I2C_receive_char ( unsigned char slave,
char far *char_in,
unsigned char not_last ); Parameters
slave
- 7 bit slave address in B7-B1, B0=Don't care
char_in
- Pointer to one character buffer provided by caller where
received character will be placed.
not_last
- = 0 for last char to be received, otherwise non-zero.
Return Value
- 0: Success, received char is output to 'char_in' location.
8: Timeout
9: Slave faulty or not available
SC1x3 Return Value
- On SC123/SC143 these additional return values are possible
if the hardware I2C interface is used:
3: Arbitration lost, general call address received
4: Arbitration lost, own slave address received,
master wants to read (change from master to slave)
5: Arbitration lost, own slave address received,
master wants to write (change from master to slave)
6: Arbitration lost
7: Bus error
Comments
- The IPC@CHIP® is the I2C bus master.
This function will automatically generated a I2C Start or Restart
condition.
See Also
RTOS API
- This library function invokes a RTOS software interrupt.
Refer to this RTOS API function's
documentation
for more details.
Supported since or modified in @CHIP-RTOS version-
SC12 | SC13 | SC11 | SC1x3 |
-
V1.00 | V1.00 | V1.00 | V0.90 |
This API List
List of C Libraries
@CHIP-RTOS Main Index
End of document
|