www.beck-ipc.com

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


I2C_slave_address

Set the I2C bus slave address

void I2C_slave_address ( unsigned int addr, unsigned char gencalladdr );

Parameters

addr

Slave address:
Bit0: don't care
Bit7-1: 7 bit slave address or
Bit10-1: 10 bit slave address

gencalladdr

0: don't listen to general call address
1: listen to general call address

Return Value

-- none --

Comments

This function initializes the I2C bus slave interface. To use the I2C slave interface the user has to install an interrupt service routine for the I2C interrupt. An interrupt occurs when the I2C state changes. The user should than read the I2C state with function I2C_slave_getstate.

The I2C bus intialize function must be called previously. The Slave mode works only if the I2C hardware interface in used.

See Also

    I2C_init                

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