int main(void)
{
u8 key;
u8 t;
NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2);//?è????????????????·?×é2
delay_init(168); //?????????±????
uart_init(115200); //???????®???¨??????115200
usart2_init(42,115200); //???????®??2?¨??????115200
LED_Init(); //??????LED
LCD_Init(); //LCD??????
KEY_Init(); //°??ü??????
TIM3_Int_Init(10000-1,8400-1);//10Khz????,1????????????
usmart_dev.init(84); //??????USMART
POINT_COLOR=RED;//?è??×??????ì??
LCD_ShowString(30,50,200,16,16,"Explorer STM32F4");
LCD_ShowString(30,70,200,16,16,"OV2640 TEST");
LCD_ShowString(30,90,200,16,16,"ATOM@ALIENTEK");
LCD_ShowString(30,110,200,16,16,"2014/5/14");
while(OV2640_Init())//??????OV2640
{
LCD_ShowString(30,130,240,16,16,"OV2640 ERR");
delay_ms(200);
LCD_Fill(30,130,239,170,WHITE);
delay_ms(200);
}
LCD_ShowString(30,130,200,16,16,"OV2640 OK");
while(1)
{
key=KEY_Scan(0);
if(key==KEY0_PRES) //RGB565????
{
ov2640_mode=0;
break;
}else if(key==KEY1_PRES) //JPEG????
{
ov2640_mode=1;
break;
}
t++;
if(t==100)LCD_ShowString(30,150,230,16,16,"KEY0:RGB565 KEY1:JPEG"); //?????????á??????
if(t==200)
{
LCD_Fill(30,150,210,150+16,WHITE);
t=0;
}
delay_ms(5);
}
if(ov2640_mode)jpeg_test();
else rgb565_test();
}
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
---------------------------------
知道了里面有个break
但是里面有个东西
int main(void)
{
u8 key;
u8 t;
NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2);//?è????????????????·?×é2
delay_init(168); //?????????±????
uart_init(115200); //???????????¨??????115200
usart2_init(42,115200); //??????????2?¨??????115200
LED_Init(); //??????LED
LCD_Init(); //LCD??????
//KEY_Init(); //°??ü??????
TIM3_Int_Init(10000-1,8400-1);//10Khz????,1????????????
usmart_dev.init(84); //??????USMART
POINT_COLOR=RED;//?è??×??????ì??
LCD_ShowString(30,50,200,16,16,"Explorer STM32F4");
LCD_ShowString(30,70,200,16,16,"OV2640 TEST");
LCD_ShowString(30,90,200,16,16,"ATOM@ALIENTEK");
LCD_ShowString(30,110,200,16,16,"2014/5/14");
while(OV2640_Init())//??????OV2640
{
LCD_ShowString(30,130,240,16,16,"OV2640 ERR");
delay_ms(200);
LCD_Fill(30,130,239,170,WHITE);
delay_ms(200);
}
LCD_ShowString(30,130,200,16,16,"OV2640 OK");
/*while(1)
{
key=KEY_Scan(0);
if(key==KEY0_PRES) //RGB565????
{
ov2640_mode=0;
break;
}else if(key==KEY1_PRES) //JPEG????
{
ov2640_mode=1;
break;
}
t++;
if(t==100)LCD_ShowString(30,150,230,16,16,"KEY0:RGB565 KEY1:JPEG"); //?????????á??????
if(t==200)
{
LCD_Fill(30,150,210,150+16,WHITE);
t=0;
}
delay_ms(5);
}*/
//if(ov2640_mode)
while(1)
{ jpeg_test();}
//else rgb565_test();
}
我想直接发JPEG但是调不通
一周热门 更多>