I2C_master_read_byte

Description

Read a byte from the I2C bus as the bus master.

NOTE: the I2C bus must have been previously aquired by this processor and the processor must be the bus master for this operation to succead.

Definition

uint I2C_master_read_byte(ubyte send_ack)

Library

LIB/i2c_bb_lib.bas

Usage

On entry:
send_ack indicates if the I2C ACK bit should be sent or not during the ACK stage of the byte read

The I2C ACK bit is usually sent during multi byte reads and not sent for single byte reads or if reading the last byte in a multibyte read

On exit:
return the byte read from the I2C bus or an error code. If the value returned is less 256 then the value is valid data otherwise it is an error code.