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

📄 hchandle.c

📁 此為philip 1362 USB DOS下的驅動程式包, 已經共測試並內含有說明文件
💻 C
字号:
/*
   //*************************************************************************
   //
   //                  P H I L I P S   P R O P R I E T A R Y
   //
   //           COPYRIGHT (c)   2000-2002 BY PHILIPS SINGAPORE.
   //                     --  ALL RIGHTS RESERVED  --
   //
   // File Name:	HcHandle.C
   // Created:		Jun. 8, 2000
   // Modified:		Jun. 6, 2002 by wang.zhong.wei@philips.com
   // Revision:		1.0
   //
   //*************************************************************************
   //
 //*************************************************************************
*/

#include <stdio.h>
#include <string.h>

#include <bios.h>
#include <dos.h>

#include "BasicTyp.h"
#include "common.h"
#include "SysCnfg.h"

#include "USB100.h"

#include "Hal4sys.h"
#include "Hal4ISA.h"
#include "Hal4IKit.h"
#include "Hal4Hc.h"
#include "Hal4D13.h"

#include "PHC_Reg.h"
#include "PHC_HcS.h"

#include "UsbStd.h"

#include "Hal4OTG.h"
#include "OTGSvc.h"
#include "HcHandle.h"

extern OTG_TCB 			OtgTcb;



void Hc_Handler(void)
{
	BOOLEAN Enum_Flag;

	Enum_Flag = HcS_EnumPHCDevs();		// Enumerate the Device
	if(TRUE == Enum_Flag)
	{
		printf("OTG Port: Device enumeration successful!\n");
		printf("  - Vendor ID: %4X,  Product ID: %4X\n",OtgTcb.VendorID,OtgTcb.ProductID);
		if(OtgTcb.id == 0)
		{
			if(OtgTcb.b_hnp_support == TRUE)
			{
				printf("  - Remote Device is HNP/SRP support!\n");
				printf("OTG Port: Set_feature b_hnp_enable ... ");

				if(TRUE == OTGSup_ADevGiveupMastership())
					printf("done\n");
				else
					printf("failed\n");

			}
			else if(OtgTcb.b_srp_support == TRUE)
				printf("  - Remote Device is SRP support!\n");
			else
				printf("  - Remote Device is peripheral only!\n");
		}

	}
	else
	{
		printf("OTG Port: Device enumeration failed!\n");
	}

	if(OtgTcb.bus_req == 1)
	{
		printf("Press 'R' to clear bus_req!\n");
//		OtgTcb.bus_req = 0;
	}

	OtgTcb.a_host_done = 1;
}

⌨️ 快捷键说明

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