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

📄 cmd_complete466.c

📁 基于FAS466的SCSI控制器的启动器模式的C源代码。
💻 C
字号:
/*
	;*************************************************************************************
	; Program Name	: Cmd_Complete466.etb					                             *
	;				     						     									 *
	; Function		: This program will be used to inquire for the Command complete		 *
	;				  Interrupt each time the SCSI Command is issued.                    *
	; Date			: October 07, 1998						     						 *
	;									             									 *
	; Written by 	: Hai Le						     								 *	    
	;*************************************************************************************    
*/
#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 Cmd_Complete466()
{
 	unsigned char bc_loop = 0;
 	unsigned long Cmd_cmpt_stat = 0;
 	unsigned long CmdCmptLoopCount = 0;
 	unsigned char SC_Cmd_Read = 0;
 
	do	{
		Cmd_cmpt_stat = RegRead(SC_Command_Interrupt_Status);
		CmdCmptLoopCount = CmdCmptLoopCount + 1;
	} while ((Cmd_cmpt_stat == 0) & (CmdCmptLoopCount < 0x40000 ));
	Cmd_cmpt_stat = RegRead(SC_Command_Interrupt_Status);
				if ( Cmd_cmpt_stat == 0x88) {
					CmdCmptLoopCount = 0x40000;
				}

	  
	if (Cmd_cmpt_stat != ExpCmdCmptStat) {
		if (Cmd_cmpt_stat == 0x40) 
		RegWrite(SC_Command , 0x70) ;     // BSY glitch workaround
		else
		{
		printf("  **** Unexpected Command interrupt Status! = %0x\n",Cmd_cmpt_stat);
		printf("  SC_Command = %0x\n", RegRead (SC_Command));
		printf("  SC_Command_Interrupt_Status = %0x\n", RegRead(SC_Command_Interrupt_Status));
		printf("  Error interrupt Status! = %0x\n", RegRead (SC_Error_Interrupt_Status));
		printf("  SC_FIFO_Count = %0x\n", RegRead (SC_FIFO_Count));
		if (RegRead (SC_FIFO_Count) != 0)
		{
		printf("  SC_FIFO = %0x\n", RegRead (SC_FIFO));
		printf("  SC_FIFO = %0x\n", RegRead (SC_FIFO));
		printf("  SC_FIFO = %0x\n", RegRead (SC_FIFO));
		}
		
		VerifyError++;
		do {}
		while (1);
		}
	}
}

⌨️ 快捷键说明

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