B.3 : THE 6 HOUR PROGRAM WITH 1 PPS SIGNAL THE MASTER TO BE CONNECTED TO 11 PIN.

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers decl.h Source File

decl.h

00001 #ifndef _DECL_
00002 #define _DECL_
00003 //Variable declarations.
00004 
00005 #define NUM_MICRO_SEC 1000000
00006 #define CLK_FREQUENCY 96000000
00007 #define CLK_FREQ_MICRO 96000000000000
00008 #define CLK_FRQ  96
00009 #define RESET_42 0xF0537000
00010 
00011 typedef struct time_val {
00012     time_t tv_sec;
00013     time_t tv_usec;
00014 } timeval;
00015 //timeval global_time;
00016 #define QUEUE_MAX 100
00017 
00018 
00019 
00020 
00021 Serial pc(USBTX, USBRX);
00022 Serial sync(p9,p10);
00023  Serial serial2(p13,p14); 
00024  
00025 InterruptIn trig(p29); 
00026 
00027 DigitalOut myled(LED1);
00028 DigitalOut myled2(LED2);
00029 DigitalOut toggle(p11);
00030 
00031 
00032 
00033 //FUNCTION DECLARATION
00034 int startTimer(void);
00035 int curTimeEqualGR(timeval *tv);
00036 void(*gtrigFunc)(timeval *tv);
00037 void Timer0_IRQHandler(void);
00038 void getTime(timeval *tv);
00039 void reportToggle(void);  
00040 
00041 
00042 #endif