Project

General

Profile

Statistics
| Revision:

root / lab5 / lab5.c @ 93

History | View | Annotate | Download (2.25 KB)

1
#include <lcom/lcf.h>
2

    
3
#include <lcom/lab5.h>
4

    
5
#include <stdint.h>
6
#include <stdio.h>
7

    
8
// Any header files included below this line should have been created by you
9

    
10
int main(int argc, char *argv[]) {
11
  // sets the language of LCF messages (can be either EN-US or PT-PT)
12
  lcf_set_language("EN-US");
13

    
14
  // enables to log function invocations that are being "wrapped" by LCF
15
  // [comment this out if you don't want/need it]
16
  lcf_trace_calls("/home/lcom/labs/lab5/trace.txt");
17

    
18
  // enables to save the output of printf function calls on a file
19
  // [comment this out if you don't want/need it]
20
  lcf_log_output("/home/lcom/labs/lab5/output.txt");
21

    
22
  // handles control over to LCF
23
  // [LCF handles command line arguments and invokes the right function]
24
  if (lcf_start(argc, argv))
25
    return 1;
26

    
27
  // LCF clean up tasks
28
  // [must be the last statement before return]
29
  lcf_cleanup();
30

    
31
  return 0;
32
}
33

    
34
int(video_test_init)(uint16_t mode, uint8_t delay) {
35
  /* To be completed */
36
  printf("%s(0x%03x, %u): under construction\n", __func__, mode, delay);
37

    
38
  return 1;
39
}
40

    
41
int(video_test_rectangle)(uint16_t mode, uint16_t x, uint16_t y,
42
                          uint16_t width, uint16_t height, uint32_t color) {
43
  /* To be completed */
44
  printf("%s(0x%03X, %u, %u, %u, %u, 0x%08x): under construction\n",
45
         __func__, mode, x, y, width, height, color);
46

    
47
  return 1;
48
}
49

    
50
int(video_test_pattern)(uint16_t mode, uint8_t no_rectangles, uint32_t first, uint8_t step) {
51
  /* To be completed */
52
  printf("%s(0x%03x, %u, 0x%08x, %d): under construction\n", __func__,
53
         mode, no_rectangles, first, step);
54

    
55
  return 1;
56
}
57

    
58
int(video_test_xpm)(xpm_map_t xpm, uint16_t x, uint16_t y) {
59
  /* To be completed */
60
  printf("%s(%8p, %u, %u): under construction\n", __func__, xpm, x, y);
61

    
62
  return 1;
63
}
64

    
65
int(video_test_move)(xpm_map_t xpm, uint16_t xi, uint16_t yi, uint16_t xf, uint16_t yf,
66
                     int16_t speed, uint8_t fr_rate) {
67
  /* To be completed */
68
  printf("%s(%8p, %u, %u, %u, %u, %d, %u): under construction\n",
69
         __func__, xpm, xi, yi, xf, yf, speed, fr_rate);
70

    
71
  return 1;
72
}
73

    
74
int(video_test_controller)() {
75
  /* To be completed */
76
  printf("%s(): under construction\n", __func__);
77

    
78
  return 1;
79
}