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

📄 tx_serial.h

📁 测量脉搏的源码 Cypress公司使用 CY27443 完成相关的功能
💻 H
字号:
//*****************************************************************************
//*****************************************************************************
//  FILENAME: TX_SERIAL.h
//   Version: 2.2, Updated on 2003/11/18 at 15:02:31
//  Generated by PSoC Designer ver 4.1 BETA b923 : 11 December, 2003
//
//  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 fastcall  TX_SERIAL_EnableInt
#pragma fastcall  TX_SERIAL_DisableInt
#pragma fastcall  TX_SERIAL_Start
#pragma fastcall  TX_SERIAL_Stop
#pragma fastcall  TX_SERIAL_SendData
#pragma fastcall  TX_SERIAL_bReadTxStatus


//-------------------------------------------------
// Prototypes of the TX_SERIAL API.
//-------------------------------------------------
extern void  TX_SERIAL_EnableInt(void);
extern void  TX_SERIAL_DisableInt(void);
extern void  TX_SERIAL_Start(BYTE bParity);
extern void  TX_SERIAL_Stop(void);
extern void  TX_SERIAL_SendData(BYTE bTxData);
extern BYTE  TX_SERIAL_bReadTxStatus(void);

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

//------------------------------------
//  Transmitter Parity masks
//------------------------------------
#define  TX_SERIAL_PARITY_NONE         0x00
#define  TX_SERIAL_PARITY_EVEN         0x02
#define  TX_SERIAL_PARITY_ODD          0x06

//------------------------------------
//  Transmitter Status Register masks
//------------------------------------
#define  TX_SERIAL_TX_COMPLETE         0x20
#define  TX_SERIAL_TX_BUFFER_EMPTY     0x10

// 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 TX_SERIAL
//-------------------------------------------------
#pragma ioport  TX_SERIAL_CONTROL_REG:  0x03b              // Control register
BYTE            TX_SERIAL_CONTROL_REG;
#pragma ioport  TX_SERIAL_TX_SHIFT_REG: 0x038              // TX Shift Register register
BYTE            TX_SERIAL_TX_SHIFT_REG;
#pragma ioport  TX_SERIAL_TX_BUFFER_REG:    0x039             // TX Buffer Register
BYTE            TX_SERIAL_TX_BUFFER_REG;
#pragma ioport  TX_SERIAL_FUNC_REG: 0x138                  // Function register
BYTE            TX_SERIAL_FUNC_REG;
#pragma ioport  TX_SERIAL_INPUT_REG:    0x139              // Input register
BYTE            TX_SERIAL_INPUT_REG;
#pragma ioport  TX_SERIAL_OUTPUT_REG:   0x13a              // Output register
BYTE            TX_SERIAL_OUTPUT_REG;

// end of file TX_SERIAL.h

⌨️ 快捷键说明

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