You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.0 KiB
40 lines
1.0 KiB
//----------------------------------------------------------------------------
|
|
// Laser Guard Ltd.
|
|
// Copyright © 2000-2002. All Rights Reserved.
|
|
// Version 1.0 01/01/2000
|
|
// Last modification: 08/10/2003
|
|
// PROJECT:
|
|
// SUBSYSTEM:
|
|
// FILE: ISR.H
|
|
// AUTHOR: Sergey Chizhevskiy
|
|
// OVERVIEW
|
|
// ~~~~~~~~
|
|
// Header file of ISR.H
|
|
//----------------------------------------------------------------------------
|
|
#ifndef __ISR__H__INCLUDED__
|
|
#define __ISR__H__INCLUDED__
|
|
|
|
typedef void __interrupt (*PISRPROC)(...);
|
|
|
|
#define DECLARE_VARIABLE( ClassName, VariableName ) \
|
|
void __interrupt VariableName##IsrProc(...); \
|
|
ClassName VariableName( VariableName##IsrProc ); \
|
|
void __interrupt VariableName##IsrProc(...) \
|
|
{ \
|
|
VariableName.OnISR(); \
|
|
}
|
|
|
|
class CIsr
|
|
{
|
|
public:
|
|
CIsr( PISRPROC pIsrProc ) { m_pIsrProc = pIsrProc; }
|
|
virtual ~CIsr() {}
|
|
|
|
public:
|
|
virtual void OnISR() = 0;
|
|
|
|
protected:
|
|
PISRPROC m_pIsrProc;
|
|
};
|
|
|
|
#endif
|