#ifdef DEBUG_IR_RCV
void __imulate(void)
{
ir_eng.g_ir_state = IR_START;
ir_eng.g_overflow_cnt = 0;
_irwave.waveid[0] = 9;
_irwave.bitcnt = 0;
_irwave.bits_type_cnt = 0;
start_capture();//初始化红外波捕捉
}
void __imulate(void)
{
ir_eng.g_ir_state = IR_START;
ir_eng.g_overflow_cnt = 0;
_irwave.waveid[0] = 9;
_irwave.bitcnt = 0;
_irwave.bits_type_cnt = 0;
start_capture();//初始化红外波捕捉
}
#endif
这个宏定义的意思是只要定义了DEBUG_IR_RCV就会执行下面的程序。无论定义的DEBUG_IR_RCV是0还是非0。
#if DEBUG_IR_RCV
void __imulate(void)
{
ir_eng.g_ir_state = IR_START;
ir_eng.g_overflow_cnt = 0;
_irwave.waveid[0] = 9;
_irwave.bitcnt = 0;
_irwave.bits_type_cnt = 0;
start_capture();//初始化红外波捕捉
}
#endif
DEBUG_IR_RCV宏定义必须为非0才可以执行下面的程序