static void ov7725_set_reg(gint daddr, guint8 val) { struct sccb_data dat; dat.daddr[0] = daddr; dat.daddr[1] = CAMCTRL_PARAM_DADDR_TERM; dat.val = val; sccb_write(&dat); }
//------------------------------------------------------------------- void I2C_WriteByte ( uint8_t SlaveAddr, uint8_t RegAddr, uint8_t Data ) { #if 0 sccb_write(SlaveAddr, RegAddr, Data); #else I2CSendAddr(SlaveAddr,WRITE); I2CSendByte(RegAddr); I2CSendByte(Data); I2CSendStop(); #endif }
static void ov9650_init_regs(void) { int i; down(®s_mutex); for (i=0; i<ARRAY_SIZE(regs); i++) { if (regs[i].subaddr == 0xff) { mdelay(regs[i].value); continue; } sccb_write(OV9650_SCCB_ADDR, regs[i].subaddr, regs[i].value); } up(®s_mutex); }