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

📄 pwm8.inc

📁 塞扑拉思 psoc spi模块 作为master 的应用程序.
💻 INC
字号:
;;*****************************************************************************
;;*****************************************************************************
;;  FILENAME: PWM8.inc
;;   Version: 2.5, Updated on 2006/05/15 at 15:09:31
;;  Generated by PSoC Designer ver 4.3  b1884 : 23 June, 2006
;;
;;  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 PWM8 API's.
;--------------------------------------------------

PWM8_CONTROL_REG_START_BIT:                equ 0x01    ; Control register start bit
PWM8_INT_REG:                              equ 0x0e1
PWM8_INT_MASK:                             equ 0x01


;--------------------------------------------------
; Constants for PWM8 user defined values
;--------------------------------------------------

PWM8_PERIOD:                               equ 0x14
PWM8_PULSE_WIDTH:                          equ 0x0a


;--------------------------------------------------
; Register Address Constants for PWM8
;--------------------------------------------------

PWM8_COUNTER_REG:                      equ 0x20   ; DR0 Count register
PWM8_PERIOD_REG:                       equ 0x21   ; DR1 Period register
PWM8_COMPARE_REG:                      equ 0x22   ; DR2 Compare register
PWM8_CONTROL_REG:                      equ 0x23   ; Control register
PWM8_FUNC_REG:                         equ 0x20   ; Function register
PWM8_INPUT_REG:                        equ 0x21   ; Input register
PWM8_OUTPUT_REG:                       equ 0x22   ; Output register


;--------------------------------------------------
; PWM8 Macro 'Functions'
;--------------------------------------------------

   macro PWM8_Start_M
   or    reg[PWM8_CONTROL_REG],  PWM8_CONTROL_REG_START_BIT
   endm

   macro PWM8_Stop_M
   and   reg[PWM8_CONTROL_REG], ~PWM8_CONTROL_REG_START_BIT
   endm

   macro PWM8_EnableInt_M
   M8C_EnableIntMask PWM8_INT_REG, PWM8_INT_MASK
   endm

   macro PWM8_DisableInt_M
   M8C_DisableIntMask PWM8_INT_REG, PWM8_INT_MASK
   endm


; end of file PWM8.inc

⌨️ 快捷键说明

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