📄 rsbjinv120sw.c
字号:
/***********************************************************************/
/* */
/* FILE :RSBJINV120SW.c */
/* DATE :Mon, Jul 31, 2006 */
/* DESCRIPTION :main program file. */
/* CPU GROUP :28(ROM96K) */
/* */
/* This file is generated by Renesas Project Generator (Ver.4.5). */
/* */
/***********************************************************************/
#include "hw_init.h"
#include "sfr26a.h"
#include "uart.h"
/* Declaration the prototype of external functions */
extern void pwm_initial(void);
extern void motor_run(void);
extern void main_pwm_120slc20(void);
extern void ActSpdCal(void);
/*End of Declaration the prototype of external functions */
#ifdef DEBUG
#include "com_ram.h"
#include "ioport.h"
#include "systimer.h"
extern UINT_8 PTC_OUT;
#endif
void main(void);
void main(void)
{
static UINT_8 s_MotStaFlg = 0;
for(;;)
{
if( true == hw_init() ) /* H/W initialization */
{
for(;;)
{
if ( ir_ta3ic ) /*every 10 ms */
{
ir_ta3ic = 0;
//CheckError(); /* Uart communication error monitor program*/
ActSpdCal(); /* Actrual speed counter */
#ifdef DEBUG
PTC_out();
sys_timer();
#endif
}
else
{
;
}
//CheckUart(); /* Uart communication program*/
#ifndef DEBUG
if ( 0 == s_MotStaFlg)
{
s_MotStaFlg = 0xff;
PWM_initial(); /* 3-ph pwm output initialization*/
}
else
{
motor_run();/* motor control process */
}
#endif
#ifdef DEBUG
//#include "com_ram.h"
if ( 0 == PTC_OUT )
{
if ( 0 == s_MotStaFlg)
{
s_MotStaFlg = 0xff;
PWM_initial(); /* 3-ph pwm output initialization*/
wr_ref = 1256;
}
else
{
main_pwm_120slc20();
}
}
#endif
}
}
else
{
;
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -