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

📄 pwm_01.inc

📁 sypress psoc express 驱动led发光的应用程序.
💻 INC
字号:
;;*****************************************************************************
;;*****************************************************************************
;;  FILENAME: PWM_01.inc
;;   Version: 2.5, Updated on 2006/05/15 at 15:09:31
;;  Generated by PSoC Designer ???
;;
;;  DESCRIPTION: Assembler declarations for the PWM8 user module interface
;;               for the 22/24/27/29xxx PSoC family of devices
;;-----------------------------------------------------------------------------
;;  Copyright (c) Cypress MicroSystems 2000-2004. All Rights Reserved.
;;*****************************************************************************
;;*****************************************************************************

include "m8c.inc"


;--------------------------------------------------
; Constants for PWM_01 API's.
;--------------------------------------------------

PWM_01_CONTROL_REG_START_BIT:              equ 0x01    ; Control register start bit
PWM_01_INT_REG:                            equ 0x0e1
PWM_01_INT_MASK:                           equ 0x02


;--------------------------------------------------
; Constants for PWM_01 user defined values
;--------------------------------------------------

PWM_01_PERIOD:                             equ 0xf9
PWM_01_PULSE_WIDTH:                        equ 0x64


;--------------------------------------------------
; Register Address Constants for PWM_01
;--------------------------------------------------

PWM_01_COUNTER_REG:                    equ 0x24   ; DR0 Count register
PWM_01_PERIOD_REG:                     equ 0x25   ; DR1 Period register
PWM_01_COMPARE_REG:                    equ 0x26   ; DR2 Compare register
PWM_01_CONTROL_REG:                    equ 0x27   ; Control register
PWM_01_FUNC_REG:                       equ 0x24   ; Function register
PWM_01_INPUT_REG:                      equ 0x25   ; Input register
PWM_01_OUTPUT_REG:                     equ 0x26   ; Output register


;--------------------------------------------------
; PWM_01 Macro 'Functions'
;--------------------------------------------------

   macro PWM_01_Start_M
   or    reg[PWM_01_CONTROL_REG],  PWM_01_CONTROL_REG_START_BIT
   endm

   macro PWM_01_Stop_M
   and   reg[PWM_01_CONTROL_REG], ~PWM_01_CONTROL_REG_START_BIT
   endm

   macro PWM_01_EnableInt_M
   M8C_EnableIntMask PWM_01_INT_REG, PWM_01_INT_MASK
   endm

   macro PWM_01_DisableInt_M
   M8C_DisableIntMask PWM_01_INT_REG, PWM_01_INT_MASK
   endm


; end of file PWM_01.inc

⌨️ 快捷键说明

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