Mobil_surveillance_system 1
Defines | Typedefs | Functions
Time.h File Reference

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)

Detailed Description

Software RTC functions header file.

This file contains the software RTC funtions prototypes.

Definition in file Time.h.


Typedef Documentation

typedef unsigned char tBoolean

bool type defination

Definition at line 36 of file Time.h.

typedef unsigned long tDateTime

Type of time

Definition at line 42 of file Time.h.


Function Documentation

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.

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);
}
 All Data Structures Files Functions Variables Typedefs Enumerations Defines