zoukankan      html  css  js  c++  java
  • 基于NIOS II的液晶显示设计——ucGUI测试代码

    #include "GUI.h"
    #include "system.h"
    #include "io.h"
    #include "alt_types.h"
    #include"stdio.h"
    #include"unistd.h"
    #include"bitmap.h"
    #include"graphics.h"
    #include"string.h"

    int main(void)
    {

       GUI_Init();
       int i;
       while(1)
       { 
           GUI_Clear();
           for(i=0;i<lcd_frame/2;i++)  IOWR_32DIRECT(SRAM_BASE,4*i,image[4*i]+(image[4*i+1]<<8)+(image[4*i+2]<<16)+(image[4*i+3]<<24));
           set_color(BRIGHTBLUE);
           frame(0,0,319,239,10);
           GUI_SetTextMode(2);
           GUI_SetColor(GUI_WHITE);
           GUI_DispStringHCenterAt("Hainan",160,20);  
           usleep(5000000);
          
           GUI_SetBkColor(GUI_BLUE);
           GUI_Clear();
           GUI_FillEllipse(160,120,80,60);
           GUI_DispStringHCenterAt("Ellipse",160,20);
           usleep(5000000);
          
           GUI_SetBkColor(GUI_BLACK);
           GUI_Clear();
           GUI_DispStringHCenterAt("XOR MODE",160,20);
           GUI_SetDrawMode(GUI_DRAWMODE_NORMAL);
           GUI_FillCircle(150, 114, 40);
           GUI_SetDrawMode(GUI_DRAWMODE_XOR);
           GUI_FillCircle(170, 134, 40);
           GUI_SetDrawMode(GUI_DRAWMODE_NORMAL);
           GUI_DrawRect(200,180,300,220);
           usleep(1000000);
           GUI_ClearRect(200,180,300,220);
           GUI_DrawRect(0,0,319,239);

           usleep(10000000);
       }
        return 0;

    }

  • 相关阅读:
    Makefile 文件格式
    带你深入理解传递參数
    LeetCode OJ Basic Calculator II
    emacs 为什么找不到运行程序?
    iOS Dev (51)加急审核
    POJ 1159 Palindrome
    9.9递归和动态规划(十二)——小鸡吃米
    c++操作当前窗体句柄
    [Python]计算闰年时候出现的and和or优先级的问题以及短路逻辑
    静态代理模式
  • 原文地址:https://www.cnblogs.com/Neddy/p/2027198.html
Copyright © 2011-2022 走看看