Index: NVDataMgmt.c =================================================================== diff -u -rc4171147708d867ba5886aaa53182ad0fae774d3 -r7e186bb97310fb59f525e5399ec7a74711bea571 --- NVDataMgmt.c (.../NVDataMgmt.c) (revision c4171147708d867ba5886aaa53182ad0fae774d3) +++ NVDataMgmt.c (.../NVDataMgmt.c) (revision 7e186bb97310fb59f525e5399ec7a74711bea571) @@ -129,13 +129,14 @@ // DG specific defines #ifdef _DG_ #define FLUSH_LINES_DEFAULT_VOLUME_L 0.01F ///< Water volume to flush when starting re-circulate mode in liters. -#define ACID_CONC_DEFAULT_MIXING_RATIO ( 2.35618 / FRACTION_TO_PERCENT_FACTOR ) ///< Ratio between RO water and acid concentrate mixing ratio. #define BICARB_CONC_DEFAULT_MIXING_RATIO ( 4.06812 / FRACTION_TO_PERCENT_FACTOR ) ///< Ratio between RO water and bicarbonate concentrate mixing ratio. -#define PRES_SENSORS_RESERVED_SPACE_COUNT 6 ///< Pressure sensors reserved space count. -#define FLOW_SENSROS_RESERVED_SPACE_COUNT 2 ///< Flow sensors reserved space count. -#define TEMP_SENSORS_RESERVED_SPACE_COUNT 5 ///< Temperature sensors reserved space count. -#define COND_SENSORS_RESERVED_SPACE_COUNT 2 ///< Conductivity sensors reserved space count. -#define GENERIC_VOL_RESERVED_SPACE_COUNT 4 ///< Generic volumes reserved space count. +#define RECORD_DEFAULT_BICARB_BOTTLE_VOL_ML 3780.0F ///< Record default bicarb bottle volume in milliliters. +#define RECORD_DEFAULT_BICARB_COND_US_PER_CM 13734.88F ///< Record default acid conductivity in uS/cm. +#define RECORD_DEFAULT_BICARB_BOTTLE_TEMP_C 23.5F ///< Record default acid bottle temperature in C. +#define ACID_CONC_DEFAULT_MIXING_RATIO ( 2.35618 / FRACTION_TO_PERCENT_FACTOR ) ///< Ratio between RO water and acid concentrate mixing ratio. +#define RECORD_DEFAULT_ACID_BOTTLE_VOL_ML 3430.0F ///< Record default acid bottle volume in milliliters. +#define RECORD_DEFAULT_ACID_COND_US_PER_CM 11645.05F ///< Record default acid conductivity in uS/cm. +#define RECORD_DEFAULT_ACID_BOTTLE_TEMP_C 23.5F ///< Record default acid bottle temperature in C. #define RESERVOIR_TEMPERATURE_TAU_C_PER_MIN -0.512F ///< Reservoir temperature time constant C/min. #define ULTRAFILTER_TEMPERATURE_TAU_C_PER_MIN -4.565F ///< Ultrafilter temperature time constant C/min. #define ULTRAFILTER_VOLUME_ML 700 ///< Ultrafilter volume in milliliters. @@ -3590,20 +3591,19 @@ static BOOL isDGAcidConcentrateRecordValid( DG_ACID_CONCENTRATE_T* record ) { BOOL status = TRUE; - U16 calcCRC = crc16 ( (U08*)record, sizeof(DG_ACID_CONCENTRATE_T) - sizeof(U16) ); + U16 calcCRC = crc16 ( (U08*)record, sizeof( DG_ACID_CONCENTRATE_T ) - sizeof( U16 ) ); U16 recordCRC = record->crc; if ( calcCRC != recordCRC ) { // CRC did not pass so set all values to default - record->startVolume = RECORD_DEFAULT_CONST; - record->reserverdSpace = RECORD_DEFAULT_CONST; - record->acidConcMixRatio = ACID_CONC_DEFAULT_MIXING_RATIO; - record->calibrationTime = RECORD_DEFAULT_TIME; - record->crc = crc16 ( (U08*)record, sizeof(DG_ACID_CONCENTRATE_T) - sizeof(U16) ); - - // Set the to FALSE since the record is not valid - status = FALSE; + record->acidFullBottleVolumeML = RECORD_DEFAULT_ACID_BOTTLE_VOL_ML; + record->acidConductivityUSPerCM = RECORD_DEFAULT_ACID_COND_US_PER_CM; + record->acidBottleTemperature = RECORD_DEFAULT_ACID_BOTTLE_TEMP_C; + record->acidConcMixRatio = ACID_CONC_DEFAULT_MIXING_RATIO; + record->calibrationTime = RECORD_DEFAULT_TIME; + record->crc = crc16 ( (U08*)record, sizeof( DG_ACID_CONCENTRATE_T ) - sizeof( U16 ) ); + status = FALSE; } return status; @@ -3621,20 +3621,19 @@ static BOOL isDGBicarbConcentrateRecordValid( DG_BICARB_CONCENTRATE_T* record ) { BOOL status = TRUE; - U16 calcCRC = crc16 ( (U08*)record, sizeof(DG_BICARB_CONCENTRATE_T) - sizeof(U16) ); + U16 calcCRC = crc16 ( (U08*)record, sizeof( DG_BICARB_CONCENTRATE_T ) - sizeof( U16 ) ); U16 recordCRC = record->crc; if ( calcCRC != recordCRC ) { // CRC did not pass so set all values to default - record->startVolume = RECORD_DEFAULT_CONST; - record->reservedSpace = RECORD_DEFAULT_CONST; - record->bicarbConcMixRatio = BICARB_CONC_DEFAULT_MIXING_RATIO; - record->calibrationTime = RECORD_DEFAULT_TIME; - record->crc = crc16 ( (U08*)record, sizeof(DG_BICARB_CONCENTRATE_T) - sizeof(U16) ); - - // Set the to FALSE since the record is not valid - status = FALSE; + record->bicarbStartVolumeML = RECORD_DEFAULT_BICARB_BOTTLE_VOL_ML; + record->bicarbConductivityUSPerCM = RECORD_DEFAULT_BICARB_COND_US_PER_CM; + record->bicarbBottleTemperature = RECORD_DEFAULT_BICARB_BOTTLE_TEMP_C; + record->bicarbConcMixRatio = BICARB_CONC_DEFAULT_MIXING_RATIO; + record->calibrationTime = RECORD_DEFAULT_TIME; + record->crc = crc16 ( (U08*)record, sizeof( DG_BICARB_CONCENTRATE_T ) - sizeof( U16 ) ); + status = FALSE; } return status; Index: NVDataMgmtDGRecords.h =================================================================== diff -u -rc4171147708d867ba5886aaa53182ad0fae774d3 -r7e186bb97310fb59f525e5399ec7a74711bea571 --- NVDataMgmtDGRecords.h (.../NVDataMgmtDGRecords.h) (revision c4171147708d867ba5886aaa53182ad0fae774d3) +++ NVDataMgmtDGRecords.h (.../NVDataMgmtDGRecords.h) (revision 7e186bb97310fb59f525e5399ec7a74711bea571) @@ -31,8 +31,13 @@ // ********** public definitions ********** -#define MAX_TOP_LEVEL_PN_CHARS 10U ///< Max number of characters for top level part number. -#define MAX_TOP_LEVEL_SN_CHARS 15U ///< Max number of characters for top level serial number. +#define MAX_TOP_LEVEL_PN_CHARS 10U ///< Max number of characters for top level part number. +#define MAX_TOP_LEVEL_SN_CHARS 15U ///< Max number of characters for top level serial number. +#define PRES_SENSORS_RESERVED_SPACE_COUNT 5 ///< Pressure sensors reserved space count. +#define FLOW_SENSROS_RESERVED_SPACE_COUNT 2 ///< Flow sensors reserved space count. +#define TEMP_SENSORS_RESERVED_SPACE_COUNT 5 ///< Temperature sensors reserved space count. +#define COND_SENSORS_RESERVED_SPACE_COUNT 2 ///< Conductivity sensors reserved space count. +#define GENERIC_VOL_RESERVED_SPACE_COUNT 4 ///< Generic volumes reserved space count. #ifndef _RELEASE_ /// Software configuration enums @@ -140,6 +145,9 @@ CAL_DATA_OUTLET_PRIMARY_HEATER_TEMP, ///< Outlet primary heater temperature sensor. CAL_DATA_COND_SENSOR_1_TEMP, ///< Conductivity sensor 1 temperature sensor. CAL_DATA_COND_SENSOR_2_TEMP, ///< Conductivity sensor 2 temperature sensor. + CAL_DATA_HEAT_DISINFECT_TEMP, ///< Heat disinfect temperature sensor. + CAL_DATA_INTERNAL_THD_TEMP, ///< Heat disinfect internal ADC temperature sensor. + CAL_DATA_BARMOTERIC_TEMP, ///< Barometric temperature sensor. NUM_OF_CAL_DATA_TEMP_SENSORS, ///< Number of temperature sensors. } CAL_DATA_DG_TEMP_SENSORS_T; @@ -262,18 +270,14 @@ typedef struct { POLYNOMIAL_CAL_PAYLOAD_T pressureSensors[ NUM_OF_CAL_DATA_PRES_SENSORS ]; ///< Pressure sensors to calibrate. - // NOTE: The reserved space is for 6 sensors. This portion of the struct should be eventually be - // reduced, so #define was not used for the size of the array - POLYNOMIAL_CAL_PAYLOAD_T reservedSpace[ 5 ]; ///< Reserved space for future pressure sensors. + POLYNOMIAL_CAL_PAYLOAD_T reservedSpace[ PRES_SENSORS_RESERVED_SPACE_COUNT ]; ///< Reserved space for future pressure sensors. } DG_PRES_SENSORS_CAL_RECORD_T; /// Flow sensors calibration structure typedef struct { POLYNOMIAL_CAL_PAYLOAD_T flowSensors[ NUM_OF_CAL_DATA_FLOW_SENSORS ]; ///< Flow sensors to calibrate. - // NOTE: The reserved space is for 6 sensors. This portion of the struct should be eventually be - // reduced, so #define was not used for the size of the array - POLYNOMIAL_CAL_PAYLOAD_T reservedSpace[ 2 ]; ///< Reserved space for future flow sensors. + POLYNOMIAL_CAL_PAYLOAD_T reservedSpace[ FLOW_SENSROS_RESERVED_SPACE_COUNT ]; ///< Reserved space for future flow sensors. } DG_FLOW_SENSORS_CAL_RECORD_T; /// Load cells calibration structure @@ -286,18 +290,14 @@ typedef struct { POLYNOMIAL_CAL_PAYLOAD_T tempSensors[ NUM_OF_CAL_DATA_TEMP_SENSORS ]; ///< Temperature sensors to calibrate. - // NOTE: The reserved space is for 6 sensors. This portion of the struct should be eventually be - // reduced, so #define was not used for the size of the array - POLYNOMIAL_CAL_PAYLOAD_T reservedSpace[ 5 ]; ///< Reserved space for future temperature sensors. + POLYNOMIAL_CAL_PAYLOAD_T reservedSpace[ TEMP_SENSORS_RESERVED_SPACE_COUNT ]; ///< Reserved space for future temperature sensors. } DG_TEMP_SENSORS_CAL_RECORD_T; /// Conductivity sensors calibration structure typedef struct { POLYNOMIAL_CAL_PAYLOAD_T condSensors[ NUM_OF_CAL_DATA_COND_SENSORS ]; ///< Conductivity sensors to calibrate. - // NOTE: The reserved space is for 6 sensors. This portion of the struct should be eventually be - // reduced, so #define was not used for the size of the array - POLYNOMIAL_CAL_PAYLOAD_T reservedSpace[ 2 ]; ///< Reserved space for future conductivity sensors. + POLYNOMIAL_CAL_PAYLOAD_T reservedSpace[ COND_SENSORS_RESERVED_SPACE_COUNT ]; ///< Reserved space for future conductivity sensors. } DG_COND_SENSORS_CAL_RECORD_T; /// Drain line volume calibration structure @@ -345,15 +345,16 @@ /// DG generic volume record typedef struct { - DG_GENERIC_VOLUME_DATA_T genericVolume[ 4 ]; ///< DG generic volume record. + DG_GENERIC_VOLUME_DATA_T genericVolume[ GENERIC_VOL_RESERVED_SPACE_COUNT ]; ///< DG generic volume record. }DG_GENERIC_VOLUME_RECORD_T; /// DG acid concentrate typedef struct { F32 acidConcMixRatio; ///< Acid concentrate mix ratio. - F32 startVolume; ///< Start volume. - F32 reserverdSpace; ///< Reserved space. + F32 acidFullBottleVolumeML; ///< Acid full bottle volume in milliliters. + F32 acidConductivityUSPerCM; ///< Acid conductivity in uS/cm. + F32 acidBottleTemperature; ///< Acid bottle temperature in C. U32 calibrationTime; ///< Calibration time. U16 crc; ///< CRC. } DG_ACID_CONCENTRATE_T; @@ -362,8 +363,9 @@ typedef struct { F32 bicarbConcMixRatio; ///< Bicarb concentrate mix ratio. - F32 startVolume; ///< Start volume. - F32 reservedSpace; ///< Reserved space. + F32 bicarbStartVolumeML; ///< Bicarb start volume. + F32 bicarbConductivityUSPerCM; ///< Bicarb conductivity in uS/cm. + F32 bicarbBottleTemperature; ///< Bicarb bottle temperature in C. U32 calibrationTime; ///< Calibration time. U16 crc; ///< CRC. } DG_BICARB_CONCENTRATE_T; Index: PersistentAlarm.c =================================================================== diff -u -r75e6d3ffab11ae6ff0521efb9c16d5698402a669 -r7e186bb97310fb59f525e5399ec7a74711bea571 --- PersistentAlarm.c (.../PersistentAlarm.c) (revision 75e6d3ffab11ae6ff0521efb9c16d5698402a669) +++ PersistentAlarm.c (.../PersistentAlarm.c) (revision 7e186bb97310fb59f525e5399ec7a74711bea571) @@ -207,6 +207,36 @@ /*********************************************************************//** * @brief + * The checkPersistentAlarm function triggers/clears an alarm if an alarm condition + * has persisted/cleared over given time limit. + * @details Inputs: none + * @details Outputs: checks whether an alarm is triggered or an alarm condition is cleared + * @param alarmID ID of alarm to check + * @param isErrorOccured Flag indicates alarm condition is active or not + * @param data alarm data + * @param limit alarm condition limit + * @return TRUE if given alarm is active, FALSE if not + *************************************************************************/ +BOOL checkPersistentAlarm( ALARM_ID_T alarm, BOOL isErrorOccured, F32 data, F32 limit ) +{ + BOOL status = FALSE; + + if ( TRUE == isPersistentAlarmTriggered( alarm, isErrorOccured ) ) + { + SET_ALARM_WITH_2_F32_DATA( alarm, data, limit ); + } + + if ( TRUE == isPersistentAlarmConditionCleared( alarm, isErrorOccured ) ) + { + clearAlarmCondition( alarm ); + status = TRUE; + } + + return status; +} + +/*********************************************************************//** + * @brief * The resetPersistentAlarmTimer function resets the start time for error * condition clear start time and error start time. * @details Inputs: none Index: PersistentAlarm.h =================================================================== diff -u -r07779aa6f22d6e376b83d3e4002b9d7bd5890e35 -r7e186bb97310fb59f525e5399ec7a74711bea571 --- PersistentAlarm.h (.../PersistentAlarm.h) (revision 07779aa6f22d6e376b83d3e4002b9d7bd5890e35) +++ PersistentAlarm.h (.../PersistentAlarm.h) (revision 7e186bb97310fb59f525e5399ec7a74711bea571) @@ -63,6 +63,7 @@ BOOL isPersistentAlarmTriggered( ALARM_ID_T alarmIndex, BOOL const isErrorOccurred ); BOOL isPersistentAlarmConditionCleared( ALARM_ID_T alarmIndex, BOOL const isErrorOccurred ); +BOOL checkPersistentAlarm( ALARM_ID_T alarm, BOOL isErrorOccured, F32 data, F32 limit ); void resetPersistentAlarmTimer( ALARM_ID_T alarmId ); void checkFPGAPersistentAlarms( FPGA_PERSISTENT_ALARMS_GROUP_T group, U32 errorCount, U32 readCount, U32 sensorIndex ); Index: RTC.c =================================================================== diff -u -rc4171147708d867ba5886aaa53182ad0fae774d3 -r7e186bb97310fb59f525e5399ec7a74711bea571 --- RTC.c (.../RTC.c) (revision c4171147708d867ba5886aaa53182ad0fae774d3) +++ RTC.c (.../RTC.c) (revision 7e186bb97310fb59f525e5399ec7a74711bea571) @@ -1090,10 +1090,13 @@ { result = RTC_EXEC_STATE_PREP_RAM; } - else if ( TIMER_COUNTER_TO_REQUEST_READ == timeCounter ) + else if ( TIMER_COUNTER_TO_REQUEST_READ >= timeCounter ) { - prepBufferForReadCommand( RTC_GENERAL_BUFFER_LENGTH ); - result = RTC_EXEC_STATE_READ; + if ( TRUE == getSemaphore( SEMAPHORE_RTC ) ) + { + prepBufferForReadCommand( RTC_GENERAL_BUFFER_LENGTH ); + result = RTC_EXEC_STATE_READ; + } } else { @@ -1266,6 +1269,7 @@ { RTC_DATA_T data; + releaseSemaphore( SEMAPHORE_RTC ); updateReadTimestampStruct(); lastEpochTime = convertDateTime2Epoch( RTCTimestampStruct ); timeCounter = 1; Index: Utilities.c =================================================================== diff -u -r5846ff450c26de04b388c2636964a9116ccb6e9d -r7e186bb97310fb59f525e5399ec7a74711bea571 --- Utilities.c (.../Utilities.c) (revision 5846ff450c26de04b388c2636964a9116ccb6e9d) +++ Utilities.c (.../Utilities.c) (revision 7e186bb97310fb59f525e5399ec7a74711bea571) @@ -33,8 +33,14 @@ #define ASCII_CODE_NUMBER_ZERO 0x30 ///< ASCII code in hex for number zero. #define ASCII_CODE_NUMBER_SEVEN 0x37 ///< ASCII code in hex for number seven. -// ********** private data ********** +// ********** private data ********** +/// Semaphore data structure +typedef struct +{ + volatile BOOL isSemaphoreTaken; ///< Flag to indicate whether the semaphore is taken or not. +} SEMAPHORE_STATUS_T; + /// CRC-32 look-up table. const U32 CRC32_TABLE[] = { @@ -136,6 +142,7 @@ 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 SEMAPHORE_STATUS_T sempahoreStatus[ NUM_OF_SEMAPHORES ]; /*********************************************************************//** * @brief @@ -207,13 +214,23 @@ return crc; } -U08 crc4( U08* buffer ) +/*********************************************************************//** + * @brief + * The crc4 function calculates a 4-bit CRC for a given range of bytes + * in memory. + * @details Inputs: none + * @details 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 as a U08 + *************************************************************************/ +U08 crc4( U16* buffer, U32 byteCount ) { U32 count; U08 nBit; U32 nRem = 0; - for ( count = 0; count < 16; count++ ) + for ( count = 0; count < byteCount; count++ ) { if ( 1 == ( count % 2 ) ) { @@ -568,6 +585,38 @@ data->data.uInt = data->defValue.uInt; data->comp = ~data->data.uInt; _enable_IRQ(); +} + +/*********************************************************************//** + * @brief + * The hexStrToDec function convert hex string to decimal value. + * @details Inputs: none + * @details Outputs: none + * @param valuePtr pointer to hex string to convert + * @param size size of the hex string to convert + * @return converted value of hex string + *************************************************************************/ +U32 hexStrToDec( U08 const * const valuePtr, U08 size ) +{ + U08 ii; + U08 value; + U32 result = 0; + + for ( ii = 0; ii < size; ++ii ) + { + if ( valuePtr[ii] < ASCII_CODE_LETTER_A ) + { + value = ( valuePtr[ii] - ASCII_CODE_NUMBER_ZERO ); + result = ( result << 4 ) | value; + } + else + { + value = ( valuePtr[ii] - ASCII_CODE_NUMBER_SEVEN ); + result = ( result << 4 ) | value; + } + } + + return result; } /*********************************************************************//** @@ -591,39 +640,60 @@ { result = TRUE; } + return result; } /*********************************************************************//** * @brief - * The hexStrToDec function convert hex string to decimal value. + * The initSemaphores function initializes the semaphores * @details Inputs: none - * @details Outputs: none - * @param valuePtr pointer to hex string to convert - * @param size size of the hex string to convert - * @return converted value of hex string + * @details Outputs: sempahoreStatus + * @return none *************************************************************************/ -U32 hexStrToDec( U08 const * const valuePtr, U08 size ) +void initSemaphores( void ) { - U08 ii; - U08 value; - U32 result = 0; + memset( &sempahoreStatus, FALSE, sizeof( SEMAPHORE_STATUS_T ) ); +} - for ( ii = 0; ii < size; ++ii ) +/*********************************************************************//** + * @brief + * The getSemaphore function gets a semaphore for the requested semaphore. + * @details Inputs: none + * @details Outputs: sempahoreStatus + * @param s which is the semaphore to be taken + * @return TRUE if semaphore is available and now it is taken otherwise, FALSE + *************************************************************************/ +BOOL getSemaphore( SEMAPHORE_T s ) +{ + BOOL result = FALSE; + + _disable_IRQ(); + if ( FALSE == sempahoreStatus[ s ].isSemaphoreTaken ) { - if ( valuePtr[ii] < ASCII_CODE_LETTER_A ) - { - value = ( valuePtr[ii] - ASCII_CODE_NUMBER_ZERO ); - result = ( result << 4 ) | value; - } - else - { - value = ( valuePtr[ii] - ASCII_CODE_NUMBER_SEVEN ); - result = ( result << 4 ) | value; - } + sempahoreStatus[ s ].isSemaphoreTaken = TRUE; + result = TRUE; } + _enable_IRQ(); return result; } + +/*********************************************************************//** + * @brief + * The releaseSemaphore function releases a semaphore that was previously taken + * for a job. + * @details Inputs: none + * @details Outputs: sempahoreStatus + * @param s which is the semaphore to be released + * @return none + *************************************************************************/ +void releaseSemaphore( SEMAPHORE_T s ) +{ + if ( TRUE == sempahoreStatus[ s ].isSemaphoreTaken ) + { + sempahoreStatus[ s ].isSemaphoreTaken = FALSE; + } +} /**@}*/ Index: Utilities.h =================================================================== diff -u -r5846ff450c26de04b388c2636964a9116ccb6e9d -r7e186bb97310fb59f525e5399ec7a74711bea571 --- Utilities.h (.../Utilities.h) (revision 5846ff450c26de04b388c2636964a9116ccb6e9d) +++ Utilities.h (.../Utilities.h) (revision 7e186bb97310fb59f525e5399ec7a74711bea571) @@ -62,6 +62,13 @@ NUM_OF_CRITICAL_DATA_TYPES ///< Total number of critical data types } CRITICAL_DATA_TYPES_T; +/// Semaphore items +typedef enum Semaphores +{ + SEMAPHORE_RTC = 0, ///< Semaphore RTC + NUM_OF_SEMAPHORES, ///< Number of semaphores +} SEMAPHORE_T; + /// Record structure for alarm data of any supported type. typedef union { @@ -87,7 +94,7 @@ U32 crc32( U32 const initialValue, const U08 *address, U32 len ); U16 crc16( const U08 *address, U32 len ); U08 crc8( const U08 *address, U32 len ); -U08 crc4( U08* buffer ); +U08 crc4( U16* buffer, U32 byteCount ); U32 u32DiffWithWrap( U32 start, U32 end ); S32 u32BiDiffWithWrap( U32 start, U32 end ); U16 u16DiffWithWrap( U16 start, U16 end ); @@ -99,7 +106,11 @@ BOOL isCriticalDataInRange( CRITICAL_DATA_T *data ); void resetCriticalData( CRITICAL_DATA_T *data ); U32 hexStrToDec( U08 const * const valuePtr, U08 size ); -BOOL isCriticalDataSet( CRITICAL_DATA_T *data ); ///< Determines if critcal data has been set. +BOOL isCriticalDataSet( CRITICAL_DATA_T *data ); ///< Determines if critical data has been set. + +void initSemaphores( void ); +BOOL getSemaphore( SEMAPHORE_T s ); +void releaseSemaphore( SEMAPHORE_T s ); /**@}*/