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

📄 pwm16_2.h

📁 Application Note Abstract This Application Note introduces a complete and detailed PSoC&reg project
💻 H
字号:
/******************************************************************************
*  FILENAME:      PWM16_2.h
*   VERSION:      Rev B, 2002 Mar 30
*******************************************************************************
*  DESCRIPTION:
*     PWM16_2 PWM16 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  PWM16_2_EnableInt
#pragma fastcall  PWM16_2_DisableInt
#pragma fastcall  PWM16_2_Start
#pragma fastcall  PWM16_2_Stop
#pragma fastcall  PWM16_2_WritePeriod
#pragma fastcall  PWM16_2_WritePulseWidth
#pragma fastcall wPWM16_2_ReadPulseWidth
#pragma fastcall wPWM16_2_ReadCounter

/**************************************************
* Prototypes of PWM API. For a definition of
* functions see PWM16_2.inc. 
**************************************************/
extern void  PWM16_2_EnableInt(void);
extern void  PWM16_2_DisableInt(void);
extern void  PWM16_2_Start(void);
extern void  PWM16_2_Stop(void);
extern void  PWM16_2_WritePeriod(WORD wPeriod);
extern void  PWM16_2_WritePulseWidth(WORD wPulseWidth);
extern WORD wPWM16_2_ReadPulseWidth(void);	
extern WORD wPWM16_2_ReadCounter(void);	 

/************************************************
*  Hardware Register Definitions
*************************************************/
#pragma ioport  PWM16_2_CONTROL_LSB_REG:    0x02b          //Control register LSB
BYTE            PWM16_2_CONTROL_LSB_REG;
#pragma ioport  PWM16_2_CONTROL_MSB_REG:    0x02f          //Control register MSB
BYTE            PWM16_2_CONTROL_MSB_REG;
#pragma ioport  PWM16_2_COUNTER_LSB_REG:    0x028          //Counter register LSB
BYTE            PWM16_2_COUNTER_LSB_REG;
#pragma ioport  PWM16_2_COUNTER_MSB_REG:    0x02c          //Counter register MSB
BYTE            PWM16_2_COUNTER_MSB_REG;
#pragma ioport  PWM16_2_PERIOD_LSB_REG: 0x029              //Period register LSB
BYTE            PWM16_2_PERIOD_LSB_REG;
#pragma ioport  PWM16_2_PERIOD_MSB_REG: 0x02d              //Period register MSB
BYTE            PWM16_2_PERIOD_MSB_REG;
#pragma ioport  PWM16_2_PWDITH_LSB_REG: 0x02a              //PulseWidth register LSB
BYTE            PWM16_2_PWDITH_LSB_REG;
#pragma ioport  PWM16_2_PWDITH_MSG_REG: 0x02e              //PulseWidth register MSB
BYTE            PWM16_2_PWDITH_MSG_REG;
#pragma ioport  PWM16_2_FUNC_LSB_REG:   0x128              //Function register LSB
BYTE            PWM16_2_FUNC_LSB_REG;
#pragma ioport  PWM16_2_FUNC_MSB_REG:   0x12c              //Function register MSB
BYTE            PWM16_2_FUNC_MSB_REG;
#pragma ioport  PWM16_2_INPUT_LSB_REG:  0x129              //Input register LSB
BYTE            PWM16_2_INPUT_LSB_REG;
#pragma ioport  PWM16_2_INPUT_MSB_REG:  0x12d              //Input register MSB
BYTE            PWM16_2_INPUT_MSB_REG;
#pragma ioport  PWM16_2_OUTPUT_LSB_REG: 0x12a              //Output register LSB
BYTE            PWM16_2_OUTPUT_LSB_REG;
#pragma ioport  PWM16_2_OUTPUT_MSB_REG: 0x12e              //Output register MSB
BYTE            PWM16_2_OUTPUT_MSB_REG;

// end of file

⌨️ 快捷键说明

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