pwm8_1.h

来自「Application Note Abstract This Applicat」· C头文件 代码 · 共 58 行

H
58
字号
/******************************************************************************
*  FILENAME:      PWM8_1.h
*   VERSION:      Rev B, 2002 Mar 30
*******************************************************************************
*  DESCRIPTION:
*     PWM8_1 PWM8 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  PWM8_1_EnableInt
#pragma fastcall  PWM8_1_DisableInt
#pragma fastcall  PWM8_1_Start
#pragma fastcall  PWM8_1_Stop
#pragma fastcall  PWM8_1_WritePeriod
#pragma fastcall  PWM8_1_WritePulseWidth
#pragma fastcall bPWM8_1_ReadPulseWidth 
#pragma fastcall bPWM8_1_ReadCounter

/**************************************************
* Prototypes of PWM API. For a definition of
* functions see PWM8_1.inc. 
**************************************************/
extern void  PWM8_1_EnableInt(void);
extern void  PWM8_1_DisableInt(void);
extern void  PWM8_1_Start(void);
extern void  PWM8_1_Stop(void);
extern void  PWM8_1_WritePeriod(BYTE bPeriod);
extern void  PWM8_1_WritePulseWidth(BYTE bPulseWidth);
extern BYTE bPWM8_1_ReadPulseWidth(void);	
extern BYTE bPWM8_1_ReadCounter(void);	 


/************************************************
*  Hardware Register Definitions
*************************************************/
#pragma ioport  PWM8_1_CONTROL_REG: 0x033                  //Control register
BYTE            PWM8_1_CONTROL_REG;
#pragma ioport  PWM8_1_COUNTER_REG: 0x030                  //Counter register
BYTE            PWM8_1_COUNTER_REG;
#pragma ioport  PWM8_1_PERIOD_REG:  0x031                  //Period value register
BYTE            PWM8_1_PERIOD_REG;
#pragma ioport  PWM8_1_PWIDTH_REG:  0x032                  //PulseWidth register
BYTE            PWM8_1_PWIDTH_REG;
#pragma ioport  PWM8_1_FUNC_REG:    0x130                  //Function register
BYTE            PWM8_1_FUNC_REG;
#pragma ioport  PWM8_1_INPUT_REG:   0x131                  //Input register
BYTE            PWM8_1_INPUT_REG;
#pragma ioport  PWM8_1_OUTPUT_REG:  0x132                  //Output register
BYTE            PWM8_1_OUTPUT_REG;

// end of file

⌨️ 快捷键说明

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