main.c
来自「easyarm2103开发板资料」· C语言 代码 · 共 49 行
C
49 行
/***********************************************Copyright (c)*********************************************
** Guangzou ZLG-MCU Development Co.,LTD.
**
** http://www.zlgmcu.com
**
**--------------File Info---------------------------------------------------------------------------------
** File name: main.c
** Last modified Date: 2007-09-20
** Last Version: 1.0
** Descriptions: The main() function example template
**
**--------------------------------------------------------------------------------------------------------
** Created by:
** Created date:
** Version:
** Descriptions:
**
**--------------------------------------------------------------------------------------------------------
** Modified by:
** Modified Date:
** Version:
** Descriptions:
**
*********************************************************************************************************/
#include "config.h"
/*********************************************************************************************************
** Function name: main
** Descriptions: 用户主函数,用户写程序需要注意以下几个步骤
** 1.用户要对自己操作的管脚进行管脚功能设置,设置文件为pinConfig.h
** 2.如果用户代码需要中断,需要打开内核中断,函数为:IRQEnable(); FIQEnable();
** 3.用户有中断,需要设置VIC,设置函数请参考IRQManage.h
** 4.其他功能实现用户可参考相关驱动的头文件或使用说明文档
** Input parameters: NONE
** Output parameters: NONE
** Returned value: NONE
*********************************************************************************************************/
int main (void)
{
char cEintArg[ ] = "ExtMode=1 ExtPolar=0 ExtWake=0"; /* 设置为边沿触发且下降沿触发 */
eintInit(EINT0, cEintArg, NULL); /* 外部中断0初始化 */
irqVicSet(EINT0_VIC, 0, eint0Isr); /* 设置外部中断0优先级 */
IRQEnable( ); /* 开IRQ中断 */
while(1); /* 等待中断 */
}
/*********************************************************************************************************
END FILE
*********************************************************************************************************/
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?