 #include <Arduino.h>
 
 #ifdef __AVR_ATmega328P__ // use a modified SoftwareSerial implementation
+#define USE_SOFT_PARITY 1
+#endif
+
+#if USE_SOFT_PARITY
 
 #include "ParitySerial.h"
 


// special infinite loop to trigger target autobaud and wait for ACK or NAK
static void connectToTarget () {
#ifdef __AVR_ATmega328P__   // use a modified SoftwareSerial implementation
    Target.begin(9600);
#else                       // use serial port hardware, set to even parity
    Target.begin(9600, SERIAL_8E1);
#endif

    uint8_t b = 0;

        Serial.print(".");
        Target.write(0x7F);
        b = getReply();
    } while (b != ACK && b != NAK); // NAK is fine, it's still a response
}

