Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
USBHost.h
Package: SDK_M5661.rar [view]
Upload User: hjhsjcl
Upload Date: 2020-09-25
Package Size: 11378k
Code Size: 5k
Category:
Compress-Decompress algrithms
Development Platform:
C++ Builder
- /*******************************************************************
- *
- * Copyright (C) 2002 ALI Corporation. All Rights Reserved.
- *
- * File: Uhc.h
- *
- * Contents: define functions in Uhc.c
- *
- * History:
- * Date By Reason
- * =========== ======= ====================
- * 12/26/2002 stonezhu development
- * 23/06/2003 Steven modified
- * 17/10/2003 Steven modified
- *******************************************************************/
- //add by tne for USB write protect
- //#define CMD_MODE_SENSE_10 0x5A
- #define NULL 0
- #ifdef _USB_HOST_H_
- #define EXTERN
- #else
- #define EXTERN extern
- #endif
- //const
- //DMA Control/Status Resigter
- #define BULK_EN 0x80
- #define BULK_DISJ 0x7F
- #define BULK_OUT 0x40
- #define BULK_INJ 0xB0
- #define HOST_STOP 0x20
- #define HOST_STOP_DISJ 0xDF
- #define FIFO_CLR_DIS 0x10
- #define FIFO_CLR_ENJ 0xEF
- #define FRC_EOT 0x08
- #define BUF_EMPTY 0x04
- // usb Host Enable/Disable interupt
- #define ENABLE_USB_CONNECTION 0x01
- #define ENABLE_USB_RESET 0x02
- #define ENABLE_USB_SUSPEND 0x04
- #define ENABLE_USB_PORT_ERROR 0x08
- #define ENABLE_USB_SOF 0x10
- #define ENABLE_USB_DMA_FINISH 0x20
- #define ENABLE_EPC_FINISH_ERROR 0x01
- #define ENABLE_EPB_FINISH_ERROR 0x02
- #define ENABLE_EPA_FINISH_ERROR 0x04
- #define ENABLE_EP0_FINISH_ERROR 0x08
- #define ENABLE_EPC_FINISH_OK 0x10
- #define ENABLE_EPB_FINISH_OK 0x20
- #define ENABLE_EPA_FINISH_OK 0x40
- #define ENABLE_EP0_FINISH_OK 0x80
- #define DISABLE_USB_CONNECTION 0xFE
- #define DISABLE_USB_RESET 0xFD
- #define DISABLE_USB_SUSPEND 0xFB
- #define DISABLE_USB_PORT_ERROR 0xF7
- #define DISABLE_USB_SOF 0xEF
- #define DISABLE_USB_DMA_FINISH 0xDF
- #define DISABLE_EPC_FINISH_ERROR 0xFE
- #define DISABLE_EPB_FINISH_ERROR 0xFD
- #define DISABLE_EPA_FINISH_ERROR 0xFB
- #define DISABLE_EP0_FINISH_ERROR 0xF7
- #define DISABLE_EPC_FINISH_OK 0xEF
- #define DISABLE_EPB_FINISH_OK 0xDF
- #define DISABLE_EPA_FINISH_OK 0xBF
- #define DISABLE_EP0_FINISH_OK 0x7F
- // Endpoint Fifo Control Register
- #define EP0_FIFO_EMPTY 0x80
- #define EP0_FIFO_FULL 0x40
- #define EP0_FIFO_FORCE_SEND 0x20
- #define EP0_FIFO_CLEAR 0x10
- #define EP0_FIFO_NORMAL 0xEF
- #define EP0_FIFO_PID_SETUP 0x00
- #define EP0_FIFO_PID_OUT 0x01
- #define EP0_FIFO_PID_IN 0x02
- #define EP0_FIFO_PID_CLEAR 0xFC
- #define EPA_FIFO_EMPTY 0x80
- #define EPA_FIFO_FULL 0x40
- #define EPA_FIFO_FORCE_SEND 0x20
- #define EPA_FIFO_CLEAR 0x10
- #define EPA_FIFO_NORMAL 0xEF
- #define EPB_FIFO_EMPTY 0x80
- #define EPB_FIFO_FULL 0x40
- #define EPB_FIFO_FORCE_IN 0x20
- #define EPB_FIFO_CLEAR 0x10
- #define EPB_FIFO_NORMAL 0xEF
- // Usb setup packet bRequest
- #define CLEAR_FEATURE 0x01
- #define GET_CONFIGURATION 0x08
- #define GET_DESCRIPTOR 0x06
- #define GET_INTERFACE 10
- #define GET_STATUS 0
- #define SET_ADDRESS 5
- #define SET_CONFIGURATION 9
- #define SET_FEATURE 3
- #define SET_INTERFACE 11
- #define SYNCH_FRAME 12
- // Usb endpoint type
- #define BULK_ENDPOINT 0x02
- #define CONTROL_ENDPOINT 0x00
- #define ISO_ENDPOINT 0x01
- #define INT_ENDPOINT 0x03
- #define EP0 0x00
- #define EPA 0x01
- #define EPB 0x02
- #define EPC 0x03
- // Usb descriptor type
- #define DEVICE 1
- #define CONFIGURATION 2
- #define STRING 3
- #define INTERFACE 4
- #define ENDPOINT 5
- #define OTG 9
- #define MASS_STORAGE_CLASS 8
- #define BULK_ONLY 0x50
- #define CBI 0x00
- #define CB 0x01
- // Usb descriptor length
- #define DEVICE_LENGTH 0x12
- #define CONFIGURATION_LENGTH 0x9
- #define INTERFACE_LENGTH 0x9
- #define ENDPOINT_LENGTH 0x7
- /*==========================================================================
- Copyright (c) 2004 ALi Corporation. All Rights Reserved
- File: Host.h
- content:
- History: Created by Ideal Xiong 2004/07/05
- ==========================================================================*/
- /*******************************************************************
- *
- * Copyright (C) 2002 ALI Corporation. All Rights Reserved.
- *
- * File: UsbHost.h
- *
- * Contents: define m5637 some error number
- *
- * History:
- * Date By Reason
- * =========== ======= ====================
- * 23/06/2003 Steven Development
- * 17/10/2003 Steven modified
- * 07/2005 Allen devolepment for 5661
- *******************************************************************/
- //functions
- API void UmsRequestSense(void) large;
- API BYTE UmsSendPIOCmd(BYTE Cmd) large;
- #if(_HOST_API_INIT_)
- EXTERN API bit UsbHostInit(void) large; //050105 050710
- #endif
- #if(_HOST_COMMON_)
- EXTERN API bit UsbHostRead(void) large; //050105
- EXTERN API bit UsbHostWrite(void) large; //050105
- #endif
- #if(_HOST_COPY_&&_HOST_COMMON_) //050919
- EXTERN API bit UsbHostCopyRw(bit Readflag,BYTE bType) large; //050710
- #endif
- #undef EXTERN
- #undef _AT_