高中生
最后登录1970-1-1
在线时间 小时
注册时间2015-3-12
|
本来想把摄像机和触摸屏的功能合并到一起,但是我把摄像机的功能移植到触摸屏的时候,即使不用触摸屏的功能,液晶也一直显示红色,具体的程序如下:
#include "stm32f10x.h"
#include "bsp_usart1.h"
#include "bsp_ili9341_lcd.h"
#include "bsp_sdfs_app.h"
#include "bsp_bmp.h"
#include "bsp_SysTick.h"
#include "bsp_touch.h"
#include "bsp_spi_flash.h"
#include "bsp_led.h"
#include "even_process.h"
#include "bsp_ov7725.h"
extern uint8_t Ov7725_vsync;
int main(void)
{
//uint8_t k;
LCD_Init();
//LCD_Clear(0, 0, 240, 320, WHITE);
Sd_fs_init();
USART1_Config();
SysTick_Init();
//LED_GPIO_Config();
SPI_FLASH_Init();
Ov7725_GPIO_Config();
while(Ov7725_Init() != SUCCESS);
VSYNC_Init();
Ov7725_vsync = 0;
//Touch_Init();
/*
#if 1
SPI_FLASH_BufferRead(&cal_flag, 0, 1);
if( cal_flag == 0x45 )
{
SPI_FLASH_BufferRead((void*)cal_p, 1, sizeof(cal_p));
SPI_FLASH_CS_HIGH();
for( k=0; k<6; k++ )
printf("\r\n rx = %LF \r\n",cal_p[k]);
}
else
{
while(Touch_Calibrate() !=0);
}
#elif 0
while(Touch_Calibrate() !=0);
#endif*/
while(1)
{
if( Ov7725_vsync == 2 )
{
FIFO_PREPARE;
ImagDisp();
Ov7725_vsync = 0;
}
}
}
|
|