|
Mobil_surveillance_system 1
|
Software RTC functions header file. More...
#include "Interrupts.h"Go to the source code of this file.
Defines | |
| #define | SECOND 1 |
| This value correspond with one second. | |
| #define | MINUTE (SECOND * 60) |
| This value correspond with one minute. | |
| #define | HOUR (MINUTE * 60) |
| This value correspond with one hour. | |
| #define | DEFINE_TBOOLEAN |
Typedefs | |
| typedef unsigned char | tBoolean |
| typedef unsigned long | tDateTime |
Functions | |
| void | Time_initSystemDateTime (void) |
| void | Time_getCurrentDateTime (tDateTime *psDateTime) |
| void | Time_adjustCurrentDateTime (void) |
Software RTC functions header file.
This file contains the software RTC funtions prototypes.
Definition in file Time.h.
| void Time_adjustCurrentDateTime | ( | void | ) |
This function is increase the g_SystemDateTime by 1 second. This function will be called by the TimerA interrupt handler function every time when one second ellapsed.
Definition at line 43 of file Time.c.
{
g_SystemDateTime += SECOND;
}
| void Time_getCurrentDateTime | ( | tDateTime * | psDateTime | ) |
This function can be used to get the current time.
Definition at line 35 of file Time.c.
{
*psDateTime = g_SystemDateTime;
}
| void Time_initSystemDateTime | ( | void | ) |
This function is used to set the start value of the g_SystemDateTime globale varibale.
Definition at line 25 of file Time.c.
{
g_SystemDateTime = 0;
// every time when the Timer_A is overflowed adjust the current time by 1 (sec)
Interrupts_setTimerA_ISRCallbackFunction(&Time_adjustCurrentDateTime);
}
1.7.4