I2C functions are provided in the libraries

LIB/i2c_lib.bas
LIB/i2c_bb_lib.bas


 
I2C subsystem description  
I2C_master_init Initialises the I2C hardware
I2C_master_read_byte read byte from I2C bus
I2C_master_write_byte write byte to I2C bus
I2C_master_write_start_condition Assert start condition on I2C bus
I2C_master_write_stop_condition Assert stop condition on I2C bus