dointerrupt.c

来自「16位单片机H8的例子源代码」· C语言 代码 · 共 61 行

C
61
字号
/*
****************************************************************************
					H I T A C H I    P R O P R I E T A R Y

	COPYRIGHT (c)	2001 BY Semiconductor & Integrated Circuits,Hitachi,Ltd.
						---  ALL RIGHTS RESERVED  ---

	File Name	:DoInterrupt.c
	Working		:Executing Interrupt transfer
	Modified	:Rev 2001_10_05 {Author : T.Ishikawa}
	Modified	:Rev 2001_09_28 {Author : T.Ishikawa}
	Created		:Rev 1.0 {Author : T.Ishikawa[2001.Jan.10]}
****************************************************************************
*/

#ifndef SysMemMap
#include	"SysMemMap.h"
#endif	/*	SysMemMap	*/

#ifndef CatProType
#include	"CatProType.h"
#endif	/*	CatProType	*/



/*	Prototype	*/
void				ActInterruptIn(unsigned long ,unsigned char);



/*	Contents	*/
/***************************************************************************
Function Name	:ActInterruptIn(unsigned long,unsigned char)
Working			:Executing Interrupt-IN transfer
Return Value	:void
Modified		:{Author : T.Ishikawa[2001.Oct.04]}
Modified		:{Author : T.Ishikawa[2001.Aug.09]}
Modified		:{Author : T.Ishikawa[2000.Jun.12]}
Created			:{Author : T.Ishikawa[2000.Jan.11]}
***************************************************************************/
void	ActInterruptIn(unsigned long interruptBitStreamLVar ,unsigned char epInfoNumberLVar) {

	if (EpInfo[epInfoNumberLVar].PresentState != TRANS_IN) {
		/*	clear Interrpt Transfer interrpt flag	*/
		INTERRUPTI_TRANS_FACTOR_CLEAR
	}
	
	if (dataBuffGPtr[epInfoNumberLVar].AccessDataType.ReadType.startPtr != dataBuffGPtr[epInfoNumberLVar].AccessDataType.ReadType.endPtr) {
	/*	Function has any transfer data	*/
		/*	state is set "TRANS_IN"	*/
		EpInfo[epInfoNumberLVar].PresentState = TRANS_IN;

		/*	start packet transfer function	*/
		PutPacket(&EpInfo[epInfoNumberLVar],&dataBuffGPtr[epInfoNumberLVar]);
	}
	else {
		/*	state is set "WAIT"	*/
		EpInfo[epInfoNumberLVar].PresentState = WAIT;
	}
}

⌨️ 快捷键说明

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