main.c

来自「Embest EudKit-II教学系统配Samsung S3C44B0处理器的」· C语言 代码 · 共 59 行

C
59
字号
/*********************************************************************************************
* File:	main.c
* Author:	embest
* Desc:	c main entry
* History:	
*********************************************************************************************/


/*--- include files ---*/
#include "44b.h"
#include "44blib.h"


/*--- function declare ---*/
void main(void);


/*--- function code ---*/


/*********************************************************************************************
* name:		main
* func:		c code entry
* para:		none
* ret:		none
* modify:
* comment:		
*********************************************************************************************/
void Main(void)
{
    sys_init();        /* Initial 44B0X's Interrupt,Port and UART */

	/******************/
	/* user interface */
	/******************/
	uart_printf("\n\rEmbest S3C44B0X Evaluation Board(EduKit II)");
	uart_printf("\n\rPS2 Keyboard Test Example\n\n");

	rINTCON = 0x00000001; // Vetcor Interrupt Mode
	rINTMSK = 0x03ffffff;
	rINTMOD = 0x00000000;
	rI_ISPC = 0x03ffffff;

	delay(5000);		// wait for keyboard reset completely
	if(KbdInit())
	{
		uart_printf("Initialize ps2 keyboard, successful.\n");
		KbdTest();
	}
	else
	{
		uart_printf("Initialize ps2 keyboard, failed.\n");
	}

	KbdClose();

	while(1);
}

⌨️ 快捷键说明

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