BIAZI.ENG.BR
SZSPTP ez430-RF2480
1.0
ZigBee Sensor Network with synchronized time and time-stamped measurements.
<<
Programming
Electronics
Contact
License/Rights
>>
Main Page
Related Pages
Modules
Classes
Files
License
File List
File Members
clock.h
Go to the documentation of this file.
1
/*
2
* clock.h
3
*
4
* Date: 19/06/2014
5
* Author: Fernando Biazi Nascimento
6
* Copyright © 2014 Fernando Biazi Nascimento. All rights reserved.
7
*
8
* License of use and copy on file license.txt
9
*
10
*/
11
20
#ifndef CLOCK_H_
21
#define CLOCK_H_
22
23
/*
24
* ======== Includes ========
25
*/
26
27
#include <xdc/std.h>
28
29
/*
30
* ======== Doxygen ========
31
*/
44
/*
45
* ======== Constants ========
46
*/
47
48
/*
49
* ======== Macros ========
50
*/
51
52
/*
53
* ======== Types ========
54
*/
55
63
typedef
struct
clock_secondsCount
{
64
UInt32 secondsLow;
65
UInt16 secondsHigh;
66
}
clock_secondsCount
;
67
75
typedef
struct
clock_timeStamp
{
76
clock_secondsCount
seconds;
77
UInt32 nanoSeconds;
78
}
clock_timeStamp
;
79
80
/*
81
* ======== Global Variables ========
82
*/
83
90
extern
UInt32
clock_tickSize
;
91
92
/*
93
* ======== Global Functions ========
94
*/
95
96
void
clock_init
();
97
98
void
clock_tick
();
99
void
clock_checkDelayedTick
();
100
101
void
clock_getTime
(
clock_timeStamp
*destTime);
102
void
clock_setTime
(
clock_timeStamp
*sourceTime);
103
void
clock_adjTime
(int64_t *adjValue);
104
void
clock_adjTimeValues
(int64_t *adjValue,
clock_timeStamp
*time);
105
void
clock_adjTick
(Int32 adjValue);
106
107
int64_t
clock_timeDiff
(
clock_timeStamp
*t1,
clock_timeStamp
*t2);
108
112
#endif
/* CLOCK_H_ */
clock_adjTimeValues
void clock_adjTimeValues(int64_t *adjValue, clock_timeStamp *time)
Adjust time values.
Definition:
clock.c:304
clock_secondsCount
Seconds count.
Definition:
clock.h:63
clock_secondsCount
struct clock_secondsCount clock_secondsCount
Seconds count.
clock_tick
void clock_tick()
Clock tick.
Definition:
clock.c:171
clock_tickSize
UInt32 clock_tickSize
Tick size (ns)
Definition:
clock.c:102
clock_timeStamp
Time stamp.
Definition:
clock.h:75
clock_init
void clock_init()
Clock Initialization.
Definition:
clock.c:148
clock_adjTick
void clock_adjTick(Int32 adjValue)
Adjust tick.
Definition:
clock.c:511
clock_timeDiff
int64_t clock_timeDiff(clock_timeStamp *t1, clock_timeStamp *t2)
Time difference.
Definition:
clock.c:533
clock_checkDelayedTick
void clock_checkDelayedTick()
Check delayed tick.
Definition:
clock.c:202
clock_timeStamp
struct clock_timeStamp clock_timeStamp
Time stamp.
clock_setTime
void clock_setTime(clock_timeStamp *sourceTime)
Set time.
Definition:
clock.c:237
clock_adjTime
void clock_adjTime(int64_t *adjValue)
Adjust time.
Definition:
clock.c:256
clock_getTime
void clock_getTime(clock_timeStamp *destTime)
Get time.
Definition:
clock.c:218
Local:
Root
/
UPM
/
Master Tesis
/
SZS, PTP and Program
/
clock.h