Revision 54
fixed minor errors
lab4/Makefile | ||
---|---|---|
2 | 2 |
PROG=lab4 |
3 | 3 |
|
4 | 4 |
# source code files to be compiled |
5 |
SRCS = lab4.c |
|
5 |
SRCS = lab4.c mouse_func.c utils.c
|
|
6 | 6 |
|
7 | 7 |
# additional compilation flags |
8 | 8 |
# "-Wall -Wextra -Werror -I . -std=c11 -Wno-unused-parameter" are already set |
lab4/errors.h | ||
---|---|---|
2 | 2 |
#define _ERRORS_H_ |
3 | 3 |
|
4 | 4 |
enum errors { |
5 |
SUCESS = 0, /* @brief Sucessful */
|
|
5 |
SUCCESS = 0, /* @brief Sucessful */
|
|
6 | 6 |
NULL_PTR, /* @brief Null Pointer Error */ |
7 | 7 |
LCF_ERROR, /* @brief Error originated on LCF */ |
8 | 8 |
SBCR_ERROR, /* @brief Error on Subscribing Interrupt */ |
lab4/lab4.c | ||
---|---|---|
31 | 31 |
|
32 | 32 |
|
33 | 33 |
int (mouse_test_packet)(uint32_t cnt) { |
34 |
return 1; |
|
34 | 35 |
} |
35 | 36 |
|
36 | 37 |
int (mouse_test_remote)(uint16_t period, uint8_t cnt) { |
... | ... | |
45 | 46 |
return 1; |
46 | 47 |
} |
47 | 48 |
|
48 |
int (mouse_test_gesture)() { |
|
49 |
int (mouse_test_gesture)(uint8_t x_len, uint8_t tolerance) {
|
|
49 | 50 |
/* To be completed */ |
50 | 51 |
printf("%s: under construction\n", __func__); |
51 | 52 |
return 1; |
lab4/mouse_func.h | ||
---|---|---|
1 |
##ifndef _MOUSE_FUNC_H_
|
|
1 |
#ifndef _MOUSE_FUNC_H_ |
|
2 | 2 |
#define _MOUSE_FUNC_H_ |
3 | 3 |
|
4 | 4 |
#include <stdint.h> |
... | ... | |
21 | 21 |
*/ |
22 | 22 |
int (unsubscribe_interrupt)(int *interrupt_id); |
23 | 23 |
|
24 |
|
|
25 |
|
|
26 | 24 |
#endif /* end of include guard: _MOUSE_FUNC_H_ */ |
Also available in: Unified diff