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

📄 tx8_1.h

📁 CYPRESS的PSOC的AD转换编程
💻 H
字号:
//*****************************************************************************
//*****************************************************************************
//  FILENAME: TX8_1.h
//   Version: 3.3, Updated on 2006/01/14 at 16:09:12
//  Generated by PSoC Designer ver 4.4  b1884 : 14 Jan, 2007
//
//  DESCRIPTION: TX8 User Module C Language interface file for the
//               22/24/25/26/27xxx PSoC family of devices.
//-----------------------------------------------------------------------------
//      Copyright (c) Cypress MicroSystems 2000-2003. All Rights Reserved.
//*****************************************************************************
//*****************************************************************************

#include <m8c.h>

/* Create pragmas to support proper argument and return value passing */
#pragma fastcall16  TX8_1_SetTxIntMode
#pragma fastcall16  TX8_1_EnableInt
#pragma fastcall16  TX8_1_DisableInt
#pragma fastcall16  TX8_1_Start
#pragma fastcall16  TX8_1_Stop
#pragma fastcall16  TX8_1_SendData
#pragma fastcall16  TX8_1_bReadTxStatus

// High level TX functions
#pragma fastcall16  TX8_1_PutSHexByte
#pragma fastcall16  TX8_1_PutSHexInt
#pragma fastcall16  TX8_1_CPutString
#pragma fastcall16  TX8_1_PutString
#pragma fastcall16  TX8_1_PutChar
#pragma fastcall16  TX8_1_Write
#pragma fastcall16  TX8_1_CWrite
#pragma fastcall16  TX8_1_PutCRLF

//-------------------------------------------------
// Prototypes of the TX8_1 API.
//-------------------------------------------------
extern void  TX8_1_SetTxIntMode(BYTE bTxIntMode);
extern void  TX8_1_EnableInt(void);
extern void  TX8_1_DisableInt(void);
extern void  TX8_1_Start(BYTE bParity);
extern void  TX8_1_Stop(void);
extern void  TX8_1_SendData(BYTE bTxData);
extern BYTE  TX8_1_bReadTxStatus(void);

// High level TX functions
extern void   TX8_1_CPutString(const char * szRomString);
extern void   TX8_1_PutString(char * szRamString);
extern void   TX8_1_PutChar(CHAR cData);
extern void   TX8_1_Write(char * szRamString, BYTE bCount);
extern void   TX8_1_CWrite(const char * szRomString, INT iCount);
extern void   TX8_1_PutSHexByte(BYTE bValue);
extern void   TX8_1_PutSHexInt(INT iValue);
extern void   TX8_1_PutCRLF(void);

// Old style function name, Do Not Use.
// Will be removfr in a future release
#pragma fastcall16 bTX8_1_ReadTxStatus
extern BYTE bTX8_1_ReadTxStatus(void);

//------------------------------------
//  Transmitter Parity masks
//------------------------------------
#define  TX8_1_PARITY_NONE         0x00
#define  TX8_1_PARITY_EVEN         0x02
#define  TX8_1_PARITY_ODD          0x06

//------------------------------------
//  Transmitter Status Register masks
//------------------------------------
#define  TX8_1_TX_COMPLETE         0x20
#define  TX8_1_TX_BUFFER_EMPTY     0x10

#define TX8_1_INT_MODE_TX_REG_EMPTY 0x00
#define TX8_1_INT_MODE_TX_COMPLETE  0x01

//------------------------------------
// Transmitter Interrupt masks
//------------------------------------
#define TX8_1_INT_REG_ADDR                     ( 0x0e1 )
#define TX8_1_bINT_MASK                        ( 0x04 )

// Old style defines, do not use.  These
// will be removed in a future release.
#define  TX8_PARITY_NONE         0x00
#define  TX8_PARITY_EVEN         0x02
#define  TX8_PARITY_ODD          0x06
#define  TX8_TX_COMPLETE         0x20
#define  TX8_TX_BUFFER_EMPTY     0x10



//-------------------------------------------------
// Register Addresses for TX8_1
//-------------------------------------------------
#pragma ioport  TX8_1_CONTROL_REG:  0x02b                  // Control register
BYTE            TX8_1_CONTROL_REG;
#pragma ioport  TX8_1_TX_SHIFT_REG: 0x028                  // TX Shift Register register
BYTE            TX8_1_TX_SHIFT_REG;
#pragma ioport  TX8_1_TX_BUFFER_REG:    0x029              // TX Buffer Register
BYTE            TX8_1_TX_BUFFER_REG;
#pragma ioport  TX8_1_FUNC_REG: 0x128                      // Function register
BYTE            TX8_1_FUNC_REG;
#pragma ioport  TX8_1_INPUT_REG:    0x129                  // Input register
BYTE            TX8_1_INPUT_REG;
#pragma ioport  TX8_1_OUTPUT_REG:   0x12a                  // Output register
BYTE            TX8_1_OUTPUT_REG;

// end of file TX8_1.h

⌨️ 快捷键说明

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