main.c

来自「gui 44bo图形界面编程 helloworldADS环境下」· C语言 代码 · 共 40 行

C
40
字号

#include "gui\core\GUI.h"

#include "Target\44b.h"
#include "Target\44blib.h"

/********************************************/
//   ARMSYS实验十九:GUI基础应用 
//   描述:了解GUI的基本应用                   
/********************************************/
void Main(void) {

    int i=0;
  
    rSYSCFG=CACHECFG;// Using 8KB Cache//
	Port_Init();
	Uart_Init(0,115200);
	Led_Display(0xf);
	Delay(0);
    Beep(0x01);
	Uart_Select(0); //Select UART0//
	Uart_Printf("\n\n*************************************************************************");
	Beep(0x0);
	Uart_Printf("\n*                              立泰电子                                  *");
	Uart_Printf("\n*                     -GUI应用:Hello World-                             *");
	Uart_Printf("\n*                          Version 1.10                                 *");    
	Uart_Printf("\n*                     Email:rao_dali@263.net                            *");
	Uart_Printf("\n*             UART Config--COM:115.2kbps,8Bit,NP,UART0                  *");
	Uart_Printf("\n*------------------Begin to Start HelloWorld,OK? (Y/N)------------------*");
	Led_Display(0x0);
    	Uart_Printf("\nLook at LCD!");
    GUI_Init();//对GUI进行初始化(包括对LCD显示的初始化)
    GUI_DispString("Hello world!");//在(0,0)位置显示字符串
    while(1){
        GUI_DispDecAt(i++,20,20,4);//在(20,20)位置显示整数
        if (i>9999) i=0;
    }

}

⌨️ 快捷键说明

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