time.c File Reference

Times functions. More...

#include <timedef.h>
#include <Environment.h>
#include <in430.h>
#include <TimeManage.h>

Include dependency graph for time.c:

Go to the source code of this file.

Defines

#define TICKS_PER_SEC   ( 9416 )
#define TIMER_B_LIMIT   450

Functions

void clock_init (void)
 Initializes clock function.
__interrupt void clock_interrupt (void)
 Interrupt handling.
UINT32 clockb (void)
 Determines the processor time used by a program since the program began running.
time_t time (time_t *t)
 Determines the current calendat time, represented in seconds.

Variables

static UINT32 Clock_ticks
 Carry for software clock.
UINT8 flag_Clock_ticks_carry


Detailed Description

Times functions.

Author:
BARRIEZ Fabrice

ANGER Thomas

Version:
1.1
Date:
2005 / 09 / 01

2007 / 07 / 09 modification by ANGER Thomas

2008 / 11 / 25 code review and documentation by ANGER Thomas

Definition in file time.c.


Define Documentation

#define TICKS_PER_SEC   ( 9416 )

Definition at line 33 of file time.c.

#define TIMER_B_LIMIT   450

Definition at line 34 of file time.c.


Function Documentation

void clock_init ( void   ) 

Initializes clock function.

Note:
The clock_init function is target-system specific. We use timer B of MSP430F1612.
Returns:
Current time represented in ticks.
Note:
1 tick is about 100 micro-secondes

Definition at line 110 of file time.c.

References _EINT, Clock_ticks, and TIMER_B_LIMIT.

__interrupt void clock_interrupt ( void   ) 

Interrupt handling.

Note:
Update clock ticks count.

UINT32 clockb ( void   ) 

Determines the processor time used by a program since the program began running.

Note:
The clock function is target-system specific. You must call clock_init before using clock function.
Returns:
Current time represented in ticks.

Definition at line 86 of file time.c.

References _DINT, _EINT, and Clock_ticks.

time_t time ( time_t *  t  ) 

Determines the current calendat time, represented in seconds.

Parameters:
[out] t : If t is not a null pointer, the function assigns the return value to the object that t points to.
Note:
The time function is target-system specific.
Returns:
Current time represented in seconds.

Definition at line 60 of file time.c.

References clockb(), and TICKS_PER_SEC.

Referenced by init().

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

UINT32 Clock_ticks [static]

Carry for software clock.

Number of clock ticks

Definition at line 41 of file time.c.

Definition at line 78 of file Bootloader/CONFIG/VG.C.

Referenced by PT_THREAD().


Generated on Wed Jun 3 12:06:07 2009 for PowWow v1.0 by  doxygen 1.5.6