ir driver tool for testing ir memory
[henge/webcc.git] / src / bin / tools / testir.c
1 /*!@file
2 \brief IR Driver
3 \details This is a testing driver for the IR system of APC.
4 \author Jordan Lavatai
5 \date Aug 2016
6 ----------------------------------------------------------------------------*/
7 /* Standard */
8 #include <stdio.h> //print
9 /* Internal */
10 #include <apc/ir.h> //link to IR
11
12 /* Ansi Term Colors */
13 #define RED "\x1b[31m"
14 #define GREEN "\x1b[32m"
15 #define YELLOW "\x1b[33m"
16 #define BLUE "\x1b[34m"
17 #define MAGENTA "\x1b[35m"
18 #define CYAN "\x1b[36m"
19 #define CLRX "\x1b[0m" //clear current color
20
21 extern //ir.c
22 void ir_quit(void);
23 extern
24 int ir_init(void);
25 extern
26
27
28 int main(void);
29 int test_init(void);
30
31 int
32 main
33 ()
34 { test_init();
35 return 0;
36 }
37
38 int
39 test_init
40 ()
41 { /* Test Init */
42 printf("YELLOW Initializing\n");
43 if (ir_init())
44 { printf("RED FAILED CLRX");
45 perror("ir init");
46 return 1;
47 }
48 printf("Quitting CLRX\n");
49 ir_quit();
50 printf("GREEN PASS");
51 return 0;
52 }
53
54