Project

General

Profile

Statistics
| Revision:

root / lab4 / lab4.c @ 13

History | View | Annotate | Download (1.5 KB)

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