Quantcast
Channel: MSP430 Technical Forums
Viewing all articles
Browse latest Browse all 2077

How to select correct include file

$
0
0

G'day

I'm porting a sketch from F5529 to Tiva, and want to be able to use the sketch on both (until debugged). I thought the following would work:

 

#define _TIVA true    //true for Tiva, false for F5529

#if (_TIVA)
   #include "TM4C_DS18B20.h"
#else
   #include "GFDS18B20.h"
#endif

 

But I get multiple definition of `DS18B20:.. errors , when I compile.

Is there a way around this.

 

 


Viewing all articles
Browse latest Browse all 2077

Trending Articles