www.beck-ipc.com

@CHIP-RTOS C Library V2.06 - I2C Bus API


I2C_slave_getstate

Get the I2C bus state

unsigned int I2C_slave_getstate ( void );

Return Value

I2C bus state:
3: General call address received
4: Own slave address received, master wants to read
5: Own slave address received, master wants to write
6: Arbitration lost
7: Bus error
10: Data byte received from master
11: Data byte transmitted to master, master wants next byte
12: Last data byte transmitted to master
13: STOP or repeated START condition received

Comments

This function reads the current I2C bus state and should be used inside the I2C interrupt handler, if the I2C slave interface is used.

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

    SC12SC13SC11SC1x3
    n/an/an/aV0.90

Supported by @CHIP-RTOS C Library since version

    CLIB
    V2.01

This API List
List of C Libraries
@CHIP-RTOS Main Index


End of document