Welcome to the EyeBot  Version 7 - RPi1
A Controller For Various Hardware IO
header.h
Go to the documentation of this file.
1 
6 #define MAX_FILECHAR 400
7 #define MAX_USERPROG 32
8 #define MAX_FULLPATH 320
9 #define MAX_MSGLEN 128
10 
11 #define MAX_COOLTIME 300000 /* usec */
12 #define MAX_WAITTIME 250000 /* usec */
13 #define MAX_WAITKILL 100000 /* usec */
14 #define MSG_WAITTIME 2 /* sec */
15 #define TOUCH_IDLETIME_USEC 250000
16 #define LOOPSLEEPTIME 250000
17 
18 
19 // shared functions
20 int LCDRefresh (void);
21 int LCDRefresh2(void);
22 int LCDRefresh3(void);
23 void processMenu();
24 int show_msg(const char *format, ...);
25 
29 typedef struct PROC_PROC
30 {
31  pid_t pid;
32  char name[MAX_FILECHAR];
33  struct PROC_PROC *pnext; /* linked list */
34 }
35 PROC_PROC;
36 
40 typedef struct PROC_PROCLIST
41 {
42  int count; /* max is MAX_USERPROG */
43  PROC_PROC *pfirst, *plast;
44 }
46 
50 typedef struct
51 {
52  int irEnable;
53  int irDelay;
54  int irCode;
55  int runProg;
56  int runROBIOS;
57  char* ssid;
58  char* password;
59  char* progName;
61 
62 //system screen functions
63 int page_system(void);
64 int system_exit();
65 int system_network();
66 int system_info();
67 
68 //demo screen functions
69 int demoPage(void);
70 
71 //software screen functions
72 int show_exec(void);
73 
74 //hardware screen functions
75 int show_hdt(void);
76 
77 //process functions
78 pid_t add_process(PROC_PROC *);
79 int chk_process(void);
80 PROC_PROC* del_process(pid_t);
81 PROC_PROC* get_process(pid_t);
82 int procmenu(pid_t);
83 int load_proc(LIST_MENU *);
84 void sigchld_handler(int);
85 void runProcess(char *);
86 
87 //common functions
88 void IRScrollUp(void);
89 void IRScrollDown(void);
90 char *keyboardInput(void);
91 void trimline(char *src);
92 
93 //global variables
94 extern PROC_PROCLIST proclist;
95 extern KEYCODE keycode;
96 extern int screenRefresh;
97 extern ROBIOS_PARAMS robiosParams;
98 
99 //thread variables
100 extern pthread_t threadKeyInput;
101 extern pthread_t threadIRInput;
102 extern pthread_t threadScreenRefresh;
103 
int LCDRefresh2(void)
Refresh the screen (i.e write display buffers to the framebuffer device). Does not refresh the menu...
Definition: lcd.c:1480
int LCDRefresh(void)
Refresh the screen (i.e write display buffers to the framebuffer device). Refreshes the menu...
Definition: lcd.c:1460
Structure defining a menu.
Definition: types.h:232
struct PROC_PROC PROC_PROC
Structure defining the processes.
int LCDRefresh3(void)
Refresh the screen (i.e write display buffers to the framebuffer device). Does not refresh the menu o...
Definition: lcd.c:1499
Structure defining the params for the GUI.
Definition: header.h:50
Structure defining the processes.
Definition: header.h:29
pid_t add_process(PROC_PROC *)
Definition: processes.c:63
Structure defining the process list.
Definition: header.h:40
void trimline(char *src)
trims the string by exchanging the first newlin char with the null byte
Definition: system.c:14
struct PROC_PROCLIST PROC_PROCLIST
Structure defining the process list.