Switch macro-defined learning

Source: Internet
Author: User
#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 ()//init infrared wave capture
}

#endif

This macro definition means that the following program is executed as soon as the DEBUG_IR_RCV is defined. Whether the defined DEBUG_IR_RCV is 0 or not 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 ()//init infrared wave capture
}

#endif DEBUG_IR_RCV macro definition must be not 0 to perform the following program

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.