📄 myusb.h
字号:
//*****************************************************************************
//*****************************************************************************
// FILENAME: myUSB.h
// Version: 1.5, Updated on 2005/08/17 at 15:01:28
// Generated by PSoC Designer ver 4.2 b1013 : 02 September, 2004
//
// DESCRIPTION: USB User Module C Language interface file
// for the enCoRe II family of devices
//-----------------------------------------------------------------------------
// Copyright (c) Cypress Semiconductor 2004. All Rights Reserved.
//*****************************************************************************
//*****************************************************************************
#include <m8c.h>
//-------------------------------------------------
// USB Device type support for the myUSB API.
//-------------------------------------------------
//-------------------------------------------------
// fastcall16 qualifiers for the myUSB API.
//-------------------------------------------------
#pragma fastcall16 myUSB_Start
#pragma fastcall16 myUSB_Stop
#pragma fastcall16 myUSB_bCheckActivity
#pragma fastcall16 myUSB_bGetConfiguration
#pragma fastcall16 myUSB_bGetEPState
#pragma fastcall16 myUSB_bGetEPCount
#pragma fastcall16 myUSB_XLoadEP
#pragma fastcall16 myUSB_EnableOutEP
#pragma fastcall16 myUSB_DisableOutEP
#pragma fastcall16 myUSB_EnableEP
#pragma fastcall16 myUSB_DisableEP
#pragma fastcall16 myUSB_Force
#pragma fastcall16 myUSB_Suspend
#pragma fastcall16 myUSB_Resume
#pragma fastcall16 myUSB_bRWUEnabled
//-------------------------------------------------
// fastcall16 qualifiers for the HID Class API.
//-------------------------------------------------
#pragma fastcall16 myUSB_UpdateHIDTimer
#pragma fastcall16 myUSB_bGetProtocol
//-------------------------------------------------
// Prototypes of the myUSB API.
//-------------------------------------------------
extern void myUSB_Start(BYTE);
extern void myUSB_Stop(void);
extern BYTE myUSB_bCheckActivity(void);
extern BYTE myUSB_bGetConfiguration(void);
extern BYTE myUSB_bGetEPState(BYTE);
extern BYTE myUSB_bGetEPCount(BYTE);
extern void myUSB_XLoadEP(BYTE*);
extern void myUSB_EnableOutEP(BYTE);
extern void myUSB_DisableOutEP(BYTE);
extern void myUSB_EnableEP(BYTE);
extern void myUSB_DisableEP(BYTE);
extern void myUSB_Force(BYTE);
extern void myUSB_Suspend(void);
extern void myUSB_Resume(void);
extern BYTE myUSB_bRWUEnabled(void);
//-------------------------------------------------
// HID Class Prototypes of the myUSB API.
//-------------------------------------------------
extern BYTE myUSB_UpdateHIDTimer(BYTE);
extern BYTE myUSB_bGetProtocol(BYTE);
//-------------------------------------------------
// Constants for myUSB API's.
//-------------------------------------------------
#define NO_EVENT_ALLOWED 2
#define EVENT_PENDING 1
#define NO_EVENT_PENDING 0
#define IN_BUFFER_FULL NO_EVENT_PENDING
#define IN_BUFFER_EMPTY EVENT_PENDING
#define OUT_BUFFER_FULL EVENT_PENDING
#define OUT_BUFFER_EMPTY NO_EVENT_PENDING
#define USB_FORCE_J 0x02
#define USB_FORCE_K 0x01
#define USB_FORCE_SE0 0x00
#define USB_FORCE_NONE 0xFF
#define USB_IDLE_TIMER_RUNNING 0x02
#define USB_IDLE_TIMER_EXPIRED 0x01
#define USB_IDLE_TIMER_INDEFINITE 0x00
//-----------------------------------------------
// Transfer Completion Notification
//-----------------------------------------------
#define USB_XFER_IDLE 0x00
#define USB_XFER_STATUS_ACK 0x01
#define USB_XFER_PREMATURE 0x02
#define USB_XFER_ERROR 0x03
typedef struct {
BYTE bStatus;
WORD wLength;
} T_USB_XFER_STATUS_BLOCK;
//-------------------------------------------------
// myUSB Global helper variables for speed
//-------------------------------------------------
extern BYTE myUSB_APIEPNumber;
extern BYTE myUSB_APICount;
//-------------------------------------------------
// myUSB Macro 'Functions'
//-------------------------------------------------
#define myUSB_LoadEP(ep,s,c) \
myUSB_APIEPNumber = ep; \
myUSB_APICount = c; \
myUSB_XLoadEP(s)
// end of file myUSB.h
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -