/** * com1553 - MIL-1553 Communication Library for Herschel - Initialization of RT ( header ). * * Filename : \file init1553.h * * Purposes : \brief [DONE] com1553 - MIL-1553 Communication Library for Herschel - Initialization of RT ( header ). * * Logical Task : in Spire - INIT * : in Pacs - TBW - TODO * : in HIFI - TBW - TODO * : \ingroup group_COM1553 * * Author : Scige * * Last Developer : $Author: lorenzo $ * * Revision : $Revision: 1.14 $ * * Checkout Tag : $Name: $ * * Last Modification : $Date: 2009/01/15 13:56:54 $ * * Location : $RCSfile: init1553.h,v $ * * \version : $Header: /home/local/cvsrep/OBS_FM/1553_Lib/init1553.h,v 1.14 2009/01/15 13:56:54 lorenzo 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. */ //----------------------------------------------------------------------------// //----------------------------------------------------------------------------// #ifndef __INIT_1553_H__ #define __INIT_1553_H__ //----------------------------------------------------------------------------// #include "MilDef.h" #if OBSCODE == HIFI_CODE extern int Delta_0_SubFrame_Counter; extern int Delta_1_SubFrame_Counter; extern int Counter_Flag; #endif extern unsigned int memcrc16(unsigned int*, unsigned int, unsigned int); //----------------------------------------------------------------------------// extern MilConf_p MilRTConf; extern RTBlkHandle Tx_data_han[16],//Sub address 27 Tx_data_han27, //Sub address 27 Rx_data_han27, //Sub address 27 Rx_data_han[4], //Sub address 11:14 Tx_data_han1, //Sub address 1 Tx_data_han8, //Sub address 8 Rx_data_han8, //Sub address 8 TRx_data_han30, //Sub address 30 Rx_data_han10, //Sub address 10 Tx_data_han10, //Sub address 10 Bcst_data_han; extern int FreePackDPRAM, FreeCmndDPRAM; extern SubAddrCtrlWrd sa_conf, circ_sa_conf, wrap_around_sa_conf; //----------------------------------------------------------------------------// /// Maximum packet of TM storable on DDC 1553 DPRAM #define MaxPackDPRAM 4 /// Maximum packet of TC storable on DDC 1553 DPRAM #define MaxCmndDPRAM 1 //----------------------------------------------------------------------------// //----------------------------------------------------------------------------// //----------------------------------------------------------------------------// //-- //----------------------------------------------------------------------------// extern int Ghost_1553_StackPointer; extern struct TM_request * TmWriter, * TmReader; extern struct TM_request TM_PACK[]; #if OBSCODE != HIFI_CODE extern int Waiting_TM_packet; #endif extern int RTAddress; //for Esa enhanced directive use only extern int Current_time; extern int SubFrame_Counter, //for Esa enhanced directive use only Current_SubFrame, //for Esa enhanced directive use only RT_TMEnable, //for Esa enhanced directive use only RT_TMEnable_prev; extern volatile unsigned int Burst_active; extern int Isr_1553_event; extern int TM_pkt_ctr; //----------------------------------------------------------------------------// #define TM_STATUS_OFFSET 0 #define TMREQ_REPLY_OFFSET 2 #define TCPTD_REPLY_OFFSET 4 //----------------------------------------------------------------------------// extern int tmreq_reply[3]; //----------------------------------------------------------------------------// #if OBSCODE == HIFI_CODE #define ICU_PRIME 16 #define ICU_REDUNDANT 19 #include "configura.h" #include "pubfuncs.h" extern unsigned int ICU_Prime_Redundant; extern STACK_CHAN * K_ArgsP; // for time signalling #elif OBSCODE == SPIRE_CODE #define __EXTERNAL_VARS_DECLARATION__ #include "all_include.h" extern STACK_CHAN * K_ArgsP; // for time signalling #define DPU_PRIME 21 #define DPU_REDUNDANT 22 extern int force_wrong_crc; extern unsigned int OBS_Vers; extern unsigned int Dpu_Prime_Redundant; extern int TC_pkt_ctr_prev; // Packet received from 1553 extern int TC_pkt_ctr; // Packet received from 1553 extern volatile int TC_READY_sema_delay_buffers; #elif OBSCODE == PACS_CODE extern unsigned int Dpu_time []; #endif //----------------------------------------------------------------------------// //-- Public Functions //-- isr1553.c extern int isr1553 ( int status ); extern void readCmndDPRAM ( void ); //-- irq2.s extern void irq2( void ); //-- init1553.c extern void main_1553_init ( void ); extern void main_1553_exit ( void ); //-- util1553.c extern void UpLoad_Packet ( int * cBuffer ); extern void DownLoad_Packet( TC_packet *); extern unsigned int andmask (unsigned int * , unsigned int , unsigned int ); extern inline void align_ptr_counter ( void ); extern inline void force_1553_reset ( void ); extern void miaMilSaWrite (MilConf_p pw_MilConf, MemBlockHandle pw_BlockHdl, unsigned int *j_Offset, unsigned int *pj_Ptr, unsigned int j_Length); //----------------------------------------------------------------------------// #endif//__INIT_1553_H__ /** * Commitments History : * $Log: init1553.h,v $ * Revision 1.14 2009/01/15 13:56:54 lorenzo * interrupt counters handling revised * * Revision 1.13 2009/01/15 12:17:09 annadg * interrupt counter added in isr2, counter flag check added in res_check * * Revision 1.12 2008/12/10 10:57:55 lorenzo * - Restoring 1553 of obs5.8.1 * - Removing rc_check_subframe_counter and other OBS handling of the subframe counter. * * Revision 1.10 2006/10/20 09:22:14 lorenzo * 1553 library updated * * Revision 1.6 2006/10/16 14:19:53 scige * Some More Comments * * Revision 1.6 2006/02/15 14:34:03 scige * Some more comments restored * * Revision 1.5 2005/09/16 13:09:40 scige * *** empty log message *** * * Revision 1.3 2005/08/26 12:49:35 scige * ok S_P_H * * Revision 1.2 2005/08/26 12:16:19 scige * storage * * Revision 1.1 2005/08/10 12:53:39 scige * Communication Library: 1553 * com1553 * Base Common Version of Spire/Pacs OBS * * */