按照例程中,先驱动起来了第一个,另外两个的CH455_I2C_ADDR如何确定,谢谢
void CH455_Write( UINT16 cmd )//写命令
{
CH455_I2c_Start(); //启动总线
CH455_I2c_WrByte(((UINT8)(cmd>>7)&CH455_I2C_MASK)|CH455_I2C_ADDR);
CH455_I2c_WrByte((UINT8)cmd); //发送数据
CH455_I2c_Stop(); //结束总线
}
UINT8 CH455_Read( void )//读取按键
{
UINT8 keycode;
CH455_I2c_Start(); //启动总线
CH455_I2c_WrByte((UINT8)(CH455_GET_KEY>>7)&CH455_I2C_MASK|0x01|CH455_I2C_ADDR);
keycode=CH455_I2c_RdByte(); //读取数据
CH455_I2c_Stop(); //结束总线
return keycode;
}