Programming I2C | Cypress Semiconductor
I'm setting up the PSoC4 BLE chip to read in data from a light sensor. Should the I2C component be set as the master mode or slave mode? (I'm thinking that the light sensor is the slave and PSoC4 BLE is the master - how does this affect the I2C component?)
Is it necessary to manually set the slave address in main.c using the API I2C_I2CSlaveSetAddress? or is setting the slave address in the dialog box when clicking on the I2C component enough / the correct way?
Also, where are the write commands? I've built the project so I have all the c and h files but can't seem to find APIs such as I2C_I2CMasterWriteBuf that are in the pressure sensor example project.