versadac  1
versadac - Scalable Recorder Firmware
system_ticks.h
1 /*******************************************************************************
2 FILE : system_ticks.h
3 SYSTEM : Gnu C C++ for ARM under vxWorks
4 AUTHOR : Jon Rich
5 DATE : 24/06/2009
6 DESCRIPTION : This is the Nano system ticks support include file
7 *******************************************************************************/
8 
9 #ifndef __SYSTEM_TICKS_H
10 #define __SYSTEM_TICKS_H
11 
12 #include "stdtypes.h"
13 
14 
15 /********************************
16 * Defines
17 ********************************/
18 #define BSP_START_YEAR 1970 /* UTC standard start year */
19 #define YEARS_TILL_LEAP_YEAR 2 /* 1972 */
20 #define START_DAY 4 /* Thursday */
21 #define DAYS_IN_START_YEAR 365 /* Not a leap year */
22 #define INVALID_TIME -22
23 #define INVALID_DATE -23
24 
25 
26 /********************************
27  * Globals
28 ********************************/
29 
30 void maintain_system_ticks( uint16 announce_ticks );
31 void initialise_system_ticks();
32 uint16 get_ticks_per_second();
33 uint16 get_ms_per_tick();
34 double get_ticks();
35 double get_elapsed_ticks();
36 void ticks_to_time( double doubleTicks, time_date_t *time_p );
37 double utc_to_ticks( double utc );
38 void ticks_to_utc( double ticks, double *utc_p );
39 void get_ticks_and_seg(double *ticks_p, sint32 *seg_p);
40 void set_system_time(uint32 seconds);
41 void read_from_rtc(time_date_t *time_p);
42 void write_to_rtc(time_date_t *time_p);
43 double time_to_ticks( time_date_t *time_p );
44 bool system_ticks_clock_failure();
45 void system_ticks_create_clock_failure_file();
46 unicode_p system_ticks_is_clock_fault_popup_required();
47 void milliseconds_to_time( double milliseconds, time_date_t *time_p );
48 bool system_ticks_does_clock_fault_file_exist();
49 bool SNTPServerFailure();
50 bool SNTPTimeSyncFailure();
51 
52 #endif /* __SYSTEM_TICKS_H */
53 
Definition: stdtypes.h:144