设置编译器报错来提示相关性的东西用于一齐定义或设置

<设置编译报错>

  使用预编译指令 #if (依据), #error  "提示信息"

 1 /* The timers module relies on xTaskGetSchedulerState(). */
 2 #if configUSE_TIMERS == 1
 3 
 4     #ifndef configTIMER_TASK_PRIORITY
 5         #error If configUSE_TIMERS is set to 1 then configTIMER_TASK_PRIORITY must also be defined.
 6     #endif /* configTIMER_TASK_PRIORITY */
 7 
 8     #ifndef configTIMER_QUEUE_LENGTH
 9         #error If configUSE_TIMERS is set to 1 then configTIMER_QUEUE_LENGTH must also be defined.
10     #endif /* configTIMER_QUEUE_LENGTH */
11 
12     #ifndef configTIMER_TASK_STACK_DEPTH
13         #error If configUSE_TIMERS is set to 1 then configTIMER_TASK_STACK_DEPTH must also be defined.
14     #endif /* configTIMER_TASK_STACK_DEPTH */
15 
16 #endif /* configUSE_TIMERS */
原文地址:https://www.cnblogs.com/skullboyer/p/8523084.html