www.beck-ipc.com

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


I2C_init

Initialize the I2C Bus

void I2C_init ( void );

Parameters

-- none --

Return Value

-- none --

Comments

This function configures two of the programmable I/O (PIO) pins for usage as I2C bus data and clock signals.

The user can specify which two PIO are used for I2C clock and data.   After calling this initialization function, these two pins will no longer be available as PIO pins unless the PFE Enable function is called for these pins following this function call.

SC1x3 Comments

On SC123/SC143 the default is to use the hardware I2C interface on the dedicated pins. If the user calls functions 8eh and 8fh to select other PIOs for the bus, the I2C bus will be software emulated on the selected PIO pins.

If the hardware interface is used, the calling task will go to sleep, until the I2C interrupt issues a wakeup. Therefore the user should not make own wakeup calls to the I2C API calling task, while sleeping inside I2C functions.

See Also

RTOS API

This library function invokes a RTOS software interrupt. Refer to this RTOS API function's documentation for more details.

Related Topics

PFE: Enable Programmable I/O Pins

Supported since or modified in @CHIP-RTOS version

    SC12SC13SC11SC1x3
    V1.00V1.00V1.00V0.90

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


End of document