//---------------------------------------------------------------------------- // 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