各位大哥大姐:
小弟正在做Vxworks下的USB HOST驱动,片子是AT91ARM9200,基本的配置已经完成,BSP编译通过,但是编译Bootable工程时,出现错误,错误如下:
F:\Tornado2.2\target\h\usb2\usbOhci.h: At top level:
F:\Tornado2.2\target\h\usb2\usbOhci.h:126: parse error before `usbOhciInit'
F:\Tornado2.2\target\h\usb2\usbOhci.h:126: warning: data definition has no type or storage
class
希望各位大侠,各位大哥大姐能帮忙解决一下!!!
usbOhci.h,usbOhci.c文件如下:
/* usbOhci.h - OHCI host controller driver interface definition */
/* Copyright 2004 Wind River Systems, Inc.
This software includes software licensed to Wind River Systems, Inc.
by Wipro, Ltd. Wind River licensees may use this software according
to the terms of their Wind River license agreement(s) applicable to
this software.
*/
/*
modification history
--------------------
01d,18aug04,hch remove the DMA_MALLOC and DMA_FREE macro
01c,16jul04,hch adding OHCI PCI class definition
01b,26jun03,nld Changing the code to WRS standards
01a,17mar03,ssh Initial Version
*/
/*
DESCRIPTION
This file contains the constants, data structures and functions exposed by the
OHCI host controller driver.
*/
/*
INTERNAL
*******************************************************************************
* Filename : OHCI.h
*
* Copyright :
*
* THE COPYRIGHT IN THE CONTENTS OF THIS SOFTWARE VEST WITH WIPRO
* LIMITED A COMPANY INCORPORATED UNDER THE LAWS OF INDIA AND HAVING
* ITS REGISTERED OFFICE AT DODDAKANNELLI SARJAPUR ROAD BANGALORE
* 560 035. DISTRIBUTION OR COPYING OF THIS SOFTWARE BY
* ANY INDIVIDUAL OR ENTITY OTHER THAN THE ADDRESSEE IS STRICTLY
* PROHIBITED AND MAY INCUR LEGAL LIABILITY. IF YOU ARE NOT THE
* ADDRESSEE PLEASE NOTIFY US IMMEDIATELY BY PHONE OR BY RETURN EMAIL.
* THE ADDRESSEE IS ADVISED TO MAINTAIN THE PROPRIETARY INTERESTS OF
* THIS COPYRIGHT AS PER APPLICABLE LAWS.
*
*
* Description : This file contains the constants, data structures and
* functions exposed by the OHCI host controller driver.
*
*
******************************************************************************/
#ifndef __INCusbOhcih
#define __INCusbOhcih
#ifdef __cplusplus
extern "C" {
#endif
/* includes */
/* WindView Instrumentation */
#include "usbHcdInstr.h"
#include <cacheLib.h>
/* defines */
/* OpenHCI PCI class defintion */
#define OHCI_CLASS 0x0c /* BASEC value for serial bus */
#define OHCI_SUBCLASS 0x03 /* SCC value for USB */
#define OHCI_PGMIF 0x10 /* OpenHCI */
/* To hold the speed of the device (BEGIN) */
/* To hold the value for the full speed devices */
#define USB_OHCI_DEVICE_FULL_SPEED 0x00
/* To hold the value for the low speed devices */
#define USB_OHCI_DEVICE_LOW_SPEED 0x01
/* To hold the speed of the device (END) */
/* Macros used for mapping memory - Start */
#define USB_OHCD_MEM_TO_PCI(address) \
(((address) == NULL) ? 0 : usbMemToPci((VOID*)address))
#define USB_OHCD_PCI_TO_MEM(address) \
(((address) == 0) ? 0 : usbPciToMem((UINT32)address))
/* Macros used for mapping memory - End */
/* Size of DMA memory */
#define DMA_MEMORY_SIZE 0x100000
extern PART_ID dmaPartId;
#define OHCI_MALLOC(MEMORY_SIZE, ALIGNMENT) \
memPartAlignedAlloc (dmaPartId, MEMORY_SIZE, ALIGNMENT)
#define OHCI_FREE(pBfr) memPartFree (dmaPartId, (char *) pBfr)
#define DMA_FLUSH(pBfr, bytes) CACHE_DMA_FLUSH (pBfr, bytes)
#define DMA_INVALIDATE(pBfr, bytes) CACHE_DMA_INVALIDATE (pBfr, bytes)
#define USER_FLUSH(pBfr, bytes) CACHE_USER_FLUSH (pBfr, bytes)
#define USER_INVALIDATE(pBfr,bytes) CACHE_USER_INVALIDATE (pBfr, bytes)
#define OHCI_STATUS INT8
#define OHCI_SUCCESS ((INT8) 0)
#define OHCI_FAILURE ((INT8) -12)
/* function declarations */
/*******************************************************************************
* Function Name : usbOhciInit
* Description : Function to initialise the OHCI Host Controller Driver.
* This function detects the number of OHCI Controllers
* present on the system and initializes all the OHCI
* controllers.
* Parameters : None.
* Return Type : Returns TRUE if the OHCI Host Controllers are initialized
* successfully. Else returns FALSE.
******************************************************************************/
/*显示此处错误*/
BOOLEAN usbOhciInit (void);
/*******************************************************************************
* Function Name : usbOhciExit
* Description : Function to uninitialise the OHCI Host Controller Driver.
* Parameters : None.
* Return Type : Returns TRUE if all the OHCI Controllers are reset and
* the cleanup is successful. Else returns FALSE.
******************************************************************************/
BOOLEAN usbOhciExit (void);
#ifdef __cplusplus
}
#endif
#endif /* __INCusbOhcih */
/* End of file usbOhci.h */