From 42866db251a4016d123f063a1e6f434a8fb5266e Mon Sep 17 00:00:00 2001
From: Scott Lahteine <github@thinkyhead.com>
Date: Wed, 7 Feb 2018 06:13:28 -0600
Subject: [PATCH] Fix compile with BLUETOOTH

Addressing #7110
---
 Marlin/SanityCheck.h | 2 ++
 Marlin/serial.h      | 1 +
 2 files changed, 3 insertions(+)

diff --git a/Marlin/SanityCheck.h b/Marlin/SanityCheck.h
index 7e11dc413da..9d97ee130ea 100644
--- a/Marlin/SanityCheck.h
+++ b/Marlin/SanityCheck.h
@@ -276,6 +276,8 @@
     #error "RX_BUFFER_SIZE must be a power of 2 greater than 1."
   #elif TX_BUFFER_SIZE && (TX_BUFFER_SIZE < 2 || TX_BUFFER_SIZE > 256 || !IS_POWER_OF_2(TX_BUFFER_SIZE))
     #error "TX_BUFFER_SIZE must be 0, a power of 2 greater than 1, and no greater than 256."
+  #elif ENABLED(BLUETOOTH)
+    #error "BLUETOOTH is only supported with AT90USB."
   #endif
 #elif ENABLED(SERIAL_XON_XOFF) || ENABLED(SERIAL_STATS_MAX_RX_QUEUED) || ENABLED(SERIAL_STATS_DROPPED_RX)
   #error "SERIAL_XON_XOFF and SERIAL_STATS_* features not supported on USB-native AVR devices."
diff --git a/Marlin/serial.h b/Marlin/serial.h
index 1c98c8ee6f7..046419720c3 100644
--- a/Marlin/serial.h
+++ b/Marlin/serial.h
@@ -28,6 +28,7 @@
 #ifdef USBCON
   #include <HardwareSerial.h>
   #if ENABLED(BLUETOOTH)
+    extern HardwareSerial bluetoothSerial;
     #define MYSERIAL bluetoothSerial
   #else
     #define MYSERIAL Serial