www.beck-ipc.com

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


I2C_transmit_block_ext

Send block of data on I2C bus (extended address)

int I2C_transmit_block_ext ( unsigned int slave,
                             const char far *buffer,
                             int length );

Parameters

slave

10 bit slave address in B10..B1; B0 n/a

buffer

Pointer to data source

length

Number of bytes to send from buffer

Return Value

result - 0 = Success
    non-zero indicates error:
    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

This function will dwell until 'length' bytes from the buffer are transmitted or until an error occurs.

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

    SC12SC13SC11SC1x3
    V1.20V1.20V1.20V0.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