GTCO CR 1212 - Users Guide User Manual

Page 32

Advertising
background image

CR 1212 32


Chapter 5: Guidelines for Writing a Device Driver

For the computer to make use of the data being sent to it from the tablet, the software
(system or application) must contain a tablet device driver. The driver needs to be written
for your specific CR 1212 configuration (Bit Pad One, Bit Pad Two or CR). The device driver
is a program that collects and decodes the tablet data.

The driver usually sits between the application and serial interface. The driver should be
able to:

Receive reports and status information from the tablet via the serial interface

Transmit data to the application

Present high level commands from the application that control the tablet

A typical driver consists of four major parts:

Configure Host and Tablet

o

Structure the host communications port (port address, baud rate, etc.)

o

Shape the tablet (resolution, report mode, etc.)

Report Collection – Interrupt Routines

o

Assemble the report: collect the report’s data bytes into an array

o

Check for errors

Process Reports from the Tablet

o

Decode the report

o

Filter reports, if required by the application

o

Notify the application, if applicable, that a report is ready to be issued to the
application

Process Errors

o

Parity errors

o

Short report errors after time-out

o

Long report errors

o

Missing report errors after time-out

o

Host buffer full errors (automatic XON/XOFF support)

Advertising