示例#1
0
文件: main.c 项目: CobooGuo/DSO_Nano
void main(void)
{
/*--------------initialization-----------*/

  Set_System();
  NVIC_Configuration();
  GPIO_Config();
  SD_Card_Check();
  USB_Init();
  ADC_Configuration();
  Timer_Configuration();
  LCD_Initial();
  Clear_Screen(BLACK); 
  Display_Logo(110,150);  
 
/*----------Power ON Information----------*/ 

  Display_Str(80, 87, GRN,   PRN, "System Initializing");
  Display_Str(102, 71, GRN,   PRN, "Please Wait");
  Display_Str(8, 39, WHITE, PRN, "DSO FW Copyright (c) BenF 2010-2011"); 
  Display_Str(8, 23, YEL,   PRN, "LIB ver 3.13");
  
  //WaitForKey();

  // check for presence of APP and jump to start
  pApp = (APP_Interface *)*(u32 *)(APP_VECTORS + 7 * 4);
  if (pApp->Signature == APP_SIGNATURE)
      pApp->APP_Start();

  Display_Str(150, 23, RED, PRN, "No APP found");
  while (1);
}
示例#2
0
void Soft_Reset(void)
{
	xSemaphoreTake(xDispSemaphore, portMAX_DELAY);
	{
		LCD_Reset();
		Delay1ms(500);
		LCD_Initial();
		Two_Layers();
		Delay1ms(100);
		Active_Window(0,479,0,271);
		Background_color(color_black);
		Text_color(color_white);
		Text_Cursor_Disable();
		Layer1_Visible();
		Write_To_Bank1();
		Clear_Active_Window();
		Write_To_Bank2();
		Clear_Full_Window();
		Display_ON();

		//backlight on for RAiO RA8875_demo_board_V2
		PWM1_enable();
		PWM1_duty_cycle(0xff);

		Text_color(color_white);
		Background_color(color_black);
		xSemaphoreGive(xDispSemaphore);
	}
}
示例#3
0
int main(void) {

	WDTCTL = WDTPW | WDTHOLD;		// Stop watchdog timer
	BCSCTL1 = CALBC1_16MHZ; 			// Set range
	DCOCTL = CALDCO_16MHZ; 			// Set DCO step + modulation
	Setup_Port();
	LCD_Initial();
	for (;;) {
		Dsp_Single_Colour(RED);
		Dsp_Single_Colour(GREEN);
		Dsp_Single_Colour(BLUE);
		delay_ms(500);
		Dsp_Single_Colour(WHITE);
		Display_Desc();
		delay_ms(500);
	}
	return 0;
}
示例#4
0
文件: main.c 项目: sky1993/git_1
int main( void)
{
	unsigned int Count = 0;
	
	P0 = 0xff;
	P1 = 0xff;
	P2 = 0xff;
	P3 = 0xff;
	LCD_Initial();
	GotoXY(0,0);
	Print("    Freq: 10  Hz");
	GotoXY(0,1);
	Print("squa   Vpp : 5 V");
	Timer_init();

	while(1)
	{
		if (P3 != 0xff)
		{
			Deal_key();
		}

		if (mode == 0)
		{
			DA_out(sin[Number_Frequency]);
		}
		else if (mode == 1)
		{
			DA_out(triangle[Number_Frequency]);
		}
		else if (mode == 2)
		{
			DA_out(square[Number_Frequency / 60]);
		}
	}
}