See the following error :
Code: Select all
../src/audio_io.xc:64: error: incompatible type for argument 1 of `i2c_master_init'
Code: Select all
void audio_hw_init()
{
// Initialise the I2C bus
i2c_master_init( i2cPorts );
}
Code: Select all
void i2c_master_init(REFERENCE_PARAM(struct r_i2c,i2c));
extern port i2cPorts;
The declaration of i2cPorts is in my codec.xc as
Code: Select all
struct r_i2c i2cPorts = {
XS1_PORT_4C,
XS1_PORT_1G
};
Code: Select all
struct r_i2c {
port scl;
port sda;
};