📄 pxa255_pwm.h
字号:
// 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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -