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

📄 filter_timer.h

📁 测量脉搏的源码 Cypress公司使用 CY27443 完成相关的功能
💻 H
字号:
//*****************************************************************************
//*****************************************************************************
//  FILENAME: Filter_Timer.h
//   Version: 2.1, Updated on 2003/08/20 at 17:13:06
//  Generated by PSoC Designer ver 4.0 b865 : 27 August, 2003
//
//  DESCRIPTION: Timer8 User Module C Language interface file
//               for the 22/24/27/28xxx PSoC family of devices
//-----------------------------------------------------------------------------
//  Copyright (c) Cypress MicroSystems 2000-2003. All Rights Reserved.
//*****************************************************************************
//*****************************************************************************

#include <m8c.h>

#pragma fastcall Filter_Timer_EnableInt
#pragma fastcall Filter_Timer_DisableInt
#pragma fastcall Filter_Timer_Start
#pragma fastcall Filter_Timer_Stop
#pragma fastcall Filter_Timer_bReadTimer                // Read  DR0
#pragma fastcall Filter_Timer_bReadTimerSaveCV          // Read  DR0
#pragma fastcall Filter_Timer_WritePeriod               // Write DR1
#pragma fastcall Filter_Timer_bReadCompareValue         // Read  DR2
#pragma fastcall Filter_Timer_WriteCompareValue         // Write DR2

// The following symbols are deprecated.
// They may be omitted in future releases
//
#pragma fastcall bFilter_Timer_ReadCounter              // Read  DR0 "Obsolete"
#pragma fastcall bFilter_Timer_CaptureCounter           // Read  DR0 "Obsolete"
#pragma fastcall bFilter_Timer_ReadTimer                // Read  DR0 (Deprecated)
#pragma fastcall bFilter_Timer_ReadTimerSaveCV          // Read  DR0 (Deprecated)
#pragma fastcall bFilter_Timer_ReadCompareValue         // Read  DR2 (Deprecated)


//-------------------------------------------------
// Prototypes of the Filter_Timer API.
//-------------------------------------------------

extern void Filter_Timer_EnableInt(void);
extern void Filter_Timer_DisableInt(void);
extern void Filter_Timer_Start(void);
extern void Filter_Timer_Stop(void);
extern BYTE Filter_Timer_bReadTimer(void);
extern BYTE Filter_Timer_bReadTimerSaveCV(void);
extern void Filter_Timer_WritePeriod(BYTE bPeriod);
extern BYTE Filter_Timer_bReadCompareValue(void);
extern void Filter_Timer_WriteCompareValue(BYTE bCompareValue);

// The following functions are deprecated.
// They may be omitted in future releases
//
extern BYTE bFilter_Timer_ReadCompareValue(void);       // Deprecated
extern BYTE bFilter_Timer_ReadTimerSaveCV(void);        // Deprecated
extern BYTE bFilter_Timer_ReadCounter(void);            // Obsolete
extern BYTE bFilter_Timer_ReadTimer(void);              // Deprecated
extern BYTE bFilter_Timer_CaptureCounter(void);         // Obsolete


//--------------------------------------------------
// Constants for Filter_Timer API's.
//--------------------------------------------------

#define Filter_Timer_CONTROL_REG_START_BIT     ( 0x01 )
#define Filter_Timer_INT_REG_ADDR              ( 0x0e1 )
#define Filter_Timer_INT_MASK                  ( 0x02 )


//-------------------------------------------------
// Register Addresses for Filter_Timer
//-------------------------------------------------

#pragma ioport  Filter_Timer_COUNTER_REG:   0x024          //DR0 Count register
BYTE            Filter_Timer_COUNTER_REG;
#pragma ioport  Filter_Timer_PERIOD_REG:    0x025          //DR1 Period register
BYTE            Filter_Timer_PERIOD_REG;
#pragma ioport  Filter_Timer_COMPARE_REG:   0x026          //DR2 Compare register
BYTE            Filter_Timer_COMPARE_REG;
#pragma ioport  Filter_Timer_CONTROL_REG:   0x027          //Control register
BYTE            Filter_Timer_CONTROL_REG;
#pragma ioport  Filter_Timer_FUNC_REG:  0x124              //Function register
BYTE            Filter_Timer_FUNC_REG;
#pragma ioport  Filter_Timer_INPUT_REG: 0x125              //Input register
BYTE            Filter_Timer_INPUT_REG;
#pragma ioport  Filter_Timer_OUTPUT_REG:    0x126          //Output register
BYTE            Filter_Timer_OUTPUT_REG;
#pragma ioport  Filter_Timer_INT_REG:       0x0e1          //Interrupt Mask Register
BYTE            Filter_Timer_INT_REG;


//-------------------------------------------------
// Filter_Timer Macro 'Functions'
//-------------------------------------------------

#define Filter_Timer_Start_M \
   ( Filter_Timer_CONTROL_REG |=  Filter_Timer_CONTROL_REG_START_BIT )

#define Filter_Timer_Stop_M  \
   ( Filter_Timer_CONTROL_REG &= ~Filter_Timer_CONTROL_REG_START_BIT )

#define Filter_Timer_EnableInt_M   \
   M8C_EnableIntMask(  Filter_Timer_INT_REG, Filter_Timer_INT_MASK )

#define Filter_Timer_DisableInt_M  \
   M8C_DisableIntMask( Filter_Timer_INT_REG, Filter_Timer_INT_MASK )


// end of file Filter_Timer.h

⌨️ 快捷键说明

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