Multi-host support
This commit is contained in:
committed by
Scott Lahteine
parent
dabb75034c
commit
f7efac57b7
@ -33,8 +33,7 @@
|
||||
// Includes
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
#include "../HAL.h"
|
||||
#include "../../core/macros.h"
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// Externals
|
||||
|
@ -47,6 +47,12 @@
|
||||
#include "watchdog_AVR.h"
|
||||
#include "math_AVR.h"
|
||||
|
||||
#ifdef USBCON
|
||||
#include "HardwareSerial.h"
|
||||
#else
|
||||
#include "MarlinSerial.h"
|
||||
#endif
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// Defines
|
||||
// --------------------------------------------------------------------------
|
||||
@ -79,6 +85,18 @@ typedef int8_t pin_t;
|
||||
|
||||
//extern uint8_t MCUSR;
|
||||
|
||||
#define NUM_SERIAL 1
|
||||
|
||||
#ifdef USBCON
|
||||
#if ENABLED(BLUETOOTH)
|
||||
#define MYSERIAL0 bluetoothSerial
|
||||
#else
|
||||
#define MYSERIAL0 Serial
|
||||
#endif
|
||||
#else
|
||||
#define MYSERIAL0 customizedSerial
|
||||
#endif
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// Public functions
|
||||
// --------------------------------------------------------------------------
|
||||
|
@ -483,9 +483,9 @@ inline void report_pin_state_extended(pin_t pin, bool ignore, bool extended = fa
|
||||
for (uint8_t y = 0; y < 28; y++) { // always print pin name
|
||||
temp_char = pgm_read_byte(name_mem_pointer + y);
|
||||
if (temp_char != 0)
|
||||
MYSERIAL.write(temp_char);
|
||||
SERIAL_CHAR(temp_char);
|
||||
else {
|
||||
for (uint8_t i = 0; i < 28 - y; i++) MYSERIAL.write(' ');
|
||||
for (uint8_t i = 0; i < 28 - y; i++) SERIAL_CHAR(' ');
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -66,9 +66,9 @@ void PRINT_ARRAY_NAME(uint8_t x) {
|
||||
for (uint8_t y = 0; y < MAX_NAME_LENGTH; y++) {
|
||||
char temp_char = pgm_read_byte(name_mem_pointer + y);
|
||||
if (temp_char != 0)
|
||||
MYSERIAL.write(temp_char);
|
||||
SERIAL_CHAR(temp_char);
|
||||
else {
|
||||
for (uint8_t i = 0; i < MAX_NAME_LENGTH - y; i++) MYSERIAL.write(' ');
|
||||
for (uint8_t i = 0; i < MAX_NAME_LENGTH - y; i++) SERIAL_CHAR(' ');
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user