Specifications

Sample Driver Code 57
for the E271-2202 controller and other adapters. See E271-2202 Installation,
page 32, for more information.
SAMPLE DRIVER CODE
The rest of this chapter provides sample application and driver code for SmartSet
touchscreen controllers. The example code is written in ANSI C and organized in
modules as follows:
Figure 5-3. Example Code Organization
EXAMPLE1.C and EXAMPLE2.C are sample applications. Each uses high-level
interface-independent controller interface functions in PACKET.C, such as
querycommand() and setcommand(). The interface-dependent functions are
supplied in SERIAL.C for the E271-2200 or E271-2210 serial controllers, or
BUS.C for the E271-2201 PC-Bus controller and the E271-2202 Micro Channel
controller.
BUS.C contains some code that is Micro Channel specific. This code is
commented for easily deletion if support on this architecture is not required.
SERIAL.C is written to be machine-independent. The PC-dependent serial port
configuration and character input/output code is given in PC_COMM.C.
PC_MISC.C contains miscellaneous PC-dependent code to clear the screen, hide
the cursor, etc. PC_COMM and PC_MISC can be rewritten for other
architectures. Source code for all modules is included in this chapter, except for
PC_COMM.C and PC_MISC.C. All source code can be found on the Companion
Disk.