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 *************************************************************************/