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

📄 usrusbinit.c

📁 T2.0 USB driver.rar T2.0 USB driver.rar
💻 C
字号:
/* usrUsbInit.c - Initialization of the USB Host stack *//* Copyright 1999-2000 Wind River Systems, Inc. *//*Modification history--------------------01b,27feb00,wef	 removed unecessary printfs, fixed return codes 01a,23aug00,wef	 Created*//*DESCRIPTIONThis configlette initializes a USB Host Stack.  This process is done atboot and is usually followed by the attachment of a USB host controller.The configlette usrUsbHcdInit.c handles the host controller attachement.*//* includes */#include "usb/usbdLib.h"/* defines *//* locals */LOCAL BOOL usbdInitByKernel = FALSE;/******************************************************************************* usbInit - initialize the USB stack** This function initializes the USB Stack ** RETURNS: OK if sucessful or ERROR if failure*/STATUS usbInit (void)     {    UINT16 verStatus;    UINT16 usbdVersion;    char   usbdMfg [USBD_NAME_LEN+1];    if (!usbdInitByKernel)        {        if (usbdInitialize() != OK)       	    {            printf(" Failed to initialize USBD\n");            return ERROR;            }        else             {            usbdInitByKernel = TRUE;            printf("USBD Initialized.\n");            }        }    else         {        printf("USDB Already Initialized\n");        }        if ((verStatus = usbdVersionGet (&usbdVersion, usbdMfg)) != OK)        {        printf ("usbdVersionGet() failed..returned %d\n", verStatus);	return ERROR;        }    return OK;    }

⌨️ 快捷键说明

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