pxa255_pwm.h

来自「老外的一个开源项目」· C头文件 代码 · 共 60 行

H
60
字号
// Copyright (c) David Vescovi.  All rights reserved.
// Part of Project DrumStix
// Windows Embedded Developers Interest Group (WE-DIG) community project.
// http://www.we-dig.org
// Copyright (c) Microsoft Corporation.  All rights reserved.
//------------------------------------------------------------------------------
//
//  Header: pxa255_pwm.h
//
//  Defines the PWM register layout and associated types and constants.
//
//------------------------------------------------------------------------------
#ifndef _PXA255_PWM_H_
#define _PXA255_PWM_H_

#if __cplusplus
extern "C" {
#endif


//------------------------------------------------------------------------------
//
//  Type: PWM_REG_T    
//
//  Defines the PWM control register layout.
//
//------------------------------------------------------------------------------

typedef struct
{
	VUINT32_T	PWMCTRL;		//PWM control register 0
	VUINT32_T	PWMDUTY;		//PWM duty cycle register
	VUINT32_T	PWMPERVAL;		//PWM period control register
} PWM_REG_T, *PPWM_REG_T;

//
// PWMCTRL bits
//
#define PWMCTRL_PRESCALE	(0x3fu << 0)
#define PWMCTRL_PWM_SD		0x00000040

//
// PWMDUTY Bits
//
#define PWMDUTY_DCYCLE		(0x3ffu << 0)
#define PWMCTRL_FDCYCLE		0x00000400

//
// PWMPERVAL Bits
//
#define PWMPERVAL_PV		(0x3ffu << 0)

//------------------------------------------------------------------------------

#if __cplusplus
}
#endif

#endif 

⌨️ 快捷键说明

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