📄 ps2d.h
字号:
//*****************************************************************************
//*****************************************************************************
// FILENAME: PS2D.h
// Version: 1.2, Updated on 2005/07/06 at 13:49:25
// Generated by PSoC Designer ver 4.2 b1013 : 02 September, 2004
//
// DESCRIPTION: PS2D User Module C Language interface file
// for the enCoRe II family of devices
//-----------------------------------------------------------------------------
// Copyright (c) Cypress Semiconductor 2004. All Rights Reserved.
//*****************************************************************************
//*****************************************************************************
#include <m8c.h>
//-------------------------------------------------
// PS/2 Device type support for the PS2D API.
//-------------------------------------------------
#define PS2D_DEVICE_TYPE_NONE 0
#define PS2D_DEVICE_TYPE_MOUSE 1
#define PS2D_DEVICE_TYPE_KEYBOARD 2
#define PS2D_DEVICE_TYPE_OTHER 3
#define PS2D_DEVICE_TYPE PS2D_DEVICE_TYPE_MOUSE
//-------------------------------------------------
// fastcall qualifiers for the PS2D API.
//-------------------------------------------------
#pragma fastcall PS2D_Start
#pragma fastcall PS2D_Stop
#pragma fastcall PS2D_Start
#pragma fastcall PS2D_Stop
#pragma fastcall PS2D_DoCommand
#pragma fastcall PS2D_SendNextByte
#pragma fastcall PS2D_TranserInProgress
#pragma fastcall PS2D_Resend
#pragma fastcall PS2D_AbortTransfer
#pragma fastcall PS2D_IsEnabled
#pragma fastcall PS2D_GetDeviceID
#pragma fastcall PS2D_IsStreamMode
#pragma fastcall PS2D_GetSampleInterval
//-------------------------------------------------
// Prototypes of the PS2D API.
//-------------------------------------------------
extern void PS2D_Start(void);
extern void PS2D_Stop(void);
extern BYTE PS2D_DoCommand(void);
extern void PS2D_SendNextByte(void);
extern BYTE PS2D_TransferInProgress(void);
extern void PS2D_Resend(void);
extern void PS2D_AbortTransfer(void);
extern BYTE PS2D_IsEnabled(void);
extern BYTE PS2D_GetDeviceID(void);
extern BYTE PS2D_IsStreamMode(void);
extern BYTE PS2D_GetSampleInterval(void);
//-------------------------------------------------
// Constants for PS2D API's.
//-------------------------------------------------
#define PS2D_CMD_MODE_WRAP_AROUND 0x02
#define PS2D_CMD_MODE_STREAM 0x04
#define PS2D_CMD_MODE_REMOTE 0x08
//-------------------------------------------------
// Transmit buffer access PS2D
//-------------------------------------------------
extern BYTE PS2D_aTxBuffer[];
extern BYTE PS2D_bTxPktIndex;
extern BYTE PS2D_bTxPktSize;
#define PS2D_TX_BUFFER_SIZE 4
#define PS2D_StartTransfer(n) PS2D_bTxPktSize = (n); \
PS2D_bTxPktIndex = 0;
//-------------------------------------------------
// Register Addresses for PS2D
//-------------------------------------------------
//-------------------------------------------------
// PS2D Macro 'Functions'
//-------------------------------------------------
// end of file PS2D.h
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -