root / lab4 / lab4.c @ 54
History | View | Annotate | Download (1.38 KB)
1 | 53 | up20180655 | #include <lcom/lcf.h> |
---|---|---|---|
2 | |||
3 | #include <stdint.h> |
||
4 | #include <stdio.h> |
||
5 | |||
6 | #include "mouse_func.h" |
||
7 | |||
8 | int main(int argc, char *argv[]) { |
||
9 | // sets the language of LCF messages (can be either EN-US or PT-PT)
|
||
10 | lcf_set_language("EN-US");
|
||
11 | |||
12 | // enables to log function invocations that are being "wrapped" by LCF
|
||
13 | // [comment this out if you don't want/need/ it]
|
||
14 | lcf_trace_calls("/home/lcom/labs/lab4/trace.txt");
|
||
15 | |||
16 | // enables to save the output of printf function calls on a file
|
||
17 | // [comment this out if you don't want/need it]
|
||
18 | lcf_log_output("/home/lcom/labs/lab4/output.txt");
|
||
19 | |||
20 | // handles control over to LCF
|
||
21 | // [LCF handles command line arguments and invokes the right function]
|
||
22 | if (lcf_start(argc, argv))
|
||
23 | return 1; |
||
24 | |||
25 | // LCF clean up tasks
|
||
26 | // [must be the last statement before return]
|
||
27 | lcf_cleanup(); |
||
28 | |||
29 | return 0; |
||
30 | } |
||
31 | |||
32 | |||
33 | int (mouse_test_packet)(uint32_t cnt) {
|
||
34 | 54 | up20180642 | return 1; |
35 | 53 | up20180655 | } |
36 | |||
37 | int (mouse_test_remote)(uint16_t period, uint8_t cnt) {
|
||
38 | /* To be completed */
|
||
39 | printf("%s(%u, %u): under construction\n", __func__, period, cnt);
|
||
40 | return 1; |
||
41 | } |
||
42 | |||
43 | int (mouse_test_async)(uint8_t idle_time) {
|
||
44 | /* To be completed */
|
||
45 | printf("%s(%u): under construction\n", __func__, idle_time);
|
||
46 | return 1; |
||
47 | } |
||
48 | |||
49 | 54 | up20180642 | int (mouse_test_gesture)(uint8_t x_len, uint8_t tolerance) {
|
50 | 53 | up20180655 | /* To be completed */
|
51 | printf("%s: under construction\n", __func__);
|
||
52 | return 1; |
||
53 | } |