Combine __AVR__ and USBCON for 2.0.x parity
This commit is contained in:
parent
c05c5d96d9
commit
5ce64f6d16
@ -31,7 +31,7 @@
|
|||||||
#include "Conditionals_LCD.h"
|
#include "Conditionals_LCD.h"
|
||||||
#include "Configuration_adv.h"
|
#include "Configuration_adv.h"
|
||||||
#include "pins.h"
|
#include "pins.h"
|
||||||
#ifndef USBCON
|
#if defined(__AVR__) && !defined(USBCON)
|
||||||
#define HardwareSerial_h // trick to disable the standard HWserial
|
#define HardwareSerial_h // trick to disable the standard HWserial
|
||||||
#endif
|
#endif
|
||||||
#include "Arduino.h"
|
#include "Arduino.h"
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
|
|
||||||
#include "MarlinConfig.h"
|
#include "MarlinConfig.h"
|
||||||
|
|
||||||
#if !defined(USBCON) && (defined(UBRRH) || defined(UBRR0H) || defined(UBRR1H) || defined(UBRR2H) || defined(UBRR3H))
|
#if !(defined(__AVR__) && defined(USBCON)) && (defined(UBRRH) || defined(UBRR0H) || defined(UBRR1H) || defined(UBRR2H) || defined(UBRR3H))
|
||||||
|
|
||||||
#include "MarlinSerial.h"
|
#include "MarlinSerial.h"
|
||||||
#include "Marlin.h"
|
#include "Marlin.h"
|
||||||
@ -651,9 +651,9 @@
|
|||||||
// Preinstantiate
|
// Preinstantiate
|
||||||
MarlinSerial customizedSerial;
|
MarlinSerial customizedSerial;
|
||||||
|
|
||||||
#endif // !USBCON && (UBRRH || UBRR0H || UBRR1H || UBRR2H || UBRR3H)
|
#endif // !(__AVR__ && USBCON) && (UBRRH || UBRR0H || UBRR1H || UBRR2H || UBRR3H)
|
||||||
|
|
||||||
// For AT90USB targets use the UART for BT interfacing
|
// For AT90USB targets use the UART for BT interfacing
|
||||||
#if defined(USBCON) && ENABLED(BLUETOOTH)
|
#if defined(__AVR__) && defined(USBCON) && ENABLED(BLUETOOTH)
|
||||||
HardwareSerial bluetoothSerial;
|
HardwareSerial bluetoothSerial;
|
||||||
#endif
|
#endif
|
||||||
|
@ -85,7 +85,7 @@
|
|||||||
#define TX_BUFFER_SIZE 32
|
#define TX_BUFFER_SIZE 32
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef USBCON
|
#if !(defined(__AVR__) && defined(USBCON))
|
||||||
|
|
||||||
#if RX_BUFFER_SIZE > 256
|
#if RX_BUFFER_SIZE > 256
|
||||||
typedef uint16_t ring_buffer_pos_t;
|
typedef uint16_t ring_buffer_pos_t;
|
||||||
@ -163,10 +163,10 @@
|
|||||||
|
|
||||||
extern MarlinSerial customizedSerial;
|
extern MarlinSerial customizedSerial;
|
||||||
|
|
||||||
#endif // !USBCON
|
#endif // !(__AVR__ && USBCON)
|
||||||
|
|
||||||
// Use the UART for Bluetooth in AT90USB configurations
|
// Use the UART for Bluetooth in AT90USB configurations
|
||||||
#if defined(USBCON) && ENABLED(BLUETOOTH)
|
#if defined(__AVR__) && defined(USBCON) && ENABLED(BLUETOOTH)
|
||||||
extern HardwareSerial bluetoothSerial;
|
extern HardwareSerial bluetoothSerial;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -13848,7 +13848,7 @@ void loop() {
|
|||||||
card.closefile();
|
card.closefile();
|
||||||
SERIAL_PROTOCOLLNPGM(MSG_FILE_SAVED);
|
SERIAL_PROTOCOLLNPGM(MSG_FILE_SAVED);
|
||||||
|
|
||||||
#ifndef USBCON
|
#if !(defined(__AVR__) && defined(USBCON))
|
||||||
#if ENABLED(SERIAL_STATS_DROPPED_RX)
|
#if ENABLED(SERIAL_STATS_DROPPED_RX)
|
||||||
SERIAL_ECHOLNPAIR("Dropped bytes: ", customizedSerial.dropped());
|
SERIAL_ECHOLNPAIR("Dropped bytes: ", customizedSerial.dropped());
|
||||||
#endif
|
#endif
|
||||||
@ -13856,7 +13856,7 @@ void loop() {
|
|||||||
#if ENABLED(SERIAL_STATS_MAX_RX_QUEUED)
|
#if ENABLED(SERIAL_STATS_MAX_RX_QUEUED)
|
||||||
SERIAL_ECHOLNPAIR("Max RX Queue Size: ", customizedSerial.rxMaxEnqueued());
|
SERIAL_ECHOLNPAIR("Max RX Queue Size: ", customizedSerial.rxMaxEnqueued());
|
||||||
#endif
|
#endif
|
||||||
#endif // !USBCON
|
#endif // !(__AVR__ && USBCON)
|
||||||
|
|
||||||
ok_to_send();
|
ok_to_send();
|
||||||
}
|
}
|
||||||
|
@ -275,7 +275,7 @@
|
|||||||
/**
|
/**
|
||||||
* Serial
|
* Serial
|
||||||
*/
|
*/
|
||||||
#ifndef USBCON
|
#if !(defined(__AVR__) && defined(USBCON))
|
||||||
#if ENABLED(SERIAL_XON_XOFF) && RX_BUFFER_SIZE < 1024
|
#if ENABLED(SERIAL_XON_XOFF) && RX_BUFFER_SIZE < 1024
|
||||||
#error "SERIAL_XON_XOFF requires RX_BUFFER_SIZE >= 1024 for reliable transfers without drops."
|
#error "SERIAL_XON_XOFF requires RX_BUFFER_SIZE >= 1024 for reliable transfers without drops."
|
||||||
#elif RX_BUFFER_SIZE && (RX_BUFFER_SIZE < 2 || !IS_POWER_OF_2(RX_BUFFER_SIZE))
|
#elif RX_BUFFER_SIZE && (RX_BUFFER_SIZE < 2 || !IS_POWER_OF_2(RX_BUFFER_SIZE))
|
||||||
@ -1281,7 +1281,7 @@ static_assert(1 >= 0
|
|||||||
/**
|
/**
|
||||||
* emergency-command parser
|
* emergency-command parser
|
||||||
*/
|
*/
|
||||||
#if ENABLED(EMERGENCY_PARSER) && defined(USBCON)
|
#if ENABLED(EMERGENCY_PARSER) && defined(__AVR__) && defined(USBCON)
|
||||||
#error "EMERGENCY_PARSER does not work on boards with AT90USB processors (USBCON)."
|
#error "EMERGENCY_PARSER does not work on boards with AT90USB processors (USBCON)."
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
#include "MarlinConfig.h"
|
#include "MarlinConfig.h"
|
||||||
|
|
||||||
#ifdef USBCON
|
#if defined(__AVR__) && defined(USBCON)
|
||||||
#include <HardwareSerial.h>
|
#include <HardwareSerial.h>
|
||||||
#if ENABLED(BLUETOOTH)
|
#if ENABLED(BLUETOOTH)
|
||||||
extern HardwareSerial bluetoothSerial;
|
extern HardwareSerial bluetoothSerial;
|
||||||
|
Loading…
Reference in New Issue
Block a user