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

📄 pwm.h

📁 基于c的电动机保护程序
💻 H
字号:
/*************************************************************************************
*	Copyright (c) 2005 by National ASIC System Engineering Research Center.
*	PROPRIETARY RIGHTS of ASIC are involved in the subject matter of this 
*	material.  All manufacturing, reproduction, use, and sales rights 
*	pertaining to this subject matter are governed by the license agreement.
*	The recipient of this software implicitly accepts the terms of the license.
*
*	File Name: pwm.h
*
*	File Description:
*			The file define some macro definition used in pwm.c file.
*		
*	Created by Michael <yuyu_zh@seu.edu.cn>, 2005-03-29
**************************************************************************************/

#ifndef PWM_H
#define PWM_H

#include "typedef.h"

//#define FIX_LAB
#define UNFIX_LAB

/* definition of register address */
#define 		PWM_BASE		0X1000C000

//#define 		PWM1_C			(PWM_BASE + 0X00)  //PWM1对应于SEP3203的9脚,PWM1_C为控制寄存器
//#define 		PWM1_S			(PWM_BASE + 0X04)  //PWM1_S为采样寄存器
//#define		PWM1_P			(PWM_BASE + 0X08)  //PWM1_P为周期寄存器
//#define 		PWM1_CNT		(PWM_BASE + 0X0C)  //PWM1_CNT为计数器寄存器

#define 		PWM2_C			(PWM_BASE + 0X10)  //PWM2对应于SEP3203的8脚,PWM2_C为控制寄存器
#define 		PWM2_S			(PWM_BASE + 0X14)  //PWM2_S为采样寄存器
#define		    PWM2_P			(PWM_BASE + 0X18)  //PWM2_P为周期寄存器
#define 		PWM2_CNT		(PWM_BASE + 0X1C)  //PWM2_CNT为计数器寄存器

/* declaration of function */
STATUS	ModulePwm(void);
STATUS	set_fix(void);
STATUS	set_unfix(U8 prescaler);
void	run_pwm(void);

#endif

⌨️ 快捷键说明

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