/*----------------------------------------------------------------------------* * Copyright (c) 2005 Southeastern Universities Research Association, * * Thomas Jefferson National Accelerator Facility * * * * This software was developed under a United States Government license * * described in the NOTICE file included as part of this distribution. * * * * E.Wolin, 25-Feb-2005, Jefferson Lab * * * * Authors: Elliott Wolin * * wolin@jlab.org Jefferson Lab, MS-6B * * Phone: (757) 269-7365 12000 Jefferson Ave. * * Fax: (757) 269-5519 Newport News, VA 23606 * * *----------------------------------------------------------------------------*/ #ifndef _vxSIS3610InterruptService_hxx #define _vxSIS3610InterruptService_hxx #include #include #include #include #include #include #include namespace codaObject { // for board support packages extern "C" { extern int sysBusToLocalAdrs(int,char*,char**); extern int intDisconnect(int); extern int sysIntEnable(int); } // check SIS3610 manual... #define VME_ACCESS_MODE 0x29 // user selectable within constraints from cpu #define DISPATCH_PRIORITY 100 #define INTERRUPT_LEVEL 5 #define INTERRUPT_VECTOR 0xee //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- /** * Implements InterruptService for SIS 3610 board. * Not implemented yet. */ class vxSIS3610InterruptService : public InterruptService { private: static void ISR(int sem); public: vxSIS3610InterruptService(unsigned short *base_addr, int dispatchPriority = DISPATCH_PRIORITY, int interruptLevel = INTERRUPT_LEVEL, short interruptVector = INTERRUPT_VECTOR); virtual bool setupInterrupt(void); virtual bool enableInterrupt(void); virtual bool deleteInterrupt(void); virtual int dispatchInterrupt(void); protected: int myInterruptTaskId; SEM_ID mySemId; unsigned short *myBaseAddr; int myDispatchPriority; int myInterruptLevel; int myInterruptVector; unsigned short *myAddr; }; //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- } // namespace codaObject #endif