02.03.2014 Views

vxworks programmer's guide.pdf - DAQ Plone Site

vxworks programmer's guide.pdf - DAQ Plone Site

vxworks programmer's guide.pdf - DAQ Plone Site

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

D<br />

Intel x86<br />

! CAUTION: This structure applies to both ATA PCMCIA PC cards and local IDE<br />

hard disks. For the definition of PCCARD_RESOURCE, see PCMCIA for x86 Release<br />

Notes and Supplement.<br />

Line Printer Driver<br />

This release of VxWorks for the x86 supports write operations to an LPT line<br />

printer driver.<br />

To include the line printer driver in your configuration, select the macro<br />

INCLUDE_LPT for inclusion in the project facility VxWorks view. When<br />

INCLUDE_LPT is included, the initialization routine lptDrv( ) is called<br />

automatically from usrRoot( ) in usrConfig.c.<br />

The resource table used by lptDrv( ) is stored in the structure lptResource[] in<br />

sysLib.c. The resources are defined as follows:<br />

int ioBase; /* IO base address */<br />

int intVector; /* interrupt vector */<br />

int intLevel; /* interrupt level */<br />

BOOL autofeed; /* TRUE if enable autofeed */<br />

int busyWait; /* loop count for BUSY wait */<br />

int strobeWait; /* loop count for STROBE wait */<br />

int retryCnt; /* timeout second for syncSem */<br />

D<br />

lptDrv( )takes two arguments. The first argument is the number of channels (0, 1,<br />

or 2). The second argument is a pointer to the resource table.<br />

To change lptDrv( )’s interrupt vector or interrupt level, change the value of the<br />

appropriate constant (LPT_INT_VEC or LPT_INT_LVL) in pc.h.<br />

Many of the LPT driver’s routines are accessible only through the I/O system.<br />

However, the following routines are available (see the manual pages for details):<br />

lptDevCreate( )<br />

installs an LPT device into VxWorks. Call lptDevCreate( ) explicitly for each<br />

LPT device you wish to install; it is not called automatically. This routine takes<br />

the following parameters:<br />

name = device name<br />

channel = physical device channel (0, 1, or 2)<br />

lptAutofeed( )<br />

enables or disables the autofeed feature; takes the parameter channel (0, 1, or 2).<br />

475

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!