Index: TestSupport.c =================================================================== diff -u -r493fcdf60c9fafd8405944afc73a105c8c1ee0fa -r9f8f3bc0cab51c1d6934de69cc4d1f974d3a1a53 --- TestSupport.c (.../TestSupport.c) (revision 493fcdf60c9fafd8405944afc73a105c8c1ee0fa) +++ TestSupport.c (.../TestSupport.c) (revision 9f8f3bc0cab51c1d6934de69cc4d1f974d3a1a53) @@ -16,18 +16,20 @@ ***************************************************************************/ #include "Common.h" +#include "SystemCommMessages.h" /** * @addtogroup TestSupport * @{ */ // ********** private definitions ********** +#define RELEASE_SOFTWARE_CONFIG_ENABLE_KEY 0xDABA36B2 ///< Release software configuration enable kye. +#define RELEASE_SOFTWARE_CONFIG_DISABLE_KEY 0x00000000 ///< Release software configuration disable key. - // ********** private data ********** +static U32 releaseSoftwareConfig[ NUM_OF_RELEASE_SW_CONFIGS ]; ///< Release software configuration. - // ********** private function prototypes ********** @@ -138,15 +140,65 @@ return result; } -void setReleaseSoftwareConfig( RELEASE_SOFTWARE_CONFIG_T config ) +// ********** Release software configurations functions ********** + +/*********************************************************************//** + * @brief + * The initReleaseSoftwareConfigs function initializes the release software + * configurations. + * @details Inputs: none + * @details Outputs: releaseSoftwareConfig + * @return none + *************************************************************************/ +void initReleaseSoftwareConfigs( void ) { + memset( &releaseSoftwareConfig, RELEASE_SOFTWARE_CONFIG_DISABLE_KEY, sizeof( RELEASE_SOFTWARE_CONFIG_T ) ); +} +/*********************************************************************//** + * @brief + * The setReleaseSoftwareConfig function sets the release software configuration. + * @details Inputs: none + * @details Outputs: releaseSoftwareConfig + * @param config which is the configuration to set + * @return TRUE if the set configuration was successful otherwise, FALSE + *************************************************************************/ +BOOL setReleaseSoftwareConfig( RELEASE_SOFTWARE_CONFIG_T config ) +{ + BOOL status = FALSE; + + if ( config < NUM_OF_RELEASE_SW_CONFIGS ) + { + releaseSoftwareConfig[ config ] = RELEASE_SOFTWARE_CONFIG_ENABLE_KEY; + status = TRUE; + } + else + { + // TODO software fault because this is in release code? + } + + return status; } +/*********************************************************************//** + * @brief + * The getReleaseSoftwareConfigStatus function gets the status of the + * provided release software configuration + * @details Inputs: none + * @details Outputs: releaseSoftwareConfig + * @param config the release software configuration + * @return TRUE if the release software configuration is enabled otherwise, FALSE + *************************************************************************/ BOOL getReleaseSoftwareConfigStatus( RELEASE_SOFTWARE_CONFIG_T config ) { - return 0; -} + BOOL status = FALSE; + if ( ( TRUE == isTestingActivated() ) && ( RELEASE_SOFTWARE_CONFIG_ENABLE_KEY == releaseSoftwareConfig[ config ] ) ) + { + status = TRUE; + } + return status; +} + /**@}*/