📄 usbdev.h
字号:
/*------------------------------------------------------------------------------
*
* Filename: usbd_h.h
*
* Contents: 'class USBD20'
*
* Notes:
* 1.
*
* Authors : Hyunsun.ahn
*
* Copyright (c) 2005 SAMSUNG Electronics.
*
*------------------------------------------------------------------------------*/
#ifndef __USBD20_H__
#define __USBD20_H__
//#include "def.h"
/*
enum USB_OP
{
USB_CPU, USB_DMA
};
enum USB_SPEED
{
USB_FULL, USB_HIGH
};
*/
#define USB_OP unsigned char
#define USB_CPU 0
#define USB_DMA 1
#define USB_SPEED unsigned char
#define USB_FULL 0
#define USB_HIGH 1
struct USB_DEVICE_DESCRIPTOR;
struct USB_GET_STATUS;
struct USB_INTERFACE_GET;
struct USB_DESCRIPTORS;
struct DEVICE_REQUEST;
#ifdef __cplusplus
extern "C" {
#endif
extern void AllocateUSBDEV(void);
extern void FreeUSBDEV(void);
extern void Init(void);
extern void HandleEvent(void);
extern void SetOpMode(USB_OP eMode);
extern bool IsEnumerationDone(void);
void GetDownFileInfo(U32* uDownAddr, U32* uDownFileSize);
bool VerifyChecksum(void);
void PrepareEp1Fifo(U32 uBaseAddr);
void SetDescriptorTable(void);
void SetEndpoint(void);
void StandardSetDescriptor(void);
void TransferEp0(void);
void HandleEvent_EP0(void);
void HandleEvent_BulkOut(void);
void HandleEvent_BulkIn(void);
void FlushEp1Fifo(void);
#ifdef __TEST
void RdPktEp3(U16 *buf, int num);
#else
void RdPktEp3(U8 *buf,int num);
#endif
void SetMaxPktSizes(USB_SPEED eSpeed);
void UsbdMain(void);
extern U32 g_uDownloadFileSize;
extern U32 g_uDownloadAddress;
extern U8* g_pDownPt;
#ifdef __cplusplus
}
#endif
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -