Index: TestSupport.h =================================================================== diff -u -re8828d66e4a76e0590c3f06b7f6235f33df64e80 -r47f8ae76f4eed444ce98feec1635e62394afccf5 --- TestSupport.h (.../TestSupport.h) (revision e8828d66e4a76e0590c3f06b7f6235f33df64e80) +++ TestSupport.h (.../TestSupport.h) (revision 47f8ae76f4eed444ce98feec1635e62394afccf5) @@ -18,56 +18,68 @@ #ifndef __TEST_SUPPORT_H__ #define __TEST_SUPPORT_H__ +/** + * @defgroup TestSupport TestSupport + * @brief Test support header file. Contains the structures and macros for override operations. + * + * @addtogroup TestSupport + * @{ + */ + // ***************************** OVERRIDE DEFINITIONS & MACROS ************************************* -#define OVERRIDE_KEY 0xCCC33C33 -#define OVERRIDE_RESET 0x00000000 +#define OVERRIDE_KEY 0xCCC33C33 ///< Override key +#define OVERRIDE_RESET 0x00000000 ///< Override reset #pragma pack(push,1) - +/// Test override payload type union. typedef union { - U32 u32; - F32 f32; + U32 u32; ///< U32 + F32 f32; ///< F32 } TEST_OVERRIDE_PAYLOAD_TYPE_T; +/// Test override payload type structure. typedef struct { - BOOL reset; - TEST_OVERRIDE_PAYLOAD_TYPE_T state; + BOOL reset; ///< Reset (bool) + TEST_OVERRIDE_PAYLOAD_TYPE_T state; ///< Test override payload } TEST_OVERRIDE_PAYLOAD_T; +/// Test override array payload structure. typedef struct { - BOOL reset; - TEST_OVERRIDE_PAYLOAD_TYPE_T state; - U32 index; + BOOL reset; ///< Reset (bool) + TEST_OVERRIDE_PAYLOAD_TYPE_T state; ///< Test override array payload + U32 index; ///< Index } TEST_OVERRIDE_ARRAY_PAYLOAD_T; - #pragma pack(pop) +/// Override U32 structure. typedef struct \ { \ - U32 data; \ - U32 ovInitData; \ - U32 ovData; \ - U32 override; \ + U32 data; \ ///< Data + U32 ovInitData; \ ///< Override init data + U32 ovData; \ ///< Override data + U32 override; \ ///< Override } OVERRIDE_U32_T; +/// Override S32 structure. typedef struct \ { \ - S32 data; \ - S32 ovInitData; \ - S32 ovData; \ - U32 override; \ + S32 data; \ ///< Data + S32 ovInitData; \ ///< Override init data + S32 ovData; \ ///< Override data + U32 override; \ ///< Override } OVERRIDE_S32_T; +/// Override F32 structure. typedef struct \ { \ - F32 data; \ - F32 ovInitData; \ - F32 ovData; \ - U32 override; \ + F32 data; \ ///< Data + F32 ovInitData; \ ///< Override init data + F32 ovData; \ ///< Overrode data + U32 override; \ ///< Override } OVERRIDE_F32_T; // DATA_DECL - declares an overrideable data variable @@ -354,4 +366,6 @@ sendTestAckResponseMsg( (MSG_ID_T)message->hdr.msgID, result ); \ } +/**@}*/ + #endif Index: Timers.c =================================================================== diff -u -r13c32729e3186ebb5487e41a0cecd4cf15d357eb -r47f8ae76f4eed444ce98feec1635e62394afccf5 --- Timers.c (.../Timers.c) (revision 13c32729e3186ebb5487e41a0cecd4cf15d357eb) +++ Timers.c (.../Timers.c) (revision 47f8ae76f4eed444ce98feec1635e62394afccf5) @@ -32,8 +32,8 @@ * @brief * The initTimers function initializes the Timers module. * @details - * Inputs : none - * Outputs : Timers module initialized. + * Inputs: msTimerCount + * Outputs: msTimerCount * @return none *************************************************************************/ void initTimers( void ) @@ -45,8 +45,8 @@ * @brief * The incMSTimerCount function increments the ms timer count. * @details - * Inputs : none - * Outputs : msTimerCount incremented + * Inputs: msTimerCount + * Outputs: msTimerCount * @return none *************************************************************************/ void incMSTimerCount( void ) @@ -58,9 +58,9 @@ * @brief * The getMSTimerCount function returns the current ms timer count. * @details - * Inputs : msTimerCount - * Outputs : none - * @return msTimerCount + * Inputs: msTimerCount + * Outputs: none + * @return msTimerCount as a U32 *************************************************************************/ U32 getMSTimerCount( void ) { @@ -69,11 +69,11 @@ /*********************************************************************//** * @brief - * The didTimeout function determines whether a timeout has occurred between \n + * The didTimeout function determines whether a timeout has occurred between * a given start count and a given timeout period (in ms). * @details - * Inputs : msTimerCount - * Outputs : none + * Inputs: msTimerCount + * Outputs: none * @param startMSCount the ms count at the start of the timeout period * @param timeoutPeriod the period for the timeout (in ms) * @return TRUE if a timeout has occurred, FALSE if not @@ -107,11 +107,11 @@ /*********************************************************************//** * @brief - * The calcTimeSince function calculates the time (in ms) from a given start \n + * The calcTimeSince function calculates the time (in ms) from a given start * time until now. * @details - * Inputs : msTimerCount - * Outputs : none + * Inputs: msTimerCount + * Outputs: none * @param startMSCount the ms count at the start of the period * @return ms since given start time *************************************************************************/ @@ -135,11 +135,11 @@ /*********************************************************************//** * @brief - * The calcTimeBetween function calculates the time (in ms) from a given start \n + * The calcTimeBetween function calculates the time (in ms) from a given start * time until a given end time. * @details - * Inputs : none - * Outputs : none + * Inputs: none + * Outputs: none * @param startMSCount the ms count at the start of the period * @param endMSCount the ms count at the end of the period * @return ms between two given times Index: Timers.h =================================================================== diff -u -re8828d66e4a76e0590c3f06b7f6235f33df64e80 -r47f8ae76f4eed444ce98feec1635e62394afccf5 --- Timers.h (.../Timers.h) (revision e8828d66e4a76e0590c3f06b7f6235f33df64e80) +++ Timers.h (.../Timers.h) (revision 47f8ae76f4eed444ce98feec1635e62394afccf5) @@ -40,4 +40,4 @@ /**@}*/ -#endif +#endif Index: Utilities.c =================================================================== diff -u -r13c32729e3186ebb5487e41a0cecd4cf15d357eb -r47f8ae76f4eed444ce98feec1635e62394afccf5 --- Utilities.c (.../Utilities.c) (revision 13c32729e3186ebb5487e41a0cecd4cf15d357eb) +++ Utilities.c (.../Utilities.c) (revision 47f8ae76f4eed444ce98feec1635e62394afccf5) @@ -26,8 +26,8 @@ // ********** private definitions ********** -#define INITIAL_CRC16_VAL 0xFFFF ///< Seed for 16-bit CRC function. -#define INITIAL_CRC08_VAL 0x00 ///< Seed for 8-bit CRC function. +#define INITIAL_CRC16_VAL 0xFFFF ///< Seed for 16-bit CRC function +#define INITIAL_CRC08_VAL 0x00 ///< Seed for 8-bit CRC function // ********** private data ********** @@ -89,23 +89,23 @@ }; // variables for time windowed counts (counts # of instances in a specific window of time) -static BOOL timeWindowedCountsInitialized[ NUM_OF_TIME_WINDOWED_COUNTS ]; ///< Initialized flags for time windowed counts. -static U32 timeWindowedCountsMaxCount[ NUM_OF_TIME_WINDOWED_COUNTS ]; ///< Max. counts for time windowed counts. -static U32 timeWindowedCountsWindowMs[ NUM_OF_TIME_WINDOWED_COUNTS ]; ///< Time windows (in ms) for time windowed counts. -static U32 timeWindowedCounts[ NUM_OF_TIME_WINDOWED_COUNTS ][ MAX_TIME_WINDOWED_COUNT ]; ///< Time stamps for instances for time windowed counts. -static U32 timeWindowedCountIndexes[ NUM_OF_TIME_WINDOWED_COUNTS ]; ///< List indexes for time windowed counts. -static U32 timeWindowedCountCounts[ NUM_OF_TIME_WINDOWED_COUNTS ]; ///< Current counts for time windowed counts. +static BOOL timeWindowedCountsInitialized[ NUM_OF_TIME_WINDOWED_COUNTS ]; ///< Initialized flags for time windowed counts +static U32 timeWindowedCountsMaxCount[ NUM_OF_TIME_WINDOWED_COUNTS ]; ///< Max. counts for time windowed counts +static U32 timeWindowedCountsWindowMs[ NUM_OF_TIME_WINDOWED_COUNTS ]; ///< Time windows (in ms) for time windowed counts +static U32 timeWindowedCounts[ NUM_OF_TIME_WINDOWED_COUNTS ][ MAX_TIME_WINDOWED_COUNT ]; ///< Time stamps for instances for time windowed counts +static U32 timeWindowedCountIndexes[ NUM_OF_TIME_WINDOWED_COUNTS ]; ///< List indexes for time windowed counts +static U32 timeWindowedCountCounts[ NUM_OF_TIME_WINDOWED_COUNTS ]; ///< Current counts for time windowed counts /*********************************************************************//** * @brief - * The crc16 function calculates a 16-bit CRC for a given range of bytes \n - * in memory. Poly = 0x1021. Not reflected. Initial value = 0xFFFF. + * The crc16 function calculates a 16-bit CRC for a given range of bytes + * in memory. Poly = 0x1021. Not reflected. Initial value = 0xFFFF. * @details - * Inputs : none - * Outputs : none + * Inputs: none + * Outputs: none * @param address pointer to start address of memory range to calculate CRC for * @param len number of bytes in the memory range to calculate CRC for - * @return CRC + * @return CRC as a U16 *************************************************************************/ U16 crc16( const U08 *address, U32 len ) { @@ -122,14 +122,14 @@ /*********************************************************************//** * @brief - * The crc8 function calculates a 8-bit CRC for a given range of bytes \n + * The crc8 function calculates a 8-bit CRC for a given range of bytes * in memory. * @details - * Inputs : none - * Outputs : none + * Inputs: none + * Outputs: none * @param address pointer to start address of memory range to calculate CRC for * @param len number of bytes in the memory range to calculate CRC for - * @return CRC + * @return CRC as a U08 *************************************************************************/ U08 crc8( const U08 *address, U32 len ) { @@ -148,8 +148,9 @@ * @brief * The initTimeWindowedCount function initializes a given time windowed count. * @details - * Inputs : none - * Outputs : all time windowed count variables for a given time windowed count are initialized. + * Inputs: timeWindowedCountsMaxCount, timeWindowedCountsInitialized + * Outputs: timeWindowedCountsMaxCount, timeWindowedCountsInitialized, alarm if + * software fault occurred * @param cnt ID of the time windowed count to initialize * @param maxCnt maximum number of instances in the time window for this count * @param winMs number of ms in the time window for this count @@ -196,16 +197,17 @@ /*********************************************************************//** * @brief - * The incTimeWindowedCount function adds a new instance to a given time \n - * windowed count. Must call initTimeWindowedCount() prior to calling this \n + * The incTimeWindowedCount function adds a new instance to a given time + * windowed count. Must call initTimeWindowedCount() prior to calling this * function for a given time windowed count. - * *Note - thread protection not provided - assumed function will be called \n + * *Note - thread protection not provided - assumed function will be called * by one task for a given time windowed count. * @details - * Inputs : timeWindowedCounts[][], timeWindowedCountIndexes[], timeWindowedCountCounts[] - * Outputs : timeWindowedCounts[][], timeWindowedCountIndexes[], timeWindowedCountCounts[] + * Inputs: timeWindowedCounts, timeWindowedCountIndexes, timeWindowedCountCounts + * Outputs: timeWindowedCounts, timeWindowedCountIndexes, timeWindowedCountCounts, + * alarm if a software fault occurred * @param cnt ID of the time windowed count to add an instance to - * @return TRUE if this instances brings the count to the maximum within \n + * @return TRUE if this instances brings the count to the maximum within * this counts time window, otherwise FALSE *************************************************************************/ BOOL incTimeWindowedCount( TIME_WINDOWED_COUNT_T cnt ) @@ -242,12 +244,12 @@ /*********************************************************************//** * @brief - * The getCriticalData function gets the value for a given critical data \n - * record. The integrity of the critical data is checked first. If the \n + * The getCriticalData function gets the value for a given critical data + * record. The integrity of the critical data is checked first. If the * critical data record fails the integrity check, a fault is triggered. * @details - * Inputs : none - * Outputs : given critical data record's value is retrieved. + * Inputs: none + * Outputs: alarm if HD critical error occurred * @param data Ptr to a critical data record * @return The data from a critical data record *************************************************************************/ @@ -279,11 +281,11 @@ /*********************************************************************//** * @brief - * The setCriticalData function sets the value for a given critical data \n + * The setCriticalData function sets the value for a given critical data * record. * @details - * Inputs : none - * Outputs : given critical data record's value is set to given value + * Inputs: none + * Outputs: alarm if HD critical error occurred * @param data Ptr to a critical data record * @param value a value to set * @return none @@ -312,8 +314,8 @@ * @brief * The resetCriticalData function resets a critical data record. * @details - * Inputs : none - * Outputs : Given critical data record is reset + * Inputs: none + * Outputs: none * @param data Ptr to a critical data record * @return none *************************************************************************/ Index: Utilities.h =================================================================== diff -u -rb20ab0cdf009f97c0aff428219e901b0603e3fd2 -r47f8ae76f4eed444ce98feec1635e62394afccf5 --- Utilities.h (.../Utilities.h) (revision b20ab0cdf009f97c0aff428219e901b0603e3fd2) +++ Utilities.h (.../Utilities.h) (revision 47f8ae76f4eed444ce98feec1635e62394afccf5) @@ -29,7 +29,7 @@ // ********** public definitions ********** // ******* Time Windowed Count Definitions ********* -#define MAX_TIME_WINDOWED_COUNT 5 ///< Maximum # of counts that a time windowed count can count to. +#define MAX_TIME_WINDOWED_COUNT 5 ///< Maximum # of counts that a time windowed count can count to /// Enumeration of time-windowed counts. typedef enum TimeWindowedCounts @@ -47,7 +47,7 @@ TIME_WINDOWED_COUNT_FPGA_CONDUCTIVITY_SENSOR_ERROR, ///< FPGA Conductivity sensor error TIME_WINDOWED_COUNT_FPGA_TEMPERATURE_SENSOR_ERROR, ///< FPGA Temperature sensor error #endif - NUM_OF_TIME_WINDOWED_COUNTS ///< Number of pressure sensors. + NUM_OF_TIME_WINDOWED_COUNTS ///< Number of pressure sensors } TIME_WINDOWED_COUNT_T; // ******* Critical Data Definitions ********* @@ -57,15 +57,15 @@ CRITICAL_DATA_TYPE_U32 = 0, ///< Critical data is unsigned 32-bit integer type CRITICAL_DATA_TYPE_S32, ///< Critical data is signed 32-bit integer type CRITICAL_DATA_TYPE_F32, ///< Critical data is 32-bit floating point type - NUM_OF_CRITICAL_DATA_TYPES ///< Total number of critical data types. + NUM_OF_CRITICAL_DATA_TYPES ///< Total number of critical data types } CRITICAL_DATA_TYPES_T; /// Record structure for alarm data of any supported type. typedef union { - U32 uInt; ///< critical data of unsigned integer type. - S32 sInt; ///< critical data of signed integer type. - F32 sFlt; ///< critical data of floating point type. + U32 uInt; ///< critical data of unsigned integer type + S32 sInt; ///< critical data of signed integer type + F32 sFlt; ///< critical data of floating point type } CRITICAL_DATAS_T; /// critical integer data structure.