File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change 39
39
#endif
40
40
#endif
41
41
42
- #define USE_SW_SERIAL // /< comment this out if you don't want to include
43
- // /< software serial in the library
42
+ #if (defined(__AVR__) || defined(ESP8266)) && !defined(NO_SW_SERIAL)
43
+ #define USE_SW_SERIAL // /< insert line `#define NO_SW_SERIAL` before this header
44
+ // /< if you don't want to include software serial in the
45
+ #endif // /< library
44
46
#define GPS_DEFAULT_I2C_ADDR \
45
47
0x10 // /< The default address for I2C transport of GPS data
46
48
#define GPS_MAX_I2C_TRANSFER \
54
56
3 // /< maximum length of a source ID name, including terminating 0
55
57
56
58
#include " Arduino.h"
57
- #if (defined(__AVR__) || defined(ESP8266)) && defined( USE_SW_SERIAL)
59
+ #ifdef USE_SW_SERIAL
58
60
#include < SoftwareSerial.h>
59
61
#endif
60
62
#include < Adafruit_PMTK.h>
@@ -83,7 +85,7 @@ class Adafruit_GPS : public Print {
83
85
// Adafruit_GPS.cpp
84
86
bool begin (uint32_t baud_or_i2caddr);
85
87
86
- #if (defined(__AVR__) || defined(ESP8266)) && defined( USE_SW_SERIAL)
88
+ #ifdef USE_SW_SERIAL
87
89
Adafruit_GPS (SoftwareSerial *ser); // Constructor when using SoftwareSerial
88
90
#endif
89
91
Adafruit_GPS (HardwareSerial *ser); // Constructor when using HardwareSerial
@@ -281,7 +283,7 @@ class Adafruit_GPS : public Print {
281
283
bool paused;
282
284
283
285
uint8_t parseResponse (char *response);
284
- #if (defined(__AVR__) || defined(ESP8266)) && defined( USE_SW_SERIAL)
286
+ #ifdef USE_SW_SERIAL
285
287
SoftwareSerial *gpsSwSerial;
286
288
#endif
287
289
bool noComms = false ;
You can’t perform that action at this time.
0 commit comments