lle_xgpwm.h
来自「BCM 控制demo源代码」· C头文件 代码 · 共 56 行
H
56 行
/*******************************************************************************/
/**
Copyright (c) 2007 Freescale Semiconductor
\file lle_XGPWM.h
\brief Shared variables and function prototypes for XGATE-PWM generation
\author Freescale Semiconductor
\author B05114
\version 1.0
\date April/2007
*/
/*******************************************************************************/
#ifndef _LLE_XGPWM_H
#define _LLE_XGPWM_H
/** S12X derivative information */
#include <MC9S12XEP100.h>
/** Variable types and common definitions */
#include "typedefs.h"
/* PWM channel struct */
typedef struct
{
UINT8 *port; /* Pointer to data port register */
UINT8 *ddr; /* Pointer to direction register of port */
UINT8 port_mask; /* Individual pin of port dedicated to be PWM */
UINT8 period; /* Period owerflow value */
UINT8 cnt; /* PWM counter */
UINT8 duty; /* Duty value */
}PWMChannel;
/* Shared variables */
#pragma DATA_SEG SHARED_DATA
extern volatile PWMChannel xPWM_ch[2]; /* Array of PWM channels structs */
#pragma DATA_SEG DEFAULT
/** Function Prototypes */
/** Periodic interrupt timer initialization */
void lle_Init_PIT(void);
/** PWM initialization */
void lle_Init_PWM(void);
/** Set PWM duty cycle */
void lle_Set_PWM_DutyCycle(PWMChannel volatile *ch,byte duty);
#endif /* _LLE_XGPWM_H */
/*******************************************************************************/
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?