|
发表于 2006-10-30 13:53:00
|
显示全部楼层
if(!( camif_samsung_s5k4aafa_i2c_write(0x5a,0xec, 0x00)))
改这句为:
if(camif_samsung_s5k4aafa_i2c_write(0x5a,0xec, 0x00)==FALSE)
另外:
static boolean camif_samsung_s5k4aafa_i2c_write(byte reg, byte data)
{
uint32 i;
camif_i2c_command.addr.reg = reg;
camif_i2c_command.buf_ptr = &data;
camif_i2c_command.len = 1;
if (i2c_write(&camif_i2c_command) == I2C_SUCCESS)
{
return TRUE;
}
else /* this line can be delete */
/* insert delay here */
{
/* Retry once */
if (i2c_write(&camif_i2c_command) == I2C_SUCCESS)
{
return TRUE;
}
MSG_HIGH("I2C write failed, reg 0x%x", reg, 0, 0);
return FALSE;
} |
|