AnsweredAssumed Answered

C file not recognizing #define

Question asked by McC.Joe on Dec 9, 2016
Latest reply on Dec 14, 2016 by AvaTar

My IDE has a feature that uses less contrasting text for code that is "inactive" (not included)
 from this I found that some code is not being included that i had expected to be.
 

For instance stm32f0xx_ll_tim.c   #includes stm32f0xx_ll_tim.h,  which in itself #includes stm32f0xx.h, which #includes stm32f030x8.h  which #defines TIM3. There is a line in stm32f0xx_ll_tim.c that reads ...


 #if defined (TIM1) || defined (TIM2) || defined (TIM3)
  {
      then do this
  }
 
 but the "then do this" code is not highlighted
 I would of thought stm32f0xx_ll.c would know of TIM3 existance because of the
 nested includes but it doesnt.
 
 Am I missing something?

Outcomes