Download VxWorks

Transcript
I
Writing a SCSI-2 Device Driver
*
* RETURNS: OK, or ERROR if parameters are out of range.
*/
STATUS xxxCtrlInit
(
FAST XXX_SCSI_CTRL *pSiop,
int scsiCtrlBusId
)
/* ptr to SCSI controller struct */
/* SCSI bus ID of this SCSI controller */
{
SCSI_CTRL * pScsiCtrl = (SCSI_CTRL *) pSiop;
/* initialize the SCSI controller */
xxxHwInit (pSiop);
/*
* Put the scripts I/O processor in a state whereby it is ready for
* selections or reselection from the SCSI bus. Such a state continues
* until either a selection or selection occurs or the driver interrupts
* the scripts processor and resets its program counter to begin
* execution elsewhere.
*/
xxxScriptStart (pSiop, (XXX_THREAD *) pScsiCtrl->pIdentThread,
XXX_SCRIPT_WAIT);
return (OK);
}
/***************************************************************************
*
* xxxHwInit - initialize the SCSI controller chip to a known state
*
* RETURNS: N/A
*/
LOCAL void xxxHwInit
(
FAST SIOP *pSiop
/* ptr to a SCSI controller info structure */
)
{
/* initialize hardware independent registers */
}
/***************************************************************************
*
* xxxScsiBusReset - assert the RST line on the SCSI bus
*
* Issue a SCSI Bus Reset command to the XXX SCSI controller. This should put
* all devices on the SCSI bus in an initial quiescent state.
*
* RETURNS: N/A
*/
341
I