44207里这样写:CE_BOOL CE_SetDeviceI2CAddress( CE_BYTE bNewDeviceAddress , CE_BYTE bI2CPinDriveMode );
Description:The function of this API is to set the device I2C address. The address is set in the range 0 to 127. The I2C pin drive mode is set either as „Resistive Pull up‟ or „Open Drain Low‟. If the address passed is greater than 127, then the API returns 0 (fail); otherwise, it sets the new address and returns 1 (pass).
Example:CE_SetDeviceI2CAddress ( 5, OPEN_DRAIN_LOW ); sets the device‟s new address as 5, sets the I2C pin drive mode as Open Drain Low, and returns 1. |