⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 helloworld.c

📁 ucgui3.90在44b0上的移植
💻 C
字号:
/*
*********************************************************************************************************
*                                                礐/GUI
*                        Universal graphic software for embedded applications
*
*                       (c) Copyright 2002, Micrium Inc., Weston, FL
*                       (c) Copyright 2000, SEGGER Microcontroller Systeme GmbH
*
*              礐/GUI is protected by international copyright laws. Knowledge of the
*              source code may not be used to write a similar product. This file may
*              only be used in accordance with a license and should not be redistributed
*              in any way. We appreciate your understanding and fairness.
*
* File        : BASIC_HelloWorld.c
* Purpose     : 礐/GUI sample code for a simple demo drawing "Hello world"
*********************************************************************************************************
*/
#include "includes.h"

/*******************************************************************
*
*                 main
*
********************************************************************
*/
extern void LCD_L0_DrawVLine  (int x, int y0,  int y1);
extern void LCD_L0_DrawHLine  (int x0, int y, int x1);

void Main(void)
{



    rINTMSK = BIT_GLOBAL ;	//disable INT
    rSYSCFG=SYSCFG_8KB;		//使用8K字节的指令缓存
	rNCACHBE0=((unsigned int)(Non_Cache_End>>12)<<16)|(Non_Cache_Start>>12); 
    //在上面的数据区域不使用高速缓存
	
	Port_Init();		//IO端口功能、方向设定
	//ChangePllValue( 56, 3, 1 ) ;
	ChangePllValue(52,2,1);		//修改系统主频为60MHz
	Delay(0);		//利用系统时钟校准延时函数

  	InitLcm();			// 初始化 显示LCM
  	GUI_Init();			// GUI 初始化
	// GUI_SetBkColor(GUI_RED);	//设置显示屏的背景颜色
	//GUI_SetBkColor(GUI_WHITE);		// 设置显示屏的前景颜色
	
	GUI_Clear();

	// GUI_SetBkColor(GUI_RED);	//设置显示屏的背景颜色
	GUI_SetColor(GUI_RED);		// 设置显示屏的前景颜色
  	
 // void LCD_L0_DrawVLine  (int x, int y0,  int y1)
  //   LCD_L0_DrawVLine(10,0,200);
  //	void LCD_L0_DrawHLine  (int x0, int y, int x1)
  //   LCD_L0_DrawHLine  (10,50,400);
  	GUI_DispString("Hello World!\n");
  	GUI_DispString("Hello  2005!");
  	while(1);
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -