Fixed issue caused by renaming SerialUSB to Serial for non Maple boards - i.e double definition of Serial

This commit is contained in:
Roger Clark 2014-12-05 09:29:11 +11:00
parent 98a44d8744
commit 31349f5aec
4 changed files with 18 additions and 11 deletions

View File

@ -203,8 +203,10 @@ uint8 USBSerial::getRTS(void) {
}
#if BOARD_HAVE_SERIALUSB
//USBSerial SerialUSB;
USBSerial Serial;
#ifdef BOOTLOADER_maple
//USBSerial SerialUSB;
USBSerial Serial;
#endif
#endif
/*

View File

@ -72,8 +72,10 @@ public:
};
#if BOARD_HAVE_SERIALUSB
//extern USBSerial SerialUSB;
extern USBSerial Serial;
#ifdef BOOTLOADER_maple
//extern USBSerial SerialUSB;
extern USBSerial Serial;
#endif
#endif
#endif

View File

@ -75,8 +75,10 @@ namespace wirish {
__weak void board_setup_usb(void) {
#if BOARD_HAVE_SERIALUSB
// SerialUSB.begin();
Serial.begin()
#ifdef BOOTLOADER_maple
// SerialUSB.begin();
Serial.begin();// Roger Clark. Changed SerialUSB to Serial for Arduino sketch compatibility
#endif
#endif
}

View File

@ -75,11 +75,12 @@ namespace wirish {
__weak void board_setup_usb(void) {
#if BOARD_HAVE_SERIALUSB
// SerialUSB.begin();
Serial.begin();// Roger Clark. Attempted to Change SerialUSB to Serial for Arduino sketch compatibility
#endif
}
#ifdef BOOTLOADER_maple
// SerialUSB.begin();
Serial.begin();// Roger Clark. Changed SerialUSB to Serial for Arduino sketch compatibility
#endif
#endif
}
__weak void series_init(void) {
// Initialize AFIO here, too, so peripheral remaps and external