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

📄 usb_req.h

📁 在CCS开发环境下的DSP 5509A的固件程序
💻 H
字号:
/******************************************************************************/
/* usb_req.h, 25 Jan 01 $MH$                                                  */
/*                                                                            */
/* Copyright (C) 2001  Texas Instruments, Inc.  All Rights Reserved.          */
/*                                                                            */
/* Header file for usb_req.c                                                  */
/*                                                                            */
/******************************************************************************/

#ifndef _USB_REQ_H
#define _USB_REQ_H

#include "csl_usb.h"
#include "usb_const.h"

/******************************************************************************/
/*                                                                            */
/*       return values for USB request handlers                               */
/*                                                                            */
/******************************************************************************/

typedef enum 
{
  USB_REQUEST_DONE = 0,      /* Don't call request again until new SETUP */
  USB_REQUEST_STALL,         /* STALL the control endpoint */
  USB_REQUEST_SEND_ACK,      /* Send a 0 length IN packet */
  USB_REQUEST_GET_ACK,       /* Prepare to receive 0 length OUT packet */
  USB_REQUEST_DATA_IN,       /* Notify handler when IN data has been transmitted */
  USB_REQUEST_DATA_OUT       /* Notify handler when OUT data has been received */

} USB_REQUEST_RET;


#define USB_REQUEST_ARGS  USB_DevNum DevNum, USB_SetupStruct *USB_Setup, \
                          USB_EpHandle hInEp, USB_EpHandle hOutEp


/******************************************************************************/
/*                                                                            */
/*       USB standard requests(defined in chap9 of USB 1.1 spec) handlers     */
/*                                                                            */
/******************************************************************************/

USB_REQUEST_RET USB_reqGetDescriptor(USB_REQUEST_ARGS);
USB_REQUEST_RET USB_reqSetAddress(USB_REQUEST_ARGS);
USB_REQUEST_RET USB_reqSetConfiguration(USB_REQUEST_ARGS);
USB_REQUEST_RET USB_reqGetConfiguration(USB_REQUEST_ARGS);
USB_REQUEST_RET USB_reqGetStatus(USB_REQUEST_ARGS);
USB_REQUEST_RET USB_reqClearFeature(USB_REQUEST_ARGS);
USB_REQUEST_RET USB_reqSetFeature(USB_REQUEST_ARGS);
USB_REQUEST_RET USB_reqSetInterface(USB_REQUEST_ARGS);
USB_REQUEST_RET USB_reqGetInterface(USB_REQUEST_ARGS);

/******************************************************************************/
/*                                                                            */
/*       Some USB vendor specific request handlers                            */
/*                                                                            */
/******************************************************************************/

// 
// Place holder for declaring new request handlers
// 

/******************************************************************************/
/*                                                                            */
/*       USB unknow request handler                                           */
/*                                                                            */
/******************************************************************************/

USB_REQUEST_RET USB_reqUnknown(USB_REQUEST_ARGS);

/******************************************************************************/
/*                                                                            */
/*             Data Structure for USB Request Table                           */
/*                                                                            */
/******************************************************************************/

typedef struct
{
  Uint16 Request;
  USB_REQUEST_RET (*fpRequestHandler)(USB_REQUEST_ARGS);
   
} USB_request_struct;


#endif /* _USB_REQ_H */

⌨️ 快捷键说明

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