📄 main.c
字号:
//========================================================================
// The information contained herein is the exclusive property of
// Sunplus Technology Co. And shall not be distributed, reproduced,
// or disclosed in whole in part without prior written permission.
// (C) COPYRIGHT 2001 SUNPLUS TECHNOLOGY CO.
// ALL RIGHTS RESERVED
// The entire notice above must be reproduced on all authorized copies.
//========================================================================
//========================================================================
// Filename: main.c
// Author: Lianshu Mou (email: Lianshu@sunnorth.com.cn)
// Date: 2004/08/05
// Description:
//
// Reference:
// Revision:
// 2004/08/05 First version
//========================================================================
#include "Spmc75_regs.h"
#include "mcMACRO.h"
#include "Spmc75_dmc_uart_ext.h"
#include "SPMC75_SPWM_ISR.h"
extern int g_iMoto_Run_Time;
main()
{
Disable_FIQ_IRQ();
SPMC75_SPWM_TMR_Init(0,0);
MC75_DMC_UART_Setup(9600);
Systime_Init();
INT_IRQ();
while(1)
{
MC75_DMC_UART_Service();
SPMC75_Moto_RUN_F_Set(SPMC_DMC_Load_SpdCmd (1),0);
if(g_iMoto_Run_Time > 9)
{
g_iMoto_Run_Time = 0;
SPMC75_Moto_RUN_Ctrl(0);
SPMC_DMC_Save_SpdNow(1,g_SPWM_Data_Temp[0].Currently_F);
}
}
}
//=================================================================================================
// Description: IRQ3 interrupt source is XXX,used to XXX
// Notes: 已没有问题
//=================================================================================================
void IRQ3(void) __attribute__ ((ISR));
void IRQ3(void)
{
if(P_TMR3_Status->B.TPRIF) //550 Cydes 在正式版的程序中会更改正弦表
{ //可以进一步节约时间
P_TMR3_Status->B.TPRIF = 1; //Clear TPRIF flag
SPMC75_SPWM_ISR(0);
}
}
//========================================================================
// Description: IRQ2 interrupt source is XXX,used to XXX
// Notes:
//========================================================================
void IRQ6(void) __attribute__ ((ISR));
void IRQ6(void)
{
if(P_UART_Status->B.RXIF && P_UART_Ctrl->B.RXIE)
MC75_DMC_RcvStream();
}
void BREAK(void) __attribute__ ((ISR));
void BREAK(void)
{
}
//========================================================================
// Description: IRQ0 interrupt source is XXX,used to XXX
// Notes:
//========================================================================
void IRQ0(void) __attribute__ ((ISR));
void IRQ0(void)
{
}
//========================================================================
// Description: IRQ1 interrupt source is XXX,used to XXX
// Notes:
//========================================================================
void IRQ1(void) __attribute__ ((ISR));
void IRQ1(void)
{
}
//========================================================================
// Description: IRQ2 interrupt source is XXX,used to XXX
// Notes:
//========================================================================
void IRQ2(void) __attribute__ ((ISR));
void IRQ2(void)
{
}
//========================================================================
// Description: IRQ5 interrupt source is XXX,used to XXX
// Notes:
//========================================================================
void IRQ5(void) __attribute__ ((ISR));
void IRQ5(void)
{
}
//========================================================================
// Description: IRQ7 interrupt source is XXX,used to XXX
// Notes:
//========================================================================
void IRQ7(void) __attribute__ ((ISR));
void IRQ7(void)
{
}
//========================================================================
// Description: IRQ3 interrupt source is XXX,used to XXX
// Notes:
//========================================================================
void FIQ(void) __attribute__ ((ISR));
void FIQ(void)
{
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -