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 ); /**@}*/