OV7670配置问题
void OV7670_config_window(unsigned int startx,unsigned int starty,unsigned int width, unsigned int height){
unsigned int endx;
unsigned int endy;// "v*2"必须
unsigned int temp_reg1, temp_reg2;
unsigned char state,temp;
endx=(startx+width);
endy=(starty+height+height);// "v*2"必须
state = rdOV7670Reg(0x03, &temp_reg1 );
temp_reg1 &= 0xf0;
state = rdOV7670Reg(0x32, &temp_reg2 );
temp_reg2 &= 0xc0;
// Horizontal
temp = temp_reg2|((endx&0x7)<<3)|(startx&0x7);
state = wrOV7670Reg(0x32, temp );
temp = (startx&0x7F8)>>3;
state = wrOV7670Reg(0x17, temp );
temp = (endx&0x7F8)>>3;
state = wrOV7670Reg(0x18, temp );
// Vertical
temp = temp_reg1|((endy&0x3)<<2)|(starty&0x3);
state = wrOV7670Reg(0x03, temp );
temp = starty>>2;
state = wrOV7670Reg(0x19, temp );
temp = endy>>2;
state = wrOV7670Reg(0x1A, temp );
}
谁能看得懂么?这段代码是干嘛的 unsigned int startx,unsigned int starty,unsigned int width, unsigned int height这个定义表示什么呢?{:shy:} SOS!!!!!!!!!!!!
页:
[1]