Index: TestSupport.c =================================================================== diff -u -r9f8f3bc0cab51c1d6934de69cc4d1f974d3a1a53 -r21f8f1d1ab4bfd0592c8744528a65f98d6b8a4c4 --- TestSupport.c (.../TestSupport.c) (revision 9f8f3bc0cab51c1d6934de69cc4d1f974d3a1a53) +++ TestSupport.c (.../TestSupport.c) (revision 21f8f1d1ab4bfd0592c8744528a65f98d6b8a4c4) @@ -24,11 +24,11 @@ */ // ********** 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. +#define TEST_CONFIG_ENABLE_KEY 0xDABA36B2 ///< Release software configuration enable kye. +#define TEST_CONFIG_DISABLE_KEY 0x00000000 ///< Release software configuration disable key. // ********** private data ********** -static U32 releaseSoftwareConfig[ NUM_OF_RELEASE_SW_CONFIGS ]; ///< Release software configuration. +static U32 testConfig[ NUM_OF_TEST_CONFIGS ]; ///< Release software configuration. // ********** private function prototypes ********** @@ -144,33 +144,32 @@ /*********************************************************************//** * @brief - * The initReleaseSoftwareConfigs function initializes the release software - * configurations. + * The initTestConfigs function initializes the test software configurations. * @details Inputs: none - * @details Outputs: releaseSoftwareConfig + * @details Outputs: testConfig * @return none *************************************************************************/ -void initReleaseSoftwareConfigs( void ) +void initTestConfigs( void ) { - memset( &releaseSoftwareConfig, RELEASE_SOFTWARE_CONFIG_DISABLE_KEY, sizeof( RELEASE_SOFTWARE_CONFIG_T ) ); + memset( &testConfig, TEST_CONFIG_DISABLE_KEY, sizeof( TEST_CONFIG_T ) ); } /*********************************************************************//** * @brief - * The setReleaseSoftwareConfig function sets the release software configuration. + * The setTestConfig function sets the test configuration. * @details Inputs: none - * @details Outputs: releaseSoftwareConfig + * @details Outputs: testConfig * @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 setTestConfig( TEST_CONFIG_T config ) { BOOL status = FALSE; - if ( config < NUM_OF_RELEASE_SW_CONFIGS ) + if ( config < NUM_OF_TEST_CONFIGS ) { - releaseSoftwareConfig[ config ] = RELEASE_SOFTWARE_CONFIG_ENABLE_KEY; - status = TRUE; + testConfig[ config ] = TEST_CONFIG_ENABLE_KEY; + status = TRUE; } else { @@ -182,18 +181,43 @@ /*********************************************************************//** * @brief - * The getReleaseSoftwareConfigStatus function gets the status of the - * provided release software configuration + * The resetTestConfig function resets the test configuration. * @details Inputs: none - * @details Outputs: releaseSoftwareConfig - * @param config the release software configuration + * @details Outputs: testConfig + * @param config which is the configuration to reset + * @return TRUE if the reset configuration was successful otherwise, FALSE + *************************************************************************/ +BOOL resetTestConfig( TEST_CONFIG_T config ) +{ + BOOL status = FALSE; + + if ( config < NUM_OF_TEST_CONFIGS ) + { + testConfig[ config ] = TEST_CONFIG_DISABLE_KEY; + status = TRUE; + } + else + { + // TODO software fault because this is in release code? + } + + return status; +} + +/*********************************************************************//** + * @brief + * The getTestConfigStatus function gets the status of the provided test + * configuration. + * @details Inputs: none + * @details Outputs: testConfig + * @param config the test configuration * @return TRUE if the release software configuration is enabled otherwise, FALSE *************************************************************************/ -BOOL getReleaseSoftwareConfigStatus( RELEASE_SOFTWARE_CONFIG_T config ) +BOOL getTestConfigStatus( TEST_CONFIG_T config ) { BOOL status = FALSE; - if ( ( TRUE == isTestingActivated() ) && ( RELEASE_SOFTWARE_CONFIG_ENABLE_KEY == releaseSoftwareConfig[ config ] ) ) + if ( ( TRUE == isTestingActivated() ) && ( TEST_CONFIG_ENABLE_KEY == testConfig[ config ] ) ) { status = TRUE; }