usbbulk.h

来自「usbSampleApp,USB的工业标准是对PC机现有的体系结构的扩充。USB」· C头文件 代码 · 共 65 行

H
65
字号
/*
**********************************************************************
*                          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 + =
减小字号Ctrl + -
显示快捷键?