Assume the following hardware device is connected to the parallel port of the PC, with the data lines to the data bits (D0-D7), and the three decoding + one chip-select/enable lines to four control lines of the PC port.

The exact pinout is to be established in the lab.
Notes:
The software must be easily portable to an embedded platform based on
the MPC555 processor running OSEKWorks (OSEK/VDX compliant RTOS).
Hints:
Separate platform specific code such as IO Port
addresses, bitmasks, timing code, in platform specific sections using
macros (#define, #ifdef), or similar techniques. Testing sensors could
be implemented as simple functions that return a random number.