/** * MIL-STD 1553B Library - Carlo Gavazzi Space * * Filename : \file MilConf.c * * Purposes : \brief MIL-STD 1553B Library - Carlo Gavazzi Space * * Logical Task : N/A * * Author : CGSpace * * Last Developer : $Author: lorenzo $ * * Revision : $Revision: 1.3 * * Checkout Tag : $Name: $ * * Last Modification : $Date: 2006/10/20 09:22:13 $ * * Location : $RCSfile: MilConf.c,v $ * * \version : $Header: /home/local/cvsrep/OBS_FM/1553_Lib/MilConf.c,v 1.11 2006/10/20 09:22:13 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. */ // ---------------------------------------------------------------------------// /* * MilConf.c - All global variables and pointers to global data are stored in the * MilConf structure. Using MilOpen this structure becomes the active "context". * MilClose will close the active context. */ /* Purpose: The module contains the Open Close and service routines for managing the ACE chip in RT mode. Content: The module contains the following functions: Interface routines that involve memory reading/writing, and register reading/writing. This software level is necessary for porting the library among various hardware platforms. SUBHEADINGS Project : HSO/FIRST BASIC S/W Component : HSO/FIRST DRIVERS S/W Filename : $RCSfile: MilConf.c,v $ CI Number : Revision : Revision: 1.3 Company : Carlo Gavazzi Space S.P.A. Author : Andrea Bertoli Creation Date : 2000/05/15 SEE ALSO: ADD Ref: Other Ref: Notes: */ // ---------------------------------------------------------------------------// #include #include "MilDef.h" extern unsigned int IFSI_MOD(unsigned int, unsigned int); // ---------------------------------------------------------------------------// /*----- global variable ---------*/ /* array of sa lenght for memorizing the pointer to the pointer message */ RxMsgPointerStructType gbv_RxMessages[MIL_SA_MESSAGE]; RxMsgPointerStructType gbv_TxMessages[MIL_SA_MESSAGE]; /* pointer to the message pointer */ RxMsgPointerStructType *gpw_RxMsgPointer; /* pointer to msg structure */ RxMsgPointerType *gpw_RxMsg; /* message block structure */ MsgBlockStructType sw_MsgBlock; #ifndef _VIRTUOSO_ unsigned char gd_SemaModeCode; /* mode code interrupt notificaion */ #endif // ---------------------------------------------------------------------------// /*---- static variable ------*/ /* variable MIL 1553 */ unsigned int UserVar; /* variable to avoid the starting from address 0 */ /* variable for memorizing the milbus configuration */ static MilConf_t sw_MilConf; // ---------------------------------------------------------------------------// /*------------- static function -----------------*/ void MilInitStructMsg( MilConf_p pw_MilConf, RxMsgPointerStructType *bw_Vector ); void MilRTInterrptHandler( int i_MilError ); /* function prototype */ /******************************************************************** * * MilOpen - Called once per instance of an ACE * * Description * Called once per instance of an ACE. This sets up all global * structures used by the software library and presets the part * to the library default states. The designated configuration * structure is set active. * * ARGUMENTS * Input Parameters * - pw_MilConf Mil1553 management structure * - pw_Sacw Subaddress control word * * Output Parameters * N/A * * Global Variables * sw_MilConf static variable to memorize the 1553 conf * * RETURNS: error condition * * SEE ALSO: * * * INTERNAL * This section will not appear in the generated manual entry. * */ MilConf_p MilOpen(void) { if (sw_MilConf.d_AlreadyInit == MIL_OPENED) return (MilConf_p)NULL; sw_MilConf.d_AlreadyInit = MIL_OPENED; /* initialize Mil configuration structure and interrupt handlers pointer*/ sw_MilConf.d_MilIsrEnabled = TRUE; sw_MilConf.d_MilIrqInstalled = FALSE; /* pw_Conf->MilUsrHandler = NULL; */ sw_MilConf.j_IrqTestFlag = 0; /* initialize ptrs for memory mangager */ sw_MilConf.pw_AceMemory=NULL; sw_MilConf.pw_AceListEnd=NULL; sw_MilConf.pw_AceCurrent=NULL; /* initialize module */ sw_MilConf.pw_RT =NULL; /* set the Memory Base address and base register */ sw_MilConf.m_MilBaseMemAbs = BS_AD_MIL_1553_DPRAM; sw_MilConf.m_MilRegBaseAbs = BS_AD_MIL_1553_REG; sw_MilConf.d_MilRegType=MIL_MEMMAP; /* set interrupt request PULSE */ sw_MilConf.d_MilIrqType=MIL_PULSE; sw_MilConf.pm_MilBaseMem=(unsigned long *)(sw_MilConf.m_MilBaseMemAbs); sw_MilConf.pm_MilBaseReg=(unsigned long *)(sw_MilConf.m_MilBaseMemAbs + OFFSET_REG); sw_MilConf.j_MilMemoryLength = MIL_1553_RAM_SIZE; /* assign the inturrupt routine */ sw_MilConf.MilUsrHandler = MilRTInterrptHandler; /* start memory block list */ MilInitBlockList(&sw_MilConf); /* preset ACE to default library state */ MilPreset(&sw_MilConf); #ifndef VIRTUOSO /* install the interrupt service routine */ interrupt(SIG_IRQ2,sw_MilConf.MilUsrHandler); /* disable interrupt routine */ /* interrupt(SIG_IRQ2,SIG_IGN); */ #endif /* initilalize the subaddress structures */ MilInitStructMsg(&sw_MilConf, &gbv_RxMessages[0]); MilInitStructMsg(&sw_MilConf, &gbv_TxMessages[0]); /* return the pointer to the structure */ return(&sw_MilConf); } /******************************************************************** * * MilInitStructMsg - array of pointer initialization * * Description * Initialize an array of pointers * * ARGUMENTS * Input Parameters * - pw_MilConf Mil1553 management structure * - bv_Vector array to be initialized * * Output Parameters * N/A * * Global Variables * N/A * * RETURNS: N/A * * SEE ALSO: * * * INTERNAL * This section will not appear in the generated manual entry. * */ void MilInitStructMsg( MilConf_p pw_MilConf, RxMsgPointerStructType *bw_Vector ) { /* var local */ unsigned int j_Index; /* clear the array of pointers */ for (j_Index = 0; j_Index < MIL_SA_MESSAGE; j_Index++) { bw_Vector->d_Size = 0; bw_Vector->d_TypeOfMng = MIL_NOT_DEFINED; bw_Vector->pm_CurrWriteMsg = NULL; bw_Vector->pm_InitMsg = NULL; bw_Vector++; }/* end for */ }/* end procedure */ /******************************************************************** * * MilClose - Called at end of ACE use * * Description * Called at end of ACE use. This clears up all global * structures used by the software library and resets the part * this closes the active BuConf context * * ARGUMENTS * Input Parameters * - pw_MilConf Mil1553 management structure * * Output Parameters * N/A * * Global Variables * N/A * * RETURNS: error condition * * SEE ALSO: * * * INTERNAL * This section will not appear in the generated manual entry. * */ MilError_t MilClose(MilConf_p pw_MilConf) { /* we can't close a conf structure if it is not open */ if(!pw_MilConf) return(MIL_ERROR_NOTCONFIGURED); /* set to close the structure */ pw_MilConf->d_AlreadyInit = MIL_CLOSED; /* null handlers */ /*pw_MilConf->MilSysHandler = NULL; pw_MilConf->MilUsrHandler = NULL;*/ /* software reset of ACE */ MilReset(pw_MilConf); /* free memory block list */ MilCloseBlockList(pw_MilConf); #ifdef __MILACEIRQ /* restore old interrupt vector */ /*MilUninstallIsr(pw_MilConf);*/ #endif /* reset pointer */ pw_MilConf=NULL; return(MIL_SUCCESS); } /******************************************************************** * * MilWriteReg - Writes data to ram or IO * * Description * Writes data to ram or IO (based on the configuration) * at an offset (in words) from configured base address. * * ARGUMENTS * Input Parameters * - pw_MilConf Mil1553 management structure * - j_Offset = address in ram or IO + base addr to be written * - j_Data = data to be written at address * * Output Parameters * N/A * * Global Variables * N/A * * RETURNS: error condition * * SEE ALSO: * * * INTERNAL * This section will not appear in the generated manual entry. * */ MilError_t MilWriteReg(MilConf_p pw_MilConf, unsigned int j_Offset, unsigned int j_Data) { if(!pw_MilConf) return(MIL_ERROR_NOTCONFIGURED); /* write register */ *(pw_MilConf->pm_MilBaseReg+j_Offset)=j_Data; return(MIL_SUCCESS); } /******************************************************************** * * MilReadReg - Reads data from ram or IO * * Description * Reads data from ram or IO (based on the configuration) * at an offset (in words) from configured base address * * ARGUMENTS * Input Parameters * - pw_MilConf Mil1553 management structure * - j_Offset = address in ram or IO + base addr to be written * * Output Parameters * N/A * * Global Variables * N/A * * RETURNS: data read from register or 0 on error condition * * SEE ALSO: * * * INTERNAL * This section will not appear in the generated manual entry. * */ unsigned int MilReadReg(MilConf_p pw_MilConf, unsigned int j_Offset) { unsigned int j_RegValue=0; j_RegValue=*(pw_MilConf->pm_MilBaseReg + j_Offset); return(j_RegValue); } /******************************************************************** * * MilWriteRam - Writes data to memory at an offset * * Description * Writes data to memory at an offset (in words) * from a base address. * * ARGUMENTS * Input Parameters * - pw_MilConf Mil1553 management structure * - j_Offset = address in ram or IO + base addr to be written * - j_Data = data to be written at address * * Output Parameters * N/A * * Global Variables * N/A * * RETURNS: Error Condition * * SEE ALSO: * * * INTERNAL * This section will not appear in the generated manual entry. * */ MilError_t MilWriteRam(MilConf_p pw_MilConf, unsigned int j_Offset, unsigned int j_Data) { if(!pw_MilConf) return(MIL_ERROR_NOTCONFIGURED); if(j_Offset> pw_MilConf->j_MilMemoryLength) return(MIL_ERROR_RAMOUTOFRANGE); *(pw_MilConf->pm_MilBaseMem+j_Offset)=j_Data; return(MIL_SUCCESS); } /******************************************************************** * * MilReadRam - Reads data from ram at an offset * * Description * Reads data from ram at an offset (in words) * from configured base address * * ARGUMENTS * Input Parameters * - pw_MilConf Mil1553 management structure * - j_Offset = address in ram or IO + base addr to be written * * Output Parameters * N/A * * Global Variables * N/A * * RETURNS: data read from addr or 0 on error condition * * SEE ALSO: * * * INTERNAL * This section will not appear in the generated manual entry. * */ unsigned int MilReadRam(MilConf_p pw_MilConf, unsigned int j_Offset) { unsigned int j_RamValue=0; j_RamValue=*(pw_MilConf->pm_MilBaseMem+j_Offset); return(j_RamValue); } /******************************************************************** * * MilBlockRead - Copy's an area of ram to an array * * Description * Copy's an area of ram to an array * * ARGUMENTS * Input Parameters * - pw_MilConf Mil1553 management structure * - j_Addr = address in ram * - pj_Ptr = ptr to buffer to store data * - j_Length = number of addresses to be read * * Output Parameters * N/A * * Global Variables * N/A * * RETURNS: error condition * * SEE ALSO: * * * INTERNAL * This section will not appear in the generated manual entry. * */ MilError_t MilBlockRead(MilConf_p pw_MilConf, unsigned int j_Addr, unsigned int *pj_Ptr, unsigned int j_Length) { if(!pw_MilConf) return(MIL_ERROR_NOTCONFIGURED); if(((unsigned long)(j_Addr+j_Length))> pw_MilConf->j_MilMemoryLength) return(MIL_ERROR_RAMOUTOFRANGE); MilMemCpy( pw_MilConf, (unsigned long *)(pw_MilConf->pm_MilBaseMem+j_Addr), pj_Ptr, j_Length); return(MIL_SUCCESS); } /******************************************************************** * * MilBlockWrite - Copy's an array of data to an area of ram * * Description * Copy's an array of data to an area of ram * * ARGUMENTS * Input Parameters * - pw_MilConf Mil1553 management structure * - j_Offset = address in ram * - pj_Ptr = ptr to buffer to store data * - j_Length = number of addresses to be read * * Output Parameters * N/A * * Global Variables * N/A * * RETURNS: error condition * * SEE ALSO: * * * INTERNAL * This section will not appear in the generated manual entry. * */ MilError_t MilBlockWrite(MilConf_p pw_MilConf, unsigned int j_Offset, unsigned int *pj_Ptr, unsigned int j_Length) { if(!pw_MilConf) return(MIL_ERROR_NOTCONFIGURED); if(((unsigned long)(j_Offset+j_Length))>pw_MilConf->j_MilMemoryLength) return MIL_ERROR_RAMOUTOFRANGE; MilMemCpy( pw_MilConf, pj_Ptr, (unsigned long *)pw_MilConf->pm_MilBaseMem+j_Offset, j_Length); return(MIL_SUCCESS); } /******************************************************************** * * MilBlockWriteWithBound - Copy's an array of data to a message * area of ram * * Description * Copy's an array of data to a message area of ram; it checks * the boundary of the message and it wraps on the message area. * * ARGUMENTS * Input Parameters * - pw_MilConf Mil1553 management structure * - MemBlockHandle handle to the specific message * - *j_Offset return the current free address in ram * - pj_Ptr ptr to buffer to store data * - j_Length number of addresses to be read * * Output Parameters * N/A * * Global Variables * N/A * * RETURNS: error condition * * SEE ALSO: * * * INTERNAL * This section will not appear in the generated manual entry. * */ MilError_t MilBlockWriteWithBound(MilConf_p pw_MilConf, MemBlockHandle pw_Blk, unsigned int *j_Offset, unsigned int *pj_Ptr, unsigned int j_Length) { unsigned int j_Boundary, j_Count1; if(!pw_MilConf) return(MIL_ERROR_NOTCONFIGURED); j_Boundary = pw_Blk->m_AbsAddr + pw_Blk->j_Size - 1; /* check the boundary */ if ((*j_Offset + j_Length)>j_Boundary) { j_Count1= j_Boundary - (*j_Offset) + 1; MilBlockWrite(pw_MilConf, (*j_Offset), pj_Ptr, j_Count1); /* Lower Boundary of circular buffer */ MilBlockWrite(pw_MilConf,pw_Blk->m_AbsAddr, pj_Ptr + j_Count1, j_Length - j_Count1); *j_Offset= pw_Blk->m_AbsAddr + j_Length - j_Count1; } else { /* Single Message Mode or No Buffer Rollover */ MilBlockWrite(pw_MilConf, *j_Offset, pj_Ptr, j_Length); *j_Offset += j_Length; } return(MIL_SUCCESS); } /******************************************************************** * * MilBlockFill - Fills an area of ram with data. * * Description * Fills an area of ram with data. * * ARGUMENTS * Input Parameters * - pw_MilConf Mil1553 management structure * - j_Offset = address in ram * - j_Data = data to be written at address * - j_Length = number of addresses to be read * * Output Parameters * N/A * * Global Variables * N/A * * RETURNS: error condition * * SEE ALSO: * * * INTERNAL * This section will not appear in the generated manual entry. * */ MilError_t MilBlockFill(MilConf_p pw_MilConf, unsigned int j_Offset, unsigned int j_Data, unsigned int j_Length) { unsigned int j_Index; if(!pw_MilConf) return(MIL_ERROR_NOTCONFIGURED); if(((unsigned long)(j_Offset+j_Length))>pw_MilConf->j_MilMemoryLength) return(MIL_ERROR_RAMOUTOFRANGE); if(pw_MilConf==NULL) return(MIL_ERROR_NOTCONFIGURED); for(j_Index=0;j_Index> 4) & 0x0001; if (d_AutoClearFlag == 0) /* reset the IrqStatus */ MilIrqReset(&sw_MilConf); /* check the enhanced setting read enhanced interrupt flag */ d_EnhModeFlag = (j_ConfigReg3 >> 15) & 0x0001; d_EnhModeCodeFlag = j_ConfigReg3 & 0x0001; d_EnhMemoryMngFlag = (j_ConfigReg2 >> 1) & 0x0001; d_EnhInterrupt = (j_ConfigReg2 >> 15) & 0x0001; /* extract the stack size */ sw_MsgBlock.j_MilStackSize = 0x100 << (j_ConfigReg3 >> 13 & 0x0003); /* interrupt enable */ /* j_IrqRaise = j_IrqStatus & j_IrqMask; */ /* j_IrqRaise = 0x0001; */ /* Int handler the stack rollover */ if ((j_IrqRaise >> 12) & 0x0001) { if (d_EnhModeFlag && d_EnhInterrupt) { /* manages the stack rollover */ } else /* report error */ i_MilError = MIL_ERR_INT_STACK_ROLL_OVER; } /* int handler Circular buffer rollover */ if ((j_IrqRaise & 0x0020) && (d_EnhMemoryMngFlag == 1)) { /* manages circular buffer */ i_MilError = MilRTReadStack(&sw_MilConf, d_EnhModeCodeFlag, d_EnhModeFlag); return; } /* int handler subaddress control word EOM */ if ((j_IrqRaise & 0x0010) && (d_EnhMemoryMngFlag == 1)) { /* manage the message in the stack memory */ i_MilError = MilRTReadStack(&sw_MilConf, d_EnhModeCodeFlag, d_EnhModeFlag); return; } /* int handler RT selected mode code int */ if ((j_IrqRaise & 0x0002) && (d_EnhModeFlag == 1) && (d_EnhModeCodeFlag == 1)) { /* manage circular buffer */ /* read the memory stack */ #ifndef _VIRTUOSO_ gd_SemaModeCode = 1; #endif i_MilError = MilRTReadStack(&sw_MilConf, d_EnhModeCodeFlag, d_EnhModeFlag); return; } /* int handler format handler */ if (j_IrqRaise & 0x0004) { /* manage format error */ i_MilError = MIL_ERR_INT_FORMAT_ERROR; return; } /* int handler End of message */ if (j_IrqRaise & 0x0001) { /* manage End of message */ i_MilError = MilRTReadStack(&sw_MilConf, d_EnhModeCodeFlag, d_EnhModeFlag); return; } return; }/* end procedure */ /******************************************************************** * * MilRTReadStack - read stack messages from last message until the * last message * * Description * This function reads the message in the stack memory and * it updates the messages pointers. * * ARGUMENTS * Input Parameters * - pw_MilConf Mil1553 management structure * - d_EnhModeCodeFlag Enhanced mode code flag * - d_EnhModeFlag Enhanced mode flag * * Output Parameters * N/A * * Global Variables * N/A * * RETURNS: Error Condition * * SEE ALSO: * * * INTERNAL * * */ MilError_t MilRTReadStack( MilConf_p pw_MilConf, unsigned char d_EnhModeCodeFlag, unsigned char d_EnhModeFlag ) { /* local var */ unsigned int j_StackPtr, j_MsgCurr; unsigned int j_Index; /* read last message */ j_StackPtr=(unsigned int)MilReadRam(pw_MilConf, STACK_POINTER_A); j_Index=0; while (j_Index < (sw_MsgBlock.j_MilStackSize)) { /* save the current message */ j_MsgCurr=pw_MilConf->pw_RT->MilRTLastMsg; /* checks if the current message is equal to the stack pointer and it is the last message */ //if((j_MsgCurr==j_StackPtr)||((j_StackPtr==((j_MsgCurr+4)%sw_MsgBlock.j_MilStackSize))&& // (MilReadRam(pw_MilConf,j_MsgCurr)&0x4000))) if((j_MsgCurr==j_StackPtr)||((j_StackPtr==IFSI_MOD(j_MsgCurr+4, sw_MsgBlock.j_MilStackSize))&& (MilReadRam(pw_MilConf,j_MsgCurr)&0x4000))) /* out from while cycle */ return MIL_SUCCESS; /* increment the global message pointer and reads in the correct words for the message type */ //pw_MilConf->pw_RT->MilRTLastMsg = (j_MsgCurr+4) % sw_MsgBlock.j_MilStackSize; pw_MilConf->pw_RT->MilRTLastMsg = IFSI_MOD(j_MsgCurr+4, sw_MsgBlock.j_MilStackSize); /* 4 unit increment */ j_Index+=4; /* read the message */ sw_MsgBlock.j_BlockStatus = MilReadRam(pw_MilConf, j_MsgCurr); sw_MsgBlock.j_TimeTag = MilReadRam(pw_MilConf, j_MsgCurr+1); sw_MsgBlock.j_DataPtr = MilReadRam(pw_MilConf, j_MsgCurr+2); sw_MsgBlock.u_Cw.j_Word = MilReadRam(pw_MilConf, j_MsgCurr+3); /*check if the message is a mode code */ if((sw_MsgBlock.u_Cw.w_Cmd.b_SubAddr == 0)|| (sw_MsgBlock.u_Cw.w_Cmd.b_SubAddr == 31)) { /*check if it is a enhanced mode code */ if(d_EnhModeCodeFlag && d_EnhModeFlag) /* the mode code is memorized in the Data pointer */ gbv_RxMessages[0].pm_CurrWriteMsg->pm_Msg=sw_MsgBlock.j_DataPtr; else /* look up table pointer */ gbv_RxMessages[0].pm_CurrWriteMsg->pm_Msg= MilReadRam(pw_MilConf, sw_MsgBlock.j_DataPtr); } else { /* not mode code */ /* is it a trasmitt message */ /* if the message is received */ if (sw_MsgBlock.u_Cw.w_Cmd.b_TR) { if (sw_MsgBlock.j_BlockStatus & 0x8000) gbv_TxMessages[sw_MsgBlock.u_Cw.w_Cmd.b_SubAddr].pm_CurrWriteMsg->d_MsgStatus = MIL_MSG_READY; else gbv_TxMessages[sw_MsgBlock.u_Cw.w_Cmd.b_SubAddr].pm_CurrWriteMsg->d_MsgStatus = MIL_MSG_FAILED; /* save the message pointer*/ gbv_TxMessages[sw_MsgBlock.u_Cw.w_Cmd.b_SubAddr].pm_CurrWriteMsg->pm_Msg = sw_MsgBlock.j_DataPtr; /* save the word count */ if (sw_MsgBlock.u_Cw.w_Cmd.b_WordCount == 0) gbv_TxMessages[sw_MsgBlock.u_Cw.w_Cmd.b_SubAddr].pm_CurrWriteMsg->j_Words = 32; else gbv_TxMessages[sw_MsgBlock.u_Cw.w_Cmd.b_SubAddr].pm_CurrWriteMsg->j_Words = sw_MsgBlock.u_Cw.w_Cmd.b_WordCount; /* increments pointer */ gbv_TxMessages[sw_MsgBlock.u_Cw.w_Cmd.b_SubAddr].pm_CurrWriteMsg++; if (gbv_TxMessages[sw_MsgBlock.u_Cw.w_Cmd.b_SubAddr].pm_CurrWriteMsg >= gbv_TxMessages[sw_MsgBlock.u_Cw.w_Cmd.b_SubAddr].pm_InitMsg + gbv_TxMessages[sw_MsgBlock.u_Cw.w_Cmd.b_SubAddr].d_Size) /* initialize the pointer */ gbv_TxMessages[sw_MsgBlock.u_Cw.w_Cmd.b_SubAddr].pm_CurrWriteMsg = gbv_TxMessages[sw_MsgBlock.u_Cw.w_Cmd.b_SubAddr].pm_InitMsg; } else { /* Rx messages */ if (sw_MsgBlock.j_BlockStatus & 0x8000) gbv_RxMessages[sw_MsgBlock.u_Cw.w_Cmd.b_SubAddr].pm_CurrWriteMsg->d_MsgStatus = MIL_MSG_READY; else gbv_RxMessages[sw_MsgBlock.u_Cw.w_Cmd.b_SubAddr].pm_CurrWriteMsg->d_MsgStatus = MIL_MSG_FAILED; /* save the message pointer*/ gbv_RxMessages[sw_MsgBlock.u_Cw.w_Cmd.b_SubAddr].pm_CurrWriteMsg->pm_Msg = sw_MsgBlock.j_DataPtr; /* save the word count */ if (sw_MsgBlock.u_Cw.w_Cmd.b_WordCount == 0) gbv_RxMessages[sw_MsgBlock.u_Cw.w_Cmd.b_SubAddr].pm_CurrWriteMsg->j_Words = 32; else gbv_RxMessages[sw_MsgBlock.u_Cw.w_Cmd.b_SubAddr].pm_CurrWriteMsg->j_Words = sw_MsgBlock.u_Cw.w_Cmd.b_WordCount; /* increments pointer */ gbv_RxMessages[sw_MsgBlock.u_Cw.w_Cmd.b_SubAddr].pm_CurrWriteMsg++; if (gbv_RxMessages[sw_MsgBlock.u_Cw.w_Cmd.b_SubAddr].pm_CurrWriteMsg >= gbv_RxMessages[sw_MsgBlock.u_Cw.w_Cmd.b_SubAddr].pm_InitMsg + gbv_RxMessages[sw_MsgBlock.u_Cw.w_Cmd.b_SubAddr].d_Size) /* initialize the pointer */ gbv_RxMessages[sw_MsgBlock.u_Cw.w_Cmd.b_SubAddr].pm_CurrWriteMsg = gbv_RxMessages[sw_MsgBlock.u_Cw.w_Cmd.b_SubAddr].pm_InitMsg; } } }/* end while */ return(MIL_ERROR_STACK_NOT_READ); }/* end fnction */ // ---------------------------------------------------------------------------// // ---------------------------------------------------------------------------// /* * modification history * -------------------- * $Log: MilConf.c,v $ * Revision 1.11 2006/10/20 09:22:13 lorenzo * 1553 library updated * * Revision 1.8 2006/06/07 11:44:55 scige * Some More Comment * by Scige John Liu IFSI * * Revision 1.7 2006/03/21 15:41:08 daniele * Daniele Schito: Fixed some includes order * * Revision 1.6 2006/02/17 16:21:10 lorenzo * Some bugs in the HIFI part were fixed * * Revision 1.4.2.1 2006/02/17 15:53:30 lorenzo * 1553_consolidated library updated * * Revision 1.5 2006/02/15 14:56:56 scige * Abstract comment reformatted * History log replaced or moved at end of file * * */