Index: TestSupport.c =================================================================== diff -u -rb16fb44ffe64e6ceb3e182d11485c3bb75dbad8f -r98fa971c534d21b71371cb72a7c0839fe79045e6 --- TestSupport.c (.../TestSupport.c) (revision b16fb44ffe64e6ceb3e182d11485c3bb75dbad8f) +++ TestSupport.c (.../TestSupport.c) (revision 98fa971c534d21b71371cb72a7c0839fe79045e6) @@ -287,8 +287,6 @@ * @param message Override message from Dialin which includes the F32 override * value. * @param override Pointer to the override record to set - * @param min Minimum value that should be allowed - * @param max Maximum value that should be allowed * @return TRUE if override is successful, FALSE if not *************************************************************************/ BOOL f32Override( MESSAGE_T *message, OVERRIDE_F32_T *override ) @@ -320,6 +318,43 @@ /*********************************************************************//** * @brief + * The s32Override function sets the override for a given S32 override record. + * @details \b Inputs: none + * @details \b Outputs: none + * @param message Override message from Dialin which includes the S32 override + * value. + * @param override Pointer to the override record to set + * @return TRUE if override is successful, FALSE if not + *************************************************************************/ +BOOL s32Override( MESSAGE_T *message, OVERRIDE_S32_T *override ) +{ + BOOL result = FALSE; + TEST_OVERRIDE_PAYLOAD_T payload; + OVERRIDE_TYPE_T ovType = getOverridePayloadFromMessage( message, &payload ); + + // Verify tester has logged in with f/w and override type is valid + if ( ( TRUE == isTestingActivated() ) && ( ovType != OVERRIDE_INVALID ) && ( ovType < NUM_OF_OVERRIDE_TYPES ) ) + { + result = TRUE; + if ( OVERRIDE_OVERRIDE == ovType ) + { + S32 value = payload.state.s32; + + override->ovData = value; + override->override = OVERRIDE_KEY; + } + else + { + override->override = OVERRIDE_RESET; + override->ovData = override->ovInitData; + } + } + + return result; +} + +/*********************************************************************//** + * @brief * The u32ArrayOverride function sets the override for a given array of U32 * override records. * @details \b Inputs: none @@ -371,16 +406,14 @@ /*********************************************************************//** * @brief - * The u32ArrayOverride function sets the override for a given array of U32 + * The f32ArrayOverride function sets the override for a given array of F32 * override records. * @details \b Inputs: none * @details \b Outputs: none - * @param message Override message from Dialin which includes the U32 override + * @param message Override message from Dialin which includes the F32 override * value and the array index. * @param override Pointer to the array of override records * @param maxIndex Maximum array index to allow - * @param min Minimum value that should be allowed - * @param max Maximum value that should be allowed * @return TRUE if override is successful, FALSE if not *************************************************************************/ BOOL f32ArrayOverride( MESSAGE_T *message, OVERRIDE_F32_T *override, U32 maxIndex ) @@ -416,6 +449,51 @@ return result; } +/*********************************************************************//** + * @brief + * The s32ArrayOverride function sets the override for a given array of S32 + * override records. + * @details \b Inputs: none + * @details \b Outputs: none + * @param message Override message from Dialin which includes the S32 override + * value and the array index. + * @param override Pointer to the array of override records + * @param maxIndex Maximum array index to allow + * @return TRUE if override is successful, FALSE if not + *************************************************************************/ +BOOL s32ArrayOverride( MESSAGE_T *message, OVERRIDE_S32_T *override, U32 maxIndex ) +{ + BOOL result = FALSE; + TEST_OVERRIDE_ARRAY_PAYLOAD_T payload; + OVERRIDE_TYPE_T ovType = getOverrideArrayPayloadFromMessage( message, &payload ); + + // Verify tester has logged in with f/w and override type is valid + if ( ( TRUE == isTestingActivated() ) && ( ovType != OVERRIDE_INVALID ) && ( ovType < NUM_OF_OVERRIDE_TYPES ) ) + { + U32 index = payload.index; + + // Verify voltage index of override + if ( index <= maxIndex ) + { + result = TRUE; + if ( OVERRIDE_OVERRIDE == ovType ) + { + S32 value = payload.state.s32; + + override[ index ].ovData = value; + override[ index ].override = OVERRIDE_KEY; + } + else + { + override[ index ].override = OVERRIDE_RESET; + override[ index ].ovData = override[ index ].ovInitData; + } + } + } + + return result; +} + // ********** Release software configurations functions ********** /*********************************************************************//**