Index: firmware/App/Services/SystemComm.c =================================================================== diff -u -r3417fd56afc9b21fb4c2d86c75dd33ac31fbd9f1 -r070554b23739bf16ea2bf9528ebabda1ce0ffeb3 --- firmware/App/Services/SystemComm.c (.../SystemComm.c) (revision 3417fd56afc9b21fb4c2d86c75dd33ac31fbd9f1) +++ firmware/App/Services/SystemComm.c (.../SystemComm.c) (revision 070554b23739bf16ea2bf9528ebabda1ce0ffeb3) @@ -71,6 +71,10 @@ static g_dmaCTRL pcDMAXmitControlRecord; static g_dmaCTRL pcDMARecvControlRecord; +static BOOL dgIsCommunicating = FALSE; +static BOOL uiIsCommunicating = FALSE; +static BOOL uiDidCommunicate = FALSE; + // ********** private function prototypes ********** static void initUARTAndDMA( void ); @@ -103,6 +107,89 @@ } /************************************************************************* + * @brief checkInFromDG + * The checkInFromDG function checks in the DG with the HD - indicating that \n + * the DG is communicating. + * @details + * Inputs : none + * Outputs : dgIsCommunicating + * @param none + * @return none + *************************************************************************/ +void checkInFromDG( void ) +{ + dgIsCommunicating = TRUE; +} + +/************************************************************************* + * @brief checkInFromUI + * The checkInFromUI function checks in the UI with the HD - indicating that \n + * the UI is communicating. + * @details + * Inputs : none + * Outputs : uiIsCommunicating + * @param none + * @return none + *************************************************************************/ +void checkInFromUI( void ) +{ + uiIsCommunicating = TRUE; + uiDidCommunicate = TRUE; +} + +/************************************************************************* + * @brief isDGCommunicating + * The isDGCommunicating function determines whether the DG is communicating \n + * with the HD. + * @details + * Inputs : dgIsCommunicating + * Outputs : none + * @param none + * @return TRUE if DG has checked in since last call, FALSE if not + *************************************************************************/ +BOOL isDGCommunicating( void ) +{ + BOOL result = dgIsCommunicating; + + dgIsCommunicating = FALSE; + + return result; +} + +/************************************************************************* + * @brief isUICommunicating + * The isUICommunicating function determines whether the UI is communicating \n + * with the HD. + * @details + * Inputs : uiIsCommunicating + * Outputs : none + * @param none + * @return TRUE if UI has checked in since last call, FALSE if not + *************************************************************************/ +BOOL isUICommunicating( void ) +{ + BOOL result = uiIsCommunicating; + + uiIsCommunicating = FALSE; + + return result; +} + +/************************************************************************* + * @brief uiCommunicated + * The uiCommunicated function determines whether the UI has communicated. + * @details + * Inputs : uiDidCommunicate + * Outputs : none + * @param none + * @return TRUE if UI has communicated since power up, FALSE if not + *************************************************************************/ +BOOL uiCommunicated( void ) +{ + return uiDidCommunicate; +} + +/************************************************************************* * @brief execSystemCommRx * The execSystemCommRx function manages received data from other sub-systems. * @details @@ -635,8 +722,16 @@ #endif break; + case MSG_ID_DG_CHECK_IN: + handleDGCheckIn( message ); + break; + case MSG_ID_UI_CHECK_IN: + handleUICheckIn( message ); + break; + + case MSG_ID_TESTER_LOGIN_REQUEST: handleTesterLogInRequest( message ); break;