Mobil_surveillance_system 1
Time.c
Go to the documentation of this file.
00001 #include "Time.h"
00002 
00004 
00009 //*****************************************************************************
00010 //
00011 // Globale variables definitions
00012 //
00013 //*****************************************************************************
00014 
00016 tDateTime g_SystemDateTime = 0;
00017 
00018 //*****************************************************************************
00019 //
00020 // Function definitions
00021 //
00022 //*****************************************************************************
00023 
00025 void Time_initSystemDateTime(void)
00027 {
00028     g_SystemDateTime = 0;
00029     // every time when the Timer_A is overflowed adjust the current time by 1 (sec)
00030     Interrupts_setTimerA_ISRCallbackFunction(&Time_adjustCurrentDateTime);
00031 }
00032 
00033 
00035 void Time_getCurrentDateTime(tDateTime* psDateTime)
00037 {
00038     *psDateTime = g_SystemDateTime; 
00039 }
00040 
00041 
00043 void Time_adjustCurrentDateTime(void)
00045 {
00046     g_SystemDateTime += SECOND; 
00047 }
 All Data Structures Files Functions Variables Typedefs Enumerations Defines