📄 e10a.c
字号:
/*""FILE COMMENT""*************************************************************
* System Name : for eduction (NO TRANSFERRING)
* File Name : e10a.c
* Contents : embedded C language entrance course
* : exercise 10A: make interrupt program
* Model : for OAKS8-LCD Board
* CPU : R8C/Tiny series
* Compiler : NC30WA V.5.30 Release 1
* OS : not be used
* Programmer : RENESAS Semiconductor Training Center
* Note : for OAKS8-R5F21114FP(R8C/11 group,20MHz)
****************************************************************************
* COPYRIGHT(C) 2004 RENESAS TECHNOLOGY CORPORATION
* AND RENESAS SOLUTIONS CORPORATION ALL RIGHTS RESERVED
****************************************************************************
* History :
*""FILE COMMENT END""*******************************************************/
/*===== include file =====*/
#include "defs.h" /* define common symbol */
#include "target.h" /* SFR definition file */
#include "ledutl.h" /* header file control LED */
#include "intr_i0.h" /* header file control interrupt */
/*===== define macro =====*/
/*===== define function prototype =====*/
void main(void); /* main function */
/*===== define variable =====*/
/*""FUNC COMMENT""*************************************************************
* ID : 1.0
* function name : void main(void)
* function : display number of times that SW5 is pushed at LED0
* parameter : none
* return : none
* function used : LED__initialize, int0_initialize, LED__puthex
* notice : none
* History : ---
*""FUNC COMMENT END""*********************************************************/
void main(void)
{
}
/*""FUNC COMMENT""*************************************************************
* ID : ---
* function name : void int0_initialize( void )
* function : initialize INT0 interrupt
* parameter : none
* return : none
* function used : none
* notice : none
* History : ---
*""FUNC COMMENT END""*********************************************************/
static void int0_initialize(void) /* define function to initialize INT0 interrupt */
{
int0f = 0x03; /* set INT0 input filter selection register */
/* xxxxx011 */
/* |++---- has filter, sampling with f32 */
/* +------ reservation bit */
int0ic = 0x01; /* set INT0 interrupt control register */
/* xx000001 */
/* |||+++---- interrupt priority level */
/* ||+------- interrupt request bit */
/* |+-------- polarity exchange bit */
/* | (select drop edge) */
/* +--------- reservation bit */
int0en = SET; /* INT0 interrupt permission */
}
/*""FUNC COMMENT""*************************************************************
* ID : ---
* function name : void INTint0(void)
* function : count when INT0 interrupt occurs
* : (called by INT0 interrupt program when edge is input to INT0 port)
* parameter : none
* return : none
* function used : none
* notice : interrupt function called by interrupt program
* : use global variable Counter
* History : ---
*""FUNC COMMENT END""*********************************************************/
void INTint0(void) /* define INT0 interrupt function */
{
}
/******************************************************************************
end of file
******************************************************************************/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -