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

📄 usbbulk.h

📁 usbSampleApp,USB的工业标准是对PC机现有的体系结构的扩充。USB的设计主要遵循以下几个准则: &#8226 易于扩充多个外围设备; &#8226 价格低廉
💻 H
字号:
/*
**********************************************************************
*                          Micrium, Inc.
*                      949 Crestview Circle
*                     Weston,  FL 33327-1848
*
*                           uC/USB-Bulk
*
*             (c) Copyright 2003 - 2004, Micrium, Inc.
*                      All rights reserved.
*
***********************************************************************

----------------------------------------------------------------------
File    : USBBULK.h
Purpose : USB functions
---------------------------END-OF-HEADER------------------------------
*/
#ifndef _USBBULK_H
#define _USBBULK_H

#if defined(__cplusplus)
  extern "C" {          /* Make sure we have C-declarations in C++ programs */
#endif

//
// Main functions
//
void   USBBULK_Close();
void * USBBULK_Open();
int    USBBULK_Read     (void *       pBuffer, int Size);
int    USBBULK_WriteRead(const void*  pBuffer, int WrSize, void*  pRead, int RdSize);
int    USBBULK_Write    (const void * pBuffer, int Size);
void   USBBULK_SetTimeout(int Timeout);


typedef enum {
  UsbResetPipe,
  UsbResetDevice,
  UsbGetConfigDescriptor,
} USBBULK_CONTROL;



/*
 * USBBULK_Control:
 * send request control message to driver.
 * pBuffer & Size are only usefull when Action == UsbGetConfigDescriptor.
 * returned information is a USB_CONFIGURATION_DESCRIPTOR structure
 */

int USBBULK_Control             (USBBULK_CONTROL Action, void* pBuffer, int Size);
int USBBULK_GetConfigDescriptor (void* pBuffer, int Size);
int USBBULK_ResetPipe           (void);
int USBBULK_ResetDevice         (void);

#if defined(__cplusplus)
  }     /* Make sure we have C-declarations in C++ programs */
#endif


#endif

/*************************** End of file ****************************/

⌨️ 快捷键说明

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