Page 1 of 1

Conditional Compilation directives list

PostPosted: Mon Jun 01, 2015 3:37 pm
by Timbo
Hi,

Is there a list of the system directives

I see code like

#if _clock = 3 Or _clock = 4 Or _clock = 8 Or _clock = 10

Really at this time I'm looking how to do conditional code for the Firewing18 and Firewing24 boards but cannot find the _device xxx constant eg:-

#If _FireWIng18 then

#Else

#End if

Re: Conditional Compilation directives list

PostPosted: Mon Jun 01, 2015 4:48 pm
by Jerry Messina
You could directly check for the '_device' , ie
Code: Select all
#if (_device = 18F26K22)
#elseif (_device = 24HJ128GP504)
#endif

or to pick between pic18/pic24 you could just check for the '_core' type
Code: Select all
#if (_core = 18)      // pic18
#elseif (_core = 24)  //pic24
#elseif (_core = 32)  // pic32
#endif