新手入门
- 积分
- 14
- 金钱
- 14
- 注册时间
- 2020-12-13
- 在线时间
- 7 小时
|

楼主 |
发表于 2021-2-20 17:01:35
|
显示全部楼层
OV2640_RGB565_Mode(); //RGB565模式
OV2640_Light_Mode(0); //自动模式
OV2640_Color_Saturation(3);//色彩饱和度0
OV2640_Brightness(4); //亮度0
OV2640_Contrast(3); //对比度0
//OV2640_Special_Effects(2); //设置成黑白
OV2640_ImageWin_Set(0,0,1600,1184); // 1600 = 40 * 40 , 1184 = 32 *37
OV2640_OutSize_Set(output_width,output_height);
DCMI_Init(); //DCMI配置
dcmi_rx_callback=out_dcmi_rx_callback;
DCMI_DMA_Init((u32)dcmi_line_buf0,(u32)dcmi_line_buf1,output_width/2,DMA_MDATAALIGN_HALFWORD,DMA_MINC_ENABLE);//DCMI DMA配置
currentline = 0 ;
one_shot_ok = 0;
LCD_Clear(BLACK);
DCMI_Start(); //启动传输
while(one_shot_ok!=1)
{
delay_ms(10);
}
ouputpointer = (u16*)picture_data_buf;
for(i=0;i < output_height ; i++){
for(j=0 ; j < output_width ; j++){
printf("%x ",ouputpointer[i*output_width+j]);
}
printf("\r\n");
} |
|