C:/nxpdrv/LPC1700CMSIS/Drivers/include/lpc17xx_mcpwm.h File Reference
: Contains all macro definitions and function prototypes support for Motor Control PWM firmware library on LPC17xx More...
#include "LPC17xx.h"
#include "lpc_types.h"
Go to the source code of this file.
Data Structures | |
struct | MCPWM_CHANNEL_CFG_Type |
Motor Control PWM Channel Configuration structure type definition. More... | |
struct | MCPWM_CAPTURE_CFG_Type |
MCPWM Capture Configuration type definition. More... | |
struct | MCPWM_COUNT_CFG_Type |
MCPWM Count Control Configuration type definition. More... | |
Defines | |
#define | MCPWM_CON_RUN(n) (((n>=0)&&(n<=2)) ? ((uint32_t)(1<<((n*8)+0))) : (0)) |
#define | MCPWM_CON_CENTER(n) (((n>=0)&&(n<=2)) ? ((uint32_t)(1<<((n*8)+1))) : (0)) |
#define | MCPWM_CON_POLAR(n) (((n>=0)&&(n<=2)) ? ((uint32_t)(1<<((n*8)+2))) : (0)) |
#define | MCPWM_CON_DTE(n) (((n>=0)&&(n<=2)) ? ((uint32_t)(1<<((n*8)+3))) : (0)) |
#define | MCPWM_CON_DISUP(n) (((n>=0)&&(n<=2)) ? ((uint32_t)(1<<((n*8)+4))) : (0)) |
#define | MCPWM_CON_INVBDC ((uint32_t)(1<<29)) |
#define | MCPWM_CON_ACMODE ((uint32_t)(1<<30)) |
#define | MCPWM_CON_DCMODE ((uint32_t)(1<<31)) |
#define | MCPWM_CAPCON_CAPMCI_RE(cap, mci) (((cap>=0)&&(cap<=2)&&(mci>=0)&&(mci<=2)) ? ((uint32_t)(1<<((cap*6)+(mci*2)+0))) : (0)) |
#define | MCPWM_CAPCON_CAPMCI_FE(cap, mci) (((cap>=0)&&(cap<=2)&&(mci>=0)&&(mci<=2)) ? ((uint32_t)(1<<((cap*6)+(mci*2)+1))) : (0)) |
#define | MCPWM_CAPCON_RT(n) (((n>=0)&&(n<=2)) ? ((uint32_t)(1<<(18+(n)))) : (0)) |
#define | MCPWM_CAPCON_HNFCAP(n) (((n>=0)&&(n<=2)) ? ((uint32_t)(1<<(21+(n)))) : (0)) |
#define | MCPWM_INT_ILIM(n) (((n>=0)&&(n<=2)) ? ((uint32_t)(1<<((n*4)+0))) : (0)) |
#define | MCPWM_INT_IMAT(n) (((n>=0)&&(n<=2)) ? ((uint32_t)(1<<((n*4)+1))) : (0)) |
#define | MCPWM_INT_ICAP(n) (((n>=0)&&(n<=2)) ? ((uint32_t)(1<<((n*4)+2))) : (0)) |
#define | MCPWM_INT_ABORT ((uint32_t)(1<<15)) |
#define | MCPWM_CNTCON_TCMCI_RE(tc, mci) (((tc>=0)&&(tc<=2)&&(mci>=0)&&(mci<=2)) ? ((uint32_t)(1<<((6*tc)+(2*mci)+0))) : (0)) |
#define | MCPWM_CNTCON_TCMCI_FE(tc, mci) (((tc>=0)&&(tc<=2)&&(mci>=0)&&(mci<=2)) ? ((uint32_t)(1<<((6*tc)+(2*mci)+1))) : (0)) |
#define | MCPWM_CNTCON_CNTR(n) (((n>=0)&&(n<=2)) ? ((uint32_t)(1<<(29+n))) : (0)) |
#define | MCPWM_DT(n, x) (((n>=0)&&(n<=2)) ? ((uint32_t)((x&0x3FF)<<(n*10))) : (0)) |
#define | MCPWM_CP_A0 ((uint32_t)(1<<0)) |
#define | MCPWM_CP_B0 ((uint32_t)(1<<1)) |
#define | MCPWM_CP_A1 ((uint32_t)(1<<2)) |
#define | MCPWM_CP_B1 ((uint32_t)(1<<3)) |
#define | MCPWM_CP_A2 ((uint32_t)(1<<4)) |
#define | MCPWM_CP_B2 ((uint32_t)(1<<5)) |
#define | MCPWM_CAPCLR_CAP(n) (((n>=0)&&(n<=2)) ? ((uint32_t)(1<<n)) : (0)) |
#define | MCPWM_CHANNEL_EDGE_MODE ((uint32_t)(0)) |
#define | MCPWM_CHANNEL_CENTER_MODE ((uint32_t)(1)) |
#define | MCPWM_CHANNEL_PASSIVE_LO ((uint32_t)(0)) |
#define | MCPWM_CHANNEL_PASSIVE_HI ((uint32_t)(1)) |
#define | MCPWM_PATENT_A0 ((uint32_t)(1<<0)) |
#define | MCPWM_PATENT_B0 ((uint32_t)(1<<1)) |
#define | MCPWM_PATENT_A1 ((uint32_t)(1<<2)) |
#define | MCPWM_PATENT_B1 ((uint32_t)(1<<3)) |
#define | MCPWM_PATENT_A2 ((uint32_t)(1<<4)) |
#define | MCPWM_PATENT_B2 ((uint32_t)(1<<5)) |
#define | MCPWM_INTFLAG_LIM0 MCPWM_INT_ILIM(0) |
#define | MCPWM_INTFLAG_MAT0 MCPWM_INT_IMAT(0) |
#define | MCPWM_INTFLAG_CAP0 MCPWM_INT_ICAP(0) |
#define | MCPWM_INTFLAG_LIM1 MCPWM_INT_ILIM(1) |
#define | MCPWM_INTFLAG_MAT1 MCPWM_INT_IMAT(1) |
#define | MCPWM_INTFLAG_CAP1 MCPWM_INT_ICAP(1) |
#define | MCPWM_INTFLAG_LIM2 MCPWM_INT_ILIM(2) |
#define | MCPWM_INTFLAG_MAT2 MCPWM_INT_IMAT(2) |
#define | MCPWM_INTFLAG_CAP2 MCPWM_INT_ICAP(2) |
#define | MCPWM_INTFLAG_ABORT MCPWM_INT_ABORT |
Functions | |
void | MCPWM_Init (LPC_MCPWM_TypeDef *MCPWMx) |
Initializes the MCPWM peripheral. | |
void | MCPWM_ConfigChannel (LPC_MCPWM_TypeDef *MCPWMx, uint32_t channelNum, MCPWM_CHANNEL_CFG_Type *channelSetup) |
Configures each channel in MCPWM peripheral according to the specified parameters in the MCPWM_CHANNEL_CFG_Type. | |
void | MCPWM_WriteToShadow (LPC_MCPWM_TypeDef *MCPWMx, uint32_t channelNum, MCPWM_CHANNEL_CFG_Type *channelSetup) |
Write to MCPWM shadow registers - Update the value for period and pulse width in MCPWM peripheral. | |
void | MCPWM_ConfigCapture (LPC_MCPWM_TypeDef *MCPWMx, uint32_t channelNum, MCPWM_CAPTURE_CFG_Type *captureConfig) |
Configures capture function in MCPWM peripheral. | |
void | MCPWM_ClearCapture (LPC_MCPWM_TypeDef *MCPWMx, uint32_t captureChannel) |
Clears current captured value in specified capture channel. | |
uint32_t | MCPWM_GetCapture (LPC_MCPWM_TypeDef *MCPWMx, uint32_t captureChannel) |
Get current captured value in specified capture channel. | |
void | MCPWM_CountConfig (LPC_MCPWM_TypeDef *MCPWMx, uint32_t channelNum, uint32_t countMode, MCPWM_COUNT_CFG_Type *countConfig) |
Configures Count control in MCPWM peripheral. | |
void | MCPWM_Start (LPC_MCPWM_TypeDef *MCPWMx, uint32_t channel0, uint32_t channel1, uint32_t channel2) |
Start MCPWM activity for each MCPWM channel. | |
void | MCPWM_Stop (LPC_MCPWM_TypeDef *MCPWMx, uint32_t channel0, uint32_t channel1, uint32_t channel2) |
Stop MCPWM activity for each MCPWM channel. | |
void | MCPWM_ACMode (LPC_MCPWM_TypeDef *MCPWMx, uint32_t acMode) |
Enables/Disables 3-phase AC motor mode on MCPWM peripheral. | |
void | MCPWM_DCMode (LPC_MCPWM_TypeDef *MCPWMx, uint32_t dcMode, uint32_t outputInvered, uint32_t outputPattern) |
Enables/Disables 3-phase DC motor mode on MCPWM peripheral. | |
void | MCPWM_IntConfig (LPC_MCPWM_TypeDef *MCPWMx, uint32_t ulIntType, FunctionalState NewState) |
Configures the specified interrupt in MCPWM peripheral. | |
void | MCPWM_IntSet (LPC_MCPWM_TypeDef *MCPWMx, uint32_t ulIntType) |
Sets/Forces the specified interrupt for MCPWM peripheral. | |
void | MCPWM_IntClear (LPC_MCPWM_TypeDef *MCPWMx, uint32_t ulIntType) |
Clear the specified interrupt pending for MCPWM peripheral. | |
FlagStatus | MCPWM_GetIntStatus (LPC_MCPWM_TypeDef *MCPWMx, uint32_t ulIntType) |
Check whether if the specified interrupt in MCPWM is set or not. |
Detailed Description
: Contains all macro definitions and function prototypes support for Motor Control PWM firmware library on LPC17xx
- Version:
- : 1.0
- Date:
- : 28. May. 2009
- Author:
- : HieuNguyen
Definition in file lpc17xx_mcpwm.h.
Generated on Mon Feb 8 10:01:39 2010 for LPC1700CMSIS Standard Peripheral Firmware Library by
