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

📄 command_api.h

📁 usbn9603等时传输的firmware
💻 H
字号:
/*----------------------------------------------------------------------------
 *  Copyright (c) 2001 by National Semiconductor Corporation
 *  National Semiconductor Corporation
 *
 *  All rights reserved
 *
 *<<<-------------------------------------------------------------------------
 * File Contents:
 *	comamand_api.h - Custom Requests
 *
 *  Project: USB Demo firmware
 *  Author : Yan Nosovitsky
 *  Date   : Oct 2001
 *----------------------------------------------------------------------->>>*/

#ifndef _command_api_h_
#define _command_api_h_

/* ----------------------------------------------------------------------------
*	Bulk commands
*------------------------------------------------------------------------------ */
typedef enum {
	BULK_NO_COMMAND				= 0x00,

	BULK_SEND_IMM_BACK			= 0x10,  /* Send the data back to host (trough Bulk transfer IN) immediately 
											when it arrives (trough Bulk transfer OUT). */
											 
	BULK_SEND_AFTER_LAST_BACK	= 0x11,  /* Send the data back to host (trough Bulk transfer IN) after its last 
											packet arrives from the host (trough Bulk transfer OUT).*/
											 
	BULK_SEND_DATA				= 0x12,  /* Send data to the host through Bulk transfer IN. The data contains 
											bytes equal to wLength parameter. */
											 
	BULK_GET_DATA				= 0x13,  /* Receive data from the host through Bulk transfer OUT. The data contains 
											bytes equal to wLength parameter.
											After sending data completing GET_FEEDBACK request is sent by the host.*/
} BulkCommand;
/* ----------------------------------------------------------------------------
*	Interrupt commands 
*------------------------------------------------------------------------------ */
typedef enum {
	INTERRUPT_NO_COMMAND		= 0x00,

	INTERRUPT_GET_INT			= 0x20  /* Send data to the host through Interrupt transfer IN.  When getting this 
										   request, the firmware generates number of interrupts equal to wValue 
										   parameter. Each interrupt will 8 bytes of data. Each byte of the data 
										   contains a serial number of the current interrupt */
} InterruptCommand;
/* ----------------------------------------------------------------------------
*	Isochronous  commands 
*------------------------------------------------------------------------------ */

typedef enum {	
	ISOCH_NO_COMMAND			= 0x00,

	ISOCH_SEND_IMM_BACK			= 0x30,  /* Send the data back to host (trough Isochronous transfer IN) immediately
									        when it arrives (trough Isochronous transfer OUT). */

	ISOCH_SEND_DATA				= 0x31,  /* Send data to the host through Isochronous transfer IN. The data contains
									        bytes equal to wLength parameter */
											 
	SOCH_GET_DATA				= 0x32,  /* Receive data from the host through Isochronous transfer IN. The data 
									    	contains bytes equal to wLength parameter.
										    After sending data completing GET_FEEDBACK request is sent by the host.*/
}IsochCommand;							


/*------------------------------------------------------------------------------
*	General command
*------------------------------------------------------------------------------ */

#define GET_FEEDBACK				0x01  /* The request returns results of the last request (needed only after 
											 ISOCH_GET_DATA and ISOCH_GET_DATA requests).
											 The device returns number of bytes received in last request (4 bytes) 
											 and number of errors (4 bytes).*/
											 
#define STOP_REQUEST				0x02  /* Stop performing current request.*/
											 
						
											 
#endif /* _command_api_h_ */

⌨️ 快捷键说明

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