Macros
I2C Status codes

Macros

#define I2C_STATUS_QUEUED   (1)
 I2C transaction is queued but has not started. More...
 
#define I2C_STATUS_SUCCESS   (0)
 Successful status code returned by I2C API. More...
 
#define I2C_STATUS_ERROR   (-1)
 Generic error status code returned by I2C API. More...
 
#define I2C_STATUS_UNDEFINEDCMD   (-2)
 An error status code returned by I2C_control() for undefined command codes. More...
 
#define I2C_STATUS_TIMEOUT   (-3)
 I2C operation timed-out. More...
 
#define I2C_STATUS_CLOCK_TIMEOUT   (-4)
 I2C serial clock line timeout. More...
 
#define I2C_STATUS_ADDR_NACK   (-5)
 I2C slave address not acknowledged. More...
 
#define I2C_STATUS_DATA_NACK   (-6)
 I2C data byte not acknowledged. More...
 
#define I2C_STATUS_ARB_LOST   (-7)
 I2C multi-master arbitration lost. More...
 
#define I2C_STATUS_INCOMPLETE   (-8)
 I2C transaction is in progress or returned without completing. More...
 
#define I2C_STATUS_BUS_BUSY   (-9)
 I2C bus already in use by another controller. The I2C transaction was therefore unable to start. More...
 
#define I2C_STATUS_CANCEL   (-10)
 I2C transaction canceled by I2C_cancel() More...
 
#define I2C_STATUS_INVALID_TRANS   (-11)
 I2C transaction is invalid. This may occur if: More...
 

Detailed Description

These macros are reservations for I2C.h

Macro Definition Documentation

§ I2C_STATUS_QUEUED

#define I2C_STATUS_QUEUED   (1)

I2C transaction is queued but has not started.

§ I2C_STATUS_SUCCESS

#define I2C_STATUS_SUCCESS   (0)

Successful status code returned by I2C API.

§ I2C_STATUS_ERROR

#define I2C_STATUS_ERROR   (-1)

Generic error status code returned by I2C API.

§ I2C_STATUS_UNDEFINEDCMD

#define I2C_STATUS_UNDEFINEDCMD   (-2)

An error status code returned by I2C_control() for undefined command codes.

§ I2C_STATUS_TIMEOUT

#define I2C_STATUS_TIMEOUT   (-3)

I2C operation timed-out.

§ I2C_STATUS_CLOCK_TIMEOUT

#define I2C_STATUS_CLOCK_TIMEOUT   (-4)

I2C serial clock line timeout.

§ I2C_STATUS_ADDR_NACK

#define I2C_STATUS_ADDR_NACK   (-5)

I2C slave address not acknowledged.

§ I2C_STATUS_DATA_NACK

#define I2C_STATUS_DATA_NACK   (-6)

I2C data byte not acknowledged.

§ I2C_STATUS_ARB_LOST

#define I2C_STATUS_ARB_LOST   (-7)

I2C multi-master arbitration lost.

§ I2C_STATUS_INCOMPLETE

#define I2C_STATUS_INCOMPLETE   (-8)

I2C transaction is in progress or returned without completing.

§ I2C_STATUS_BUS_BUSY

#define I2C_STATUS_BUS_BUSY   (-9)

I2C bus already in use by another controller. The I2C transaction was therefore unable to start.

§ I2C_STATUS_CANCEL

#define I2C_STATUS_CANCEL   (-10)

I2C transaction canceled by I2C_cancel()

§ I2C_STATUS_INVALID_TRANS

#define I2C_STATUS_INVALID_TRANS   (-11)

I2C transaction is invalid. This may occur if:

  1. The I2C_Transaction.readCount and I2C_Transaction.writeCount are both set to 0.
  2. A call to I2C_transfer() is made from a I2C_CallbackFxn while queued transactions are being canceled. See also: I2C_cancel()
© Copyright 1995-2022, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale