02.03.2014 Views

BSP Developer's Guide

BSP Developer's Guide

BSP Developer's Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

VxWorks 5.5<br />

<strong>BSP</strong> Developer’s <strong>Guide</strong><br />

The Programming Interface<br />

A well-defined programming interface exists between the controller driver of any<br />

basic SCSI controller and the SCSI libraries. Every basic controller driver must<br />

provide the following functions to the SCSI libraries:<br />

xxxDevSelect( )<br />

This routine selects a SCSI peripheral device with the Attention (ATN) signal<br />

asserted.<br />

xxxInfoXfer( )<br />

All information transfer phases are handled by this routine, including the<br />

DATA_IN, DATA_OUT, MSG_IN, MSG_OUT, and STATUS phases.<br />

xxxXferParamsQuery( )<br />

This routine updates the synchronous data transfer parameters to match the<br />

capabilities of the driver and returns the optimal synchronous offset and<br />

period.<br />

xxxXferParamsSet( )<br />

This routine sets the synchronous data transfer parameters on the SCSI<br />

controller.<br />

xxxBusControl( )<br />

This routine controls some of the SCSI bus lines from the controller. This<br />

routine must reset the SCSI bus, assert ATN, or negate ACK.<br />

Similarly, the controller driver invokes the following routines in order to get SCSI<br />

library services:<br />

scsiCtrlInit( )<br />

This routine initializes the SCSI library data structures. It is called only once<br />

per SCSI controller.<br />

scsiMgrEventNotify( )<br />

This routine notifies the SCSI manager of a SCSI event that has occurred.<br />

Events are defined in scsi2Lib.h. However, more events can be defined by the<br />

controller driver, and events can also be bundled by the driver. In this case, the<br />

SCSI_CTRL field scsiEventProc must be set to this driver-specific routine<br />

during driver initialization.<br />

326

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

Saved successfully!

Ooh no, something went wrong!