serial global instance fix (#1243)

This commit is contained in:
KEDARUMA FANTASTIC 2018-04-07 01:02:59 +09:00 committed by Me No Dev
parent f6a4b024c7
commit c01e5563c8
2 changed files with 4 additions and 0 deletions

View File

@ -5,7 +5,9 @@
#include "HardwareSerial.h"
#if !defined(NO_GLOBAL_INSTANCES) && !defined(NO_GLOBAL_SERIAL)
HardwareSerial Serial(0);
#endif
HardwareSerial::HardwareSerial(int uart_nr) : _uart_nr(uart_nr), _uart(NULL) {}

View File

@ -76,6 +76,8 @@ protected:
uart_t* _uart;
};
#if !defined(NO_GLOBAL_INSTANCES) && !defined(NO_GLOBAL_SERIAL)
extern HardwareSerial Serial;
#endif
#endif