int main( void )
{
  u32 Point = 0;
  u16 OV7725_ID = 0;

  SystemInit();
  GPIO_Config();

  Delay_1ms(1);
  SSD1963_Config();
  Delay_1ms(50);
  SSD1963_Init();
  Delay_1ms(20);
  TFT_Clear(WHITE);

  // SCCB Init
  SCCB_Init();
  Delay_1ms(2);

  // Read ID & Check
  OV7725_ID = OV_ReadID();
  while(OV7725_ID != 0x7721) {
    LED_R = ~LED_R;
    Delay_100ms(1);
  }

  // OV7725 Init
  while(1==OV_Init());
  Cam_Start();

  while(1) {
    LED_G = ~LED_G;
    Delay_100ms(1);
  }
}
Example #2
0
int main(void)
{
	
	SystemInit();
	
	SSD1963_Init();

	SSD1963_Clear(Red);
	Delay(100);
	SSD1963_Clear(Blue);
	Delay(100);
	SSD1963_Clear(Red);
	SSD1963_Fill(0, 0, 50, 50, Blue);
	
	RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_CRC, ENABLE);
	GUI_Init();
	GUI_SetColor(GUI_RED);
	GUI_Clear();
	
	BSP_KeyInit( BSP_KEY1, BSP_KEY1_GPIO_PORT );

	BSP_USART_Init( );
	
	BSP_SPI_Init( );
	BSP_SPI_CS_Init( );
	
	//Debug_ShowRegister( GPIOA_BASE, (DebugPeripheralTypedef *)&DeBugGPIO );
	//Debug_ShowRegister( BSP_USARTx_BASE, (DebugPeripheralTypedef *)&DeBugUART );
	//Debug_ShowRegister( RCC_BASE, (DebugPeripheralTypedef *)&DeBugRCC );
	//Debug_ShowSpecificRegister( RCC_BASE, (DebugPeripheralTypedef *)&DeBugRCC, "APB2ENR" );
	
  /* 初始化LWIP协议栈*/
	LwIP_Init(); 

	/*初始化web server 显示网页程序*/
	httpd_init();
  
  /* 初始化telnet   远程控制 程序 */   
  CMD_init();                                       

  /* Infinite loop */
  while ( 1 )
	{	
		/*轮询*/  
		LwIP_Periodic_Handle(LocalTime);		          	  
  }

}
Example #3
0
int main(void)
{
	
	SystemInit();
	
	SSD1963_Init();

	SSD1963_Clear(Red);
	Delay(100);
	SSD1963_Clear(Blue);
	Delay(100);
	SSD1963_Clear(Red);
	SSD1963_Fill(0, 0, 50, 50, Blue);
	
	RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_CRC, ENABLE);
	GUI_Init();
	GUI_SetColor(GUI_RED);
	GUI_Clear();
	
	BSP_KeyInit( BSP_KEY1, BSP_KEY1_GPIO_PORT );

	BSP_USART_Init( );
	
	BSP_SPI_Init( );
	BSP_SPI_CS_Init( );
	
	//Debug_ShowRegister( GPIOA_BASE, (DebugPeripheralTypedef *)&DeBugGPIO );
	//Debug_ShowRegister( BSP_USARTx_BASE, (DebugPeripheralTypedef *)&DeBugUART );
	//Debug_ShowRegister( RCC_BASE, (DebugPeripheralTypedef *)&DeBugRCC );
	//Debug_ShowSpecificRegister( RCC_BASE, (DebugPeripheralTypedef *)&DeBugRCC, "APB2ENR" );
	
  /* ³õʼ»¯LWIPЭÒéÕ»*/
	//LwIP_Init(); 

  Web_Server();

}
Example #4
0
void GUI_X_Init(void) 
{
	SSD1963_Init();
}
Example #5
0
int main(void)
{
  int i_counter = 160;	
	
	SystemInit();
	
	SSD1963_Init();

	SSD1963_Clear(Red);
	Delay(100);
	SSD1963_Clear(Blue);
	Delay(100);
	SSD1963_Clear(Red);
	SSD1963_Fill(0, 0, 50, 50, Blue);
	
	RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_CRC, ENABLE);
	GUI_Init();
	GUI_SetColor(GUI_RED);
	GUI_Clear();
	
	BSP_KeyInit( BSP_KEY1, BSP_KEY1_GPIO_PORT );

	BSP_USART_Init( );
	
	BSP_SPI_Init( );
	BSP_SPI_CS_Init( );
	
	//Debug_ShowRegister( GPIOA_BASE, (DebugPeripheralTypedef *)&DeBugGPIO );
	//Debug_ShowRegister( BSP_USARTx_BASE, (DebugPeripheralTypedef *)&DeBugUART );
	//Debug_ShowRegister( RCC_BASE, (DebugPeripheralTypedef *)&DeBugRCC );
	//Debug_ShowSpecificRegister( RCC_BASE, (DebugPeripheralTypedef *)&DeBugRCC, "APB2ENR" );
	
  /* 初始化LWIP协议栈*/
	LwIP_Init(); 

	/* 初始化web server 显示网页程序 */
	//httpd_init();
  
  /* 初始化telnet 远程控制程序 */   
  //CMD_init();                                       

  /* 初始化web celient远程控制程序 */  
  //tcp_client_connect();
	tcp_client_connect();
	
  /* Infinite loop */
  while ( 1 )
	{	
		static int i = 0;
		/*轮询*/ 
		if(i >= 150)
		{
			i = 0;
			i_counter ++;
			if(Updateflag == 1)
			{
				tcp_client_connect();	
			}
			printf("*******************  tcp_client_connect *************************\r\n");
		}			
		
		LwIP_Periodic_Handle(LocalTime);

		if(i_counter> 1000)
			i_counter = 101;
		
		wendu[0] = i_counter/100%10 + 0x30;
		wendu[1] = i_counter/10%10 + 0x30;
		wendu[3] = i_counter%10 + 0x30;
	
		printf(wendu);
		
		printf("      i = %d\r\n",i);
		
		i++;
		
		Delay(10);
  }

}