www.beck-ipc.com

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


I2C_receive_block

Receive block of data on I2C bus

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

Parameters

slave

7 bit slave address in B7..B1; B0 n/a

buffer

Pointer to where data will be placed

length

Number of bytes to receive

Return Value

result - 0 = Success
    non-zero indicates error:
    5: Bus allocated
    6: Bus arbitration failed
    7: Bus error
    8: Timeout
    9: Slave faulty or not available

Comments

This function will dwell until either 'length' bytes are received and stored in the buffer, or until an error occurs.  

See Also

RTOS API

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


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


End of document