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

📄 rx_232.h

📁 用VC编辑的一个MD5算法
💻 H
字号:
/******************************************************************************
*  FILENAME:      Rx_232.h
*   VERSION:      Rev B, 2002 Mar 30
*******************************************************************************
*  DESCRIPTION:
*     Rx_232 RX8 User Module header file.
*******************************************************************************
*	Copyright (c) Cypress MicroSystems 2000-2002. All Rights Reserved.
******************************************************************************/

/* include the global header file */
#include <m8c.h>

/* Create pragmas to support proper argument and return value passing */
#pragma fastcall  Rx_232_EnableInt
#pragma fastcall  Rx_232_DisableInt
#pragma fastcall  Rx_232_Start
#pragma fastcall  Rx_232_Stop
#pragma fastcall bRx_232_ReadRxData
#pragma fastcall bRx_232_ReadRxStatus

/**************************************************
* Prototypes of TX8 API. For a definition of
* functions see Rx_232.inc. 
**************************************************/
extern void  Rx_232_EnableInt(void);
extern void  Rx_232_DisableInt(void);
extern void  Rx_232_Start(BYTE bParity);
extern void  Rx_232_Stop(void);
extern BYTE bRx_232_ReadRxData(void);
extern BYTE bRx_232_ReadRxStatus(void);	 

/**************************************************
* Defines for TX8 API's. 
**************************************************/
//------------------------------------
// Receiver Parity masks
//------------------------------------
#define  RX8_PARITY_NONE         0x00
#define  RX8_PARITY_EVEN         0x02
#define  RX8_PARITY_ODD          0x06

//------------------------------------
//  Receiver Status Register masks
//------------------------------------
#define  RX8_RX_ACTIVE           0x10
#define  RX8_RX_COMPLETE         0x08
#define  RX8_RX_PARITY_ERROR     0x80
#define  RX8_RX_OVERRUN_ERROR    0x40
#define  RX8_RX_FRAMING_ERROR    0x20
#define  RX8_RX_NO_ERROR         0xE0

/************************************************
*  Hardware Register Definitions
*************************************************/
#pragma ioport  Rx_232_CONTROL_REG: 0x033                  //Control register
BYTE            Rx_232_CONTROL_REG;
#pragma ioport  Rx_232_RX_SHIFT_REG:    0x030              //RX Shift Register register
BYTE            Rx_232_RX_SHIFT_REG;
#pragma ioport  Rx_232_RX_BUFFER_REG:   0x032              //RX Buffer Register
BYTE            Rx_232_RX_BUFFER_REG;
#pragma ioport  Rx_232_FUNC_REG:    0x130                  //Function register
BYTE            Rx_232_FUNC_REG;
#pragma ioport  Rx_232_INPUT_REG:   0x131                  //Input register
BYTE            Rx_232_INPUT_REG;
#pragma ioport  Rx_232_OUTPUT_REG:  0x132                  //Output register
BYTE            Rx_232_OUTPUT_REG;

// end of file

⌨️ 快捷键说明

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