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

📄 44bmain.c

📁 S3C44B0的lcd测试程序
💻 C
字号:
/*************************************************************************
* FILE NAME                                     VERSION                
*                                                                      
*        44bmain.c            		            1.0              
*                                                                      
* COMPONENT                                                            
*                                                                      
*        Flash Operation such as erase/program                                    
*                                                                      
* DESCRIPTION                                                          
*                                                                      
*      	  
*                                                                      
* DATA STRUCTURES                                                      
*                                                                      
*               
*                                                                      
* FUNCTIONS                                                            
*
*        
*                                                                      
* DEPENDENCIES                                                         
*        
*       
* HISTORY
*	
*		Meter Chen                2001-7
*                                                               
************************************************************************/

#include <stdlib.h>
#include <string.h>
#include <math.h>

#include "..\inc\def.h"
#include "..\inc\option.h"
#include "..\inc\44b.h"
#include "..\inc\44blib.h"
#include "..\inc\LCD.h"

char str_send[17]="Embest S3CEV40>\0";
char str_error[50]="TERMINAL OVERFLOW : 256 character max !";
char str[256];
char CR[1]={0x0A};

int main(void)
{
	char key;
        
    /**** SYSTEM INITIALIZE */
    
	/* disable system cache */
    rSYSCFG = 0;

    //__rt_lib_init();

    Port_Init();
    
	rI_ISPC=0xFFFFFFFF;		/* clear all interrupt pend */
    Delay(0);				/* delay time */
    Uart_Init(0,115200);	/* initial serial port 1 */
//	Uart_Select(1);
	Uart_SendByte(0x55);
	Delay(100);
	/* printf interface */
	Uart_Printf("\n");
	Uart_Printf(str_send);
	
	/* get user input */
	Delay(500);
	
    Uart_Printf("The IC Card Hand-held System is initiated!\n");              
    /**** FLASH OPERATION */
    
    /* 1 - get flash'ID, if it work well, at least our hardware is good */
//    Flash_ReadID();
    
    /* 2 - erase the whole chip, also you can erase it sector by sector */
//    Flash_Erase_Chip();
    
    /* 3 - write into flash from a temporary buffer */
    /* the buffer base is 0xc100000, the image length is 1000000, you can change these */
//    Flash_Write(0, (char *)0xc100000, 100000);
    
    /**** PROGRAM OVER */


    while(1)
    {
    	key=Key_Scan();
    	switch(key)
    	{
    		case 3:Led_On(1);Delay(200);Led_Off(1);break;
    		case 4:Led_On(2);Delay(200);Led_Off(2);break;
    		case 5:Led_On(3);Delay(200);Led_Off(3);break;
    		case 6:Led_On(1);Led_On(2);Led_On(3);Delay(200);Led_Off(1);Led_Off(2);Led_Off(3);Test_LcdMono();break;
    		default:continue;
    	}
    }
}

⌨️ 快捷键说明

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