/** * com1553 - MIL-1553 Communication Library for Herschel * * Filename : \file irq2.s * * Purposes : \brief [DONE] com1553 - Module holder of mil1553's irq management * * Logical Task : TMTC * * Author : Scige * * Last Developer : $Author: annadg $ * * Revision : $Revision: 1.11 $ * * Checkout Tag : $Name: $ * * Last Modification : $Date: 2009/01/15 12:17:09 $ * * Location : $RCSfile: irq2.s,v $ * * \version : $Header: /home/local/cvsrep/OBS_FM/1553_Lib/irq2.s,v 1.11 2009/01/15 12:17:09 annadg Exp $ */ /* * Commitments History : * As reported in Main cvs Documentation * ( https://www.cvshome.org/docs/manual/cvs-1.11.18/cvs_12.html#SEC102 ) * The Modification Log has been posted at End Of File. */ // ---------------------------------------------------------------------------// /*-- (c) 2005 Nino Inaf - Ifsi --*/ /* * Commitments History : * As reported in Main cvs Documentation * ( https://www.cvshome.org/docs/manual/cvs-1.11.18/cvs_12.html#SEC102 ) * The Modification Log has been posted at End Of File. */ /** * Function name : irq2() * * Purpose: * This function is called when an interrupt arrives from the 1553 interface. * The event ISR_1553_EVENT is then raised and the control returns to VIRTUOSO * * Syntax: * irq2(); * * Input: * none * * Output: * none * * Return: * none * * Virtuoso Objects: * ISR_1553_EVENT * Event handler: isr1553 * Waiting task: tmtc * */ #if OBSCODE == HIFI_CODE #include "macro.h" #elif OBSCODE == SPIRE_CODE #include "macro.h" #elif OBSCODE == PACS_CODE #include "C:\Virtuoso\ADI21020\Inc\macro.h" #endif #include "def21020.h" /*-------------------------------------------------------------*/ #define G_1553_STACK_POINTER 0x8f000100 .segment /pm seg_pmco; .extern _K_ArgsP; .extern _Ghost_1553_StackPointer; .extern _Isr_1553_event; /*-------------------------------------------------------------*/ /* nino 17/11/2008 adding an interrupt counter */ /* used in isr2.s */ .extern _com1553_isr_counter; /*-------------------------------------------------------------*/ .global _irq2; _irq2: START_ISR; /* Macro defined in macro.h */ bit set IMASK IRQ2I; /* This mask corresponds to IRQ 2 of 21020 */ /*0x00000040 I_IRQ2I*/ r2 = dm(G_1553_STACK_POINTER); dm(_Ghost_1553_StackPointer) = r2; /*-------------------------------------------------------------*/ /* nino 17/11/2008 adding an interrupt counter */ r2 = dm(_com1553_isr_counter); r2 = r2 + 1; dm(_com1553_isr_counter) = r2; /*-------------------------------------------------------------*/ i4 = dm(_K_ArgsP); r2 = dm(_Isr_1553_event); /* This is the event number */ PRHI_STACK_PSH; ENDISR1; /* Macro defined in macro.h */ .endseg; /*-------------------------------------------------------------*/ /* * Commitments History : * $Log: irq2.s,v $ * Revision 1.11 2009/01/15 12:17:09 annadg * interrupt counter added in isr2, counter flag check added in res_check * * Revision 1.10 2006/10/20 09:22:14 lorenzo * 1553 library updated * * Revision 1.13 2006/10/16 14:19:53 scige * Some More Comments * * Revision 1.12 2006/06/07 11:44:56 scige * Some More Comment * by Scige John Liu IFSI * * Revision 1.11 2006/04/27 10:21:44 scige * Some more Comment alignement before STRONG COMMENTING * * Revision 1.10 2006/03/08 17:23:24 daniele * changed include scheme and added some comments * * Revision 1.9 2006/02/15 14:56:57 scige * Abstract comment reformatted * History log replaced or moved at end of file * * Revision 1.8 2006/02/15 14:34:03 scige * Some more comments restored * * Revision 1.4 2005/09/16 13:09:40 scige * *** empty log message *** * * Revision 1.2 2005/08/26 12:16:19 scige * storage * * Revision 1.1 2005/08/10 12:53:40 scige * Communication Library: 1553 * com1553 * Base Common Version of Spire/Pacs OBS * */