Welcome to the EyeBot  Version 7 - RPi1
A Controller For Various Hardware IO
timer.h
Go to the documentation of this file.
1 
7 #ifndef TIMER_H_
8 #define TIMER_H_
9 
10 #include "types.h"
11 #include <sys/time.h>
12 #include <stdio.h>
13 #include <signal.h>
14 #include <stdlib.h>
15 #include <wiringPi.h>
16 
17 typedef int Timer;
18 
19 int OSWait(int n); // Wait for n/1000 sec
20 Timer OSAttachTimer(int scale, void (*fct)(void)); // Add fct to 1000Hz/scale timer
21 int OSDetachTimer(Timer handle); // Remove fct from 1000Hz/scale timer
22 int OSSetTime(int hrs,int mins,int secs); // Set system time
23 int OSGetTime(int *hrs,int *mins,int *secs,int *ticks); // Get system time (ticks in 1/1000 sec)
24 int OSShowTime(void); // Print time on LCD
25 int OSGetCount(void); // Count in 1/1000 sec since system start
26 
27 
28 #endif /* TIMER_H_ */
int OSDetachTimer(Timer handle)
removes the Timer from the list
Definition: timer.c:107
Defines types used for the EyeBot 7.
int OSGetCount(void)
gives you the count in 1/100 sec since the system start
Definition: timer.c:173
int OSSetTime(int hrs, int mins, int secs)
sets the system time
Definition: timer.c:121
int OSGetTime(int *hrs, int *mins, int *secs, int *ticks)
Get system time (ticks in 1/100 sec)
Definition: timer.c:141
int OSShowTime(void)
prints the time on the command line
Definition: timer.c:159
Timer OSAttachTimer(int scale, void(*fct)(void))
adds a function to a 1kHz/scale timer, ie. executes every 1ms*scale usage: OSAttachTimer(, &);
Definition: timer.c:84
int OSWait(int n)
Waits for 1 ms.
Definition: timer.c:72