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

📄 usbh_stacktask.h

📁 epson usb2.0 控制芯片 S1R72V05 固件程序。
💻 H
字号:
/*
 *	description	: USB Stack Task
 *	Maker		: Toshiyuki Sakai
 *	Copyright	: (C)2005,SEIKO EPSON Corp. All Rights Reserved.
 */

#ifndef USB_TASK_H
#define USB_TASK_H

#ifdef __cplusplus
	extern "C" {
#endif /* cplusplus */

#include "SPRDEF.h"
#include "OSCall.h"

#include "usbh_usbd_api.h"


#define	MSGUSB_DATASIZE					(32)			// Size of USB message data part
// Structure declaration for mail box header part
typedef struct _USBH_MSGHEAD{							// Common header of message
	OS_T_MSG	header;		   							// Area used for OS
	OS_ID		useMpfId; 								// Memory pool ID to use.
	OS_ID		msgSndTskId;							// Task ID of message sender
	USHORT		msgNo;									// Message number
	USHORT		msgLength;								//E; Length of message data.
}USBH_MSGHEAD, *USBH_PMSGHEAD;

// Structure declaration for mail box
typedef struct _USB_MSG{								// USB task mail box
	USBH_MSGHEAD	msgHead;							// Message header part
	UCHAR		msgData[MSGUSB_DATASIZE];				// Message data part
} USB_MSG, *PUSB_MSG;

//--------------------------------------------------------------------------
// Memory pool with fixed length for message transmission, 
//--------------------------------------------------------------------------
#define MPF_ATTRIBUTE_USBH_USBD_MSG				(OS_TA_TFIFO)	// Attribute
#define MPF_BLOCK_CNT_USBH_USBD_MSG				(8)				// Number of blocks
#define MPF_BLOCK_SIZE_USBH_USBD_MSG			(44 + TMSGSIZE)	// Block size
#define MPF_BLOCK_ADD_USBH_USBD_MSG				(NULL)			// Block address

//--------------------------------------------------------------------------
// Mail box
//--------------------------------------------------------------------------
#define MBX_ATTRIBUTE_USBH_USBD					(OS_TA_TFIFO)	// Attribution
#define MBX_MAX_PRI_USBH_USBD					(1)				// Max value of priority
#define MBX_PRI_ADD_USBH_USBD					(NULL)			// Address of message queue header

//--------------------------------------------------------------------------
// USBD event flag
//--------------------------------------------------------------------------
#define FLG_ATTRIBUTE_USBH_USBD					(OS_TA_TFIFO)	// Attribution
#define FLG_PATTERN_USBH_USBD					(0)				// Initial setting of bit pattern

//														// Attribution
//														// Initial setting of bit pattern
// Bit definition of event falg
#define	FLG_EVENT_FORCE_USBH_USBD			0x80000000		// (bit31) Forced process event
#define	FLG_EVENT_INT_USBH_USBD				0x08000000		// (bit27) Interrupt process event
#define	FLG_EVENT_MSG_USBH_USBD				0x00000001		// (bit0) Message process event
// Waiting pattern of event flag
#define FLG_WAIT_PTN_USBH_USBD				( FLG_EVENT_FORCE_USBH_USBD |\
											FLG_EVENT_INT_USBH_USBD |\
											FLG_EVENT_MSG_USBH_USBD )

//==========================================================================//
//                                                                          //
//                         Define declaration                             //
//                                                                          //
//==========================================================================//

//==========================================================================//
//                                                                          //
//                           Structure declaration                        //
//                                                                          //
//==========================================================================//

//==========================================================================//
//                                                                          //
//                                Variable declaration                    //
//                                                                          //
//==========================================================================//

//==========================================================================//
//                                                                          //
//                                Function declaration                    //
//                                                                          //
//==========================================================================//
extern void USBH_USBDTask( void );


#ifdef __cplusplus
	}
#endif /* cplusplus */

#endif /* USB_TASK_H */

⌨️ 快捷键说明

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