?? usb.h
字號(hào):
//*****************************************************************************
//*****************************************************************************
// FILENAME: USB.h
// Version: 1.5, Updated on 2006/06/19 at 11:43:56
// Generated by PSoC Designer ver 4.3 b1884 : 23 June, 2006
//
// 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 USB API.
//-------------------------------------------------
//-------------------------------------------------
// fastcall16 qualifiers for the USB API.
//-------------------------------------------------
#pragma fastcall16 USB_Start
#pragma fastcall16 USB_Stop
#pragma fastcall16 USB_bCheckActivity
#pragma fastcall16 USB_bGetConfiguration
#pragma fastcall16 USB_bGetEPState
#pragma fastcall16 USB_bGetEPCount
#pragma fastcall16 USB_XLoadEP
#pragma fastcall16 USB_EnableOutEP
#pragma fastcall16 USB_DisableOutEP
#pragma fastcall16 USB_EnableEP
#pragma fastcall16 USB_DisableEP
#pragma fastcall16 USB_Force
#pragma fastcall16 USB_Suspend
#pragma fastcall16 USB_Resume
#pragma fastcall16 USB_bRWUEnabled
//-------------------------------------------------
// fastcall16 qualifiers for the HID Class API.
//-------------------------------------------------
#pragma fastcall16 USB_UpdateHIDTimer
#pragma fastcall16 USB_bGetProtocol
//-------------------------------------------------
// Prototypes of the USB API.
//-------------------------------------------------
extern void USB_Start(BYTE);
extern void USB_Stop(void);
extern BYTE USB_bCheckActivity(void);
extern BYTE USB_bGetConfiguration(void);
extern BYTE USB_bGetEPState(BYTE);
extern BYTE USB_bGetEPCount(BYTE);
extern void USB_XLoadEP(BYTE*);
extern void USB_EnableOutEP(BYTE);
extern void USB_DisableOutEP(BYTE);
extern void USB_EnableEP(BYTE);
extern void USB_DisableEP(BYTE);
extern void USB_Force(BYTE);
extern void USB_Suspend(void);
extern void USB_Resume(void);
extern BYTE USB_bRWUEnabled(void);
//-------------------------------------------------
// HID Class Prototypes of the USB API.
//-------------------------------------------------
extern BYTE USB_UpdateHIDTimer(BYTE);
extern BYTE USB_bGetProtocol(BYTE);
//-------------------------------------------------
// Constants for USB 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;
//-------------------------------------------------
// USB Global helper variables for speed
//-------------------------------------------------
extern BYTE USB_APIEPNumber;
extern BYTE USB_APICount;
//-------------------------------------------------
// USB Macro 'Functions'
//-------------------------------------------------
#define USB_LoadEP(ep,s,c) \
USB_APIEPNumber = ep; \
USB_APICount = c; \
USB_XLoadEP(s)
// end of file USB.h
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -