Go Down

Topic: Defining a serial port (Read 303 times) previous topic - next topic

fjramirez

Hello,
I have two libraries, Pollserial and OBD

In my program I want to work with Pollserial serial port, but obd library works with port SerialO.

Obd.cpp:
 
Quote
#ifndef OBDUART
#define OBDUART Serial
#endif 


And to state the serial port I use (Serial0) M ain.cpp:

Quote
#include <pollserial.h>
pollserial pserial;


What do I have to do to use the port obd.cpp pserial?

¿?
 
Quote
#ifndef OBDUART
#include <pollserial.h>
pollserial pserial;
#define OBDUART pserial
#endif 

Alone with or duplicate definition errors.

Go Up