⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 initiator_mode_tur.c

📁 基于FAS466的SCSI控制器的启动器模式的C源代码。
💻 C
字号:
#define	GLB extern

#include <stdio.h>
#include <conio.h>
#include <sys\types.h>
#include <sys\timeb.h>
#include <time.h>
#include <stdlib.h>
#include <string.h>
#include <dos.h>

#include "fas466defs.h"
#include "fas466regs.h"
#include "fas466globalvars.h"


void Initiator_Mode_tur()
{
 
	
	printf ("  test unit ready\n");
	
	RegWrite(SC_FIFO , 0x80) ;  // msg1
    RegWrite(SC_FIFO , 0x0) ;  // cdb1
	RegWrite(SC_FIFO , 0x0) ;  // cdb2
	RegWrite(SC_FIFO , 0x0) ;  // cdb3
	RegWrite(SC_FIFO , 0x0) ;  // cdb4
    RegWrite(SC_FIFO , 0x0) ;  // cdb5
	RegWrite(SC_FIFO , 0x0) ;  // cdb6

        verify (SC_FIFO_Count ,  0x7) ;
		printf("      Issue SelWAtn Command (1 messages)\n");
        RegWrite(SC_Command , SC_CMD_Select1_With_ATN_Seq );
		ExpCmdCmptStat = SC_Function_Complete ;	
		Cmd_Complete466();

        verify (SC_FIFO_Count, 0x0) ;

        // receive the status back
        RegWrite(SC_Command , SC_CMD_Xfer_Information_Non_DMA);
		ExpCmdCmptStat = SC_Function_Complete | SC_Bus_Service;	
		Cmd_Complete466();
		SC_Status = RegRead (SC_FIFO);

        RegWrite(SC_Command , SC_CMD_Xfer_Information_Non_DMA);
		ExpCmdCmptStat = SC_Function_Complete;	
		Cmd_Complete466();
		
        RegWrite(SC_Command , SC_CMD_Message_Accepted);
		ExpCmdCmptStat = SC_Function_Complete | SC_SCSI_Disconnect;	
		Cmd_Complete466();

        // remove the status/message byte from the fifo
        RegWrite(SC_Command , SC_CMD_Flush_FIFO);
		if (SC_Status == 02) 
			Initiator_Mode_req_sen ();

} // Initiator_Mode_tur

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -