one hour slave program this waits for entry from master and initialize queue in the begninng and execute the data.
Diff: decl.h
- Revision:
- 0:6be670be8b35
diff -r 000000000000 -r 6be670be8b35 decl.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/decl.h Sat Dec 04 06:09:47 2010 +0000 @@ -0,0 +1,40 @@ +#ifndef _DECL_ +#define _DECL_ +//Variable declarations. + +#define NUM_MICRO_SEC 1000000 +#define CLK_FREQUENCY 96000000 +#define CLK_FREQ_MICRO 96000000000000 +#define CLK_FRQ 96 +#define RESET_42 0xF0537000 + +typedef struct time_val { + time_t tv_sec; + time_t tv_usec; +} timeval; +//timeval global_time; +#define QUEUE_MAX 100 + + +typedef signed long long llong; + +Serial pc(USBTX, USBRX); +Serial sync(p9,p10); +Serial serial2(p13,p14); + + +DigitalOut myLED(LED1); +DigitalOut myled2(LED2); +InterruptIn trig(p16); +DigitalOut toggle(p16); +Ticker synch; + +//FUNCTION DECLARATION +int startTimer(void); +int curTimeEqualGR(timeval *tv); +void(*gtrigFunc)(timeval *tv); +void Timer0_IRQHandler(void); +void getTime(timeval *tv); + + +#endif \ No newline at end of file