sub_i2c_config

Top  Previous  Next
Got to SUB-20 page

Synopsis

int sub_i2c_config( sub_handle hndl, int sa, int flags )

 

Configure SUB-20 I2C module.

Parameters

sa - slave address for SUB-20 in I2C slave mode. See I2C Slave Address Convention and I2C Slave

flags - set of below flags

I2C_GCE

Enable general call address (0x00) detection in I2C slave mode

I2C_DISABLE

Disable I2C module. (Any following I2C transaction will enable I2C module) . I2C_DISABLE is required to get full control over GPIO8,GPIO9 I/Os. While I2C module is enabled GPIO8,GPIO9 can only be used as inputs.

Return Value

On success function returns 0. Otherwise error code.