main.c
来自「飞思卡尔测速程序,PT0脉冲累计,RTL实」· C语言 代码 · 共 41 行
C
41 行
#include <hidef.h> /* common defines and macros */
#include <mc9s12dg128.h> /* derivative information */
#include"PLL.h"
#include"PWM.h"
#include"testspeed.h"
#pragma LINK_INFO DERIVATIVE "mc9s12dg128b"
unsigned int speed_m=0;
/*测速模块.PT0*/
void main(void) {
/* put your own code here */
DisableInterrupts;
PLL_Init();
Start_PLL();
PWM_Init();
PaiInit();
RealTimer_Int();
PWMDTY0=0;
PWMDTY1=25;
PWME |=PWME_PWME0_MASK+PWME_PWME1_MASK;
EnableInterrupts;
for(;;) {} /* wait forever */
/* please make sure that you never leave this function */
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?