STM32
摄像头模块成像
#include "system.h"
#include "SysTick.h"
#include "led.h"
#include "usart.h"
#include "tftlcd.h"
#include "key.h"
#include "malloc.h"
#include "sd.h"
#include "flash.h"
#include "ff.h"
#include "fatfs_app.h"
#include "key.h"
#include "font_show.h"
#include "exti.h"
#include "time.h"
#include "string.h"
#include "math.h"
#include "ov7670.h"
extern u8 ov_sta; //在exit.c里面定义
extern u8 ov_frame; //在time.c里面定义
//更新LCD显示
void camera_refresh(void)
{
u32 j;
u16 i;
u16 color;
u16 temp;
if(ov_sta)//有帧中断更新?
{
//LCD_Set_Window((tftlcd_data.width-320)/2,(tftlcd_data.height-240)/2,320,240-1);//将显示区域设置到屏幕中央
LCD_Set_Window(0,(tftlcd_data.height-240)/2,320-1,240-1);//将显示区域设置到屏幕中央
OV7670_RRST=0; //开始复位读指针
OV7670_RCK_L;
OV7670_RCK_H;
OV7670_RCK_L;
OV7670_RRST=1; //复位读指针结束
OV7670_RCK_H;
/*for(i=0;i<240;i++) //此种方式可以兼容任何彩屏,但是速度很慢
{
for(j=0;jIDR&0XFF; //读数据
OV7670_RCK_H;
color
1