Write in the C programming language several functions that use the PS/2's mouse low level interface. The key functionality to implement is:
With respect to the first task, the communication between the keyboard controller (KBC) interrupt handler and the part of your program that displays the packets should use a simple array whose elements are of type unsigned char
and a counter variable of type unsigned short
that keeps track of the bytes received.
Like in Lab 3 you are not given the prototypes of the functions to implement: the specification of these functions is part of your job. However, to make the task of grading your assignment feasible you are required to implement the following testing functions:
These functions are declared in header file test4.h, and file test4.c contains their implementation stubs. You may find it convenient to add your test code to that file; this way you will avoid mistakes in their definition. Section 5 describes what these functions should do.
IMP. In addition to these files, you should submit the file lab4.c, which should be similar to lab2.c
, and will be used to grade the flexibility of your test code. Nevertheless, we will use our own main()
function to test your code, therefore you must ensure that your implementation is consistent with the function declarations in test4.h.
So that you can accomplish this lab's objectives, you should do some homework, i.e. some work before the lab class. In addition to read, and understand, this handout and the class notes, you should:
You may wish to read the information provided in Section 8 about some SVN commands that may be useful to perform these actions.