Fix Visual Micro "Arduino IDE for Visual Studio" support (#16418)

This commit is contained in:
Dirk O. Kaar 2020-01-03 02:01:38 +01:00 committed by Scott Lahteine
parent 5b75a018b7
commit d0e1166cce
80 changed files with 81 additions and 85 deletions

View File

@ -41,7 +41,7 @@
#if !defined(USBCON) && (defined(UBRRH) || defined(UBRR0H) || defined(UBRR1H) || defined(UBRR2H) || defined(UBRR3H))
#include "MarlinSerial.h"
#include "../../Marlin.h"
#include "../../MarlinCore.h"
template<typename Cfg> typename MarlinSerial<Cfg>::ring_buffer_r MarlinSerial<Cfg>::rx_buffer = { 0, 0, { 0 } };
template<typename Cfg> typename MarlinSerial<Cfg>::ring_buffer_t MarlinSerial<Cfg>::tx_buffer = { 0 };

View File

@ -28,7 +28,7 @@
#include "watchdog.h"
#include "../../Marlin.h"
#include "../../MarlinCore.h"
// Initialize watchdog with 8s timeout, if possible. Otherwise, make it 4s.
void watchdog_init() {

View File

@ -31,7 +31,7 @@
#include "MarlinSerial.h"
#include "InterruptVectors.h"
#include "../../Marlin.h"
#include "../../MarlinCore.h"
template<typename Cfg> typename MarlinSerial<Cfg>::ring_buffer_r MarlinSerial<Cfg>::rx_buffer = { 0, 0, { 0 } };
template<typename Cfg> typename MarlinSerial<Cfg>::ring_buffer_t MarlinSerial<Cfg>::tx_buffer = { 0 };

View File

@ -63,7 +63,7 @@
#include <U8glib.h>
#include "../../../Marlin.h"
#include "../../../MarlinCore.h"
void spiBegin();
void spiInit(uint8_t spiRate);

View File

@ -23,7 +23,7 @@
#ifdef ARDUINO_ARCH_SAM
#include "../../inc/MarlinConfig.h"
#include "../../Marlin.h"
#include "../../MarlinCore.h"
#include "watchdog.h"
// Override Arduino runtime to either config or disable the watchdog

View File

@ -36,7 +36,7 @@
#include "TMC2660.h"
#include "../../../inc/MarlinConfig.h"
#include "../../../Marlin.h"
#include "../../../MarlinCore.h"
#include "../../../module/stepper/indirection.h"
#include "../../../module/printcounter.h"
#include "../../../libs/duration_t.h"

View File

@ -28,7 +28,7 @@
* - https://github.com/grbl/grbl
*/
#include "Marlin.h"
#include "MarlinCore.h"
#include "core/utility.h"
#include "lcd/ultralcd.h"

View File

@ -22,7 +22,7 @@
#include "utility.h"
#include "../Marlin.h"
#include "../MarlinCore.h"
#include "../module/temperature.h"
void safe_delay(millis_t ms) {

View File

@ -45,7 +45,7 @@
#include "../module/planner.h"
#include "../module/stepper.h"
#include "../Marlin.h"
#include "../MarlinCore.h"
#include "../HAL/shared/Delay.h"
#define HAS_SIDE_BY_SIDE (ENABLED(MAX7219_SIDE_BY_SIDE) && MAX7219_NUMBER_UNITS > 1)

View File

@ -25,7 +25,7 @@
#if ENABLED(BABYSTEPPING)
#include "babystep.h"
#include "../Marlin.h"
#include "../MarlinCore.h"
#include "../module/planner.h"
#include "../module/stepper.h"

View File

@ -26,7 +26,7 @@
#include "../bedlevel.h"
#include "../../../Marlin.h"
#include "../../../MarlinCore.h"
#include "../../../HAL/shared/persistent_store_api.h"
#include "../../../libs/hex_print_routines.h"
#include "../../../module/configuration_store.h"

View File

@ -32,7 +32,7 @@
#include "../../../module/delta.h"
#endif
#include "../../../Marlin.h"
#include "../../../MarlinCore.h"
#include <math.h>
#if !UBL_SEGMENTED

View File

@ -10,7 +10,7 @@
#include "dac_dac084s085.h"
#include "../../Marlin.h"
#include "../../MarlinCore.h"
#include "../../module/stepper.h"
#include "../../HAL/shared/Delay.h"

View File

@ -29,7 +29,7 @@
#if ENABLED(ADVANCED_PAUSE_FEATURE)
#include "../Marlin.h"
#include "../MarlinCore.h"
#include "../gcode/gcode.h"
#include "../module/motion.h"
#include "../module/planner.h"

View File

@ -31,7 +31,7 @@
#include "power.h"
#include "../module/temperature.h"
#include "../module/stepper/indirection.h"
#include "../Marlin.h"
#include "../MarlinCore.h"
Power powerManager;

View File

@ -36,7 +36,7 @@ MMU2 mmu2;
#include "../../module/temperature.h"
#include "../../module/planner.h"
#include "../../module/stepper/indirection.h"
#include "../../Marlin.h"
#include "../../MarlinCore.h"
#if ENABLED(HOST_PROMPT_SUPPORT)
#include "../../feature/host_actions.h"

View File

@ -61,7 +61,7 @@ void FilamentSensorBase::filament_present(const uint8_t extruder) {
//
// Filament Runout event handler
//
#include "../Marlin.h"
#include "../MarlinCore.h"
#include "../gcode/queue.h"
#if ENABLED(HOST_ACTION_COMMANDS)

View File

@ -25,7 +25,7 @@
#if HAS_TRINAMIC
#include "tmc_util.h"
#include "../Marlin.h"
#include "../MarlinCore.h"
#include "../module/stepper/indirection.h"
#include "../module/printcounter.h"

View File

@ -34,7 +34,7 @@
#include "../../gcode/gcode.h"
#include "../../feature/bedlevel/bedlevel.h"
#include "../../Marlin.h"
#include "../../MarlinCore.h"
#include "../../module/planner.h"
#include "../../module/stepper.h"
#include "../../module/motion.h"

View File

@ -25,7 +25,7 @@
#if HAS_MESH
#include "../gcode.h"
#include "../../Marlin.h" // for IsRunning()
#include "../../MarlinCore.h" // for IsRunning()
#include "../../module/motion.h"
#include "../../module/probe.h" // for probe_offset
#include "../../feature/bedlevel/bedlevel.h"

View File

@ -20,7 +20,7 @@
*
*/
#include "../../Marlin.h"
#include "../../MarlinCore.h"
#if ENABLED(CALIBRATION_GCODE)

View File

@ -28,7 +28,7 @@
#include "../queue.h"
#include "../../libs/hex_print_routines.h"
#include "../../Marlin.h" // for idle()
#include "../../MarlinCore.h" // for idle()
/**
* M100 Free Memory Watcher

View File

@ -21,7 +21,7 @@
*/
#include "../gcode.h"
#include "../../Marlin.h"
#include "../../MarlinCore.h"
#include "../../module/planner.h"
#if DISABLED(NO_VOLUMETRICS)

View File

@ -27,7 +27,7 @@
#include "../gcode.h"
#include "../../module/tool_change.h"
#include "../../Marlin.h" // for SP_X_STR, etc.
#include "../../MarlinCore.h" // for SP_X_STR, etc.
extern const char SP_X_STR[], SP_Y_STR[], SP_Z_STR[];

View File

@ -25,7 +25,7 @@
#if ENABLED(PINS_DEBUGGING)
#include "../gcode.h"
#include "../../Marlin.h" // for pin_is_protected
#include "../../MarlinCore.h" // for pin_is_protected
#include "../../pins/pinsDebug.h"
#include "../../module/endstops.h"

View File

@ -25,7 +25,7 @@
#if DISABLED(EMERGENCY_PARSER)
#include "../gcode.h"
#include "../../Marlin.h" // for wait_for_heatup, kill, quickstop_stepper
#include "../../MarlinCore.h" // for wait_for_heatup, kill, quickstop_stepper
/**
* M108: Stop the waiting for heaters in M109, M190, M303. Does not affect the target temperature.

View File

@ -21,7 +21,7 @@
*/
#include "../gcode.h"
#include "../../Marlin.h" // for stepper_inactive_time, disable_e_steppers
#include "../../MarlinCore.h" // for stepper_inactive_time, disable_e_steppers
#include "../../lcd/ultralcd.h"
#include "../../module/stepper.h"

View File

@ -21,7 +21,7 @@
*/
#include "../gcode.h"
#include "../../Marlin.h" // for pin_is_protected and idle()
#include "../../MarlinCore.h" // for pin_is_protected and idle()
#include "../../module/stepper.h"
/**

View File

@ -21,7 +21,7 @@
*/
#include "../gcode.h"
#include "../../Marlin.h" // for pin_is_protected
#include "../../MarlinCore.h" // for pin_is_protected
#include "../../inc/MarlinConfig.h"
#if FAN_COUNT > 0

View File

@ -32,7 +32,7 @@
#endif
#if HAS_SUICIDE
#include "../../Marlin.h"
#include "../../MarlinCore.h"
#endif
#if ENABLED(PSU_CONTROL)

View File

@ -21,7 +21,7 @@
*/
#include "../gcode.h"
#include "../../Marlin.h" // for max_inactive_time
#include "../../MarlinCore.h" // for max_inactive_time
/**
* M85: Set inactivity shutdown timer with parameter S<seconds>. To disable set zero (default)

View File

@ -23,7 +23,7 @@
#include "../gcode.h"
#include "../../lcd/ultralcd.h" // for lcd_reset_alert_level
#include "../../Marlin.h" // for Running
#include "../../MarlinCore.h" // for Running
#include "../queue.h" // for flush_and_request_resend
/**

View File

@ -32,7 +32,7 @@
#endif
#if defined(PHOTO_POSITION) && PHOTO_DELAY_MS > 0
#include "../../../Marlin.h" // for idle()
#include "../../../MarlinCore.h" // for idle()
#endif
#ifdef PHOTO_RETRACT_MM

View File

@ -27,7 +27,7 @@
#include "../../../feature/filwidth.h"
#include "../../../module/planner.h"
#include "../../../module/temperature.h"
#include "../../../Marlin.h"
#include "../../../MarlinCore.h"
#include "../../gcode.h"
/**

View File

@ -26,7 +26,7 @@
#include "../../gcode.h"
#include "../../../Marlin.h" // for i2c
#include "../../../MarlinCore.h" // for i2c
/**
* M260: Send data to a I2C slave device

View File

@ -25,7 +25,7 @@
#if ENABLED(FILAMENT_LOAD_UNLOAD_GCODES)
#include "../../gcode.h"
#include "../../../Marlin.h"
#include "../../../MarlinCore.h"
#include "../../../module/motion.h"
#include "../../../module/temperature.h"
#include "../../../feature/pause.h"

View File

@ -49,7 +49,7 @@ GcodeSuite gcode;
#include "../feature/cancel_object.h"
#endif
#include "../Marlin.h" // for idle() and suspend_auto_report
#include "../MarlinCore.h" // for idle() and suspend_auto_report
millis_t GcodeSuite::previous_move_ms;

View File

@ -25,7 +25,7 @@
#if ENABLED(EXPECTED_PRINTER_CHECK)
#include "../gcode.h"
#include "../../Marlin.h"
#include "../../MarlinCore.h"
/**
* M16: Expected Printer Check

View File

@ -25,7 +25,7 @@
#include "../../feature/host_actions.h"
#include "../gcode.h"
#include "../../Marlin.h"
#include "../../MarlinCore.h"
/**
* M876: Handle Prompt Response

View File

@ -23,7 +23,7 @@
#include "../gcode.h"
#include "../../module/motion.h"
#include "../../Marlin.h"
#include "../../MarlinCore.h"
#if BOTH(FWRETRACT, FWRETRACT_AUTORETRACT)
#include "../../feature/fwretract.h"

View File

@ -35,7 +35,7 @@
*/
#include "../gcode.h"
#include "../../Marlin.h" // for IsRunning()
#include "../../MarlinCore.h" // for IsRunning()
/**
* G5: Cubic B-spline

View File

@ -26,7 +26,7 @@
#include "parser.h"
#include "../Marlin.h"
#include "../MarlinCore.h"
#if NUM_SERIAL > 1
#include "queue.h"

View File

@ -33,7 +33,7 @@ GCodeQueue queue;
#include "../sd/cardreader.h"
#include "../module/planner.h"
#include "../module/temperature.h"
#include "../Marlin.h"
#include "../MarlinCore.h"
#if ENABLED(PRINTER_EVENT_LEDS)
#include "../feature/leds/printer_event_leds.h"

View File

@ -27,7 +27,7 @@
#include "../gcode.h"
#include "../../module/scara.h"
#include "../../module/motion.h"
#include "../../Marlin.h" // for IsRunning()
#include "../../MarlinCore.h" // for IsRunning()
inline bool SCARA_move_to_cal(const uint8_t delta_a, const uint8_t delta_b) {
if (IsRunning()) {

View File

@ -42,7 +42,7 @@
#include "../../feature/power_loss_recovery.h"
#endif
#include "../../Marlin.h" // for startOrResumeJob
#include "../../MarlinCore.h" // for startOrResumeJob
/**
* M24: Start or Resume SD Print

View File

@ -28,7 +28,7 @@
#include "../../sd/cardreader.h"
#include "../../module/planner.h" // for synchronize()
#include "../../Marlin.h" // for startOrResumeJob
#include "../../MarlinCore.h" // for startOrResumeJob
/**
* M32: Select file and start SD Print

View File

@ -24,7 +24,7 @@
#include "../../module/printcounter.h"
#include "../../lcd/ultralcd.h"
#include "../../Marlin.h" // for startOrResumeJob
#include "../../MarlinCore.h" // for startOrResumeJob
/**
* M75: Start print timer

View File

@ -30,7 +30,7 @@
#include "../../module/planner.h"
#include "../../lcd/ultralcd.h"
#include "../../Marlin.h" // for startOrResumeJob, etc.
#include "../../MarlinCore.h" // for startOrResumeJob, etc.
#if ENABLED(PRINTJOB_TIMER_AUTOSTART)
#include "../../module/printcounter.h"

View File

@ -37,7 +37,7 @@
#include "../../feature/leds/leds.h"
#endif
#include "../../Marlin.h" // for wait_for_heatup, idle, startOrResumeJob
#include "../../MarlinCore.h" // for wait_for_heatup, idle, startOrResumeJob
/**
* M140: Set bed temperature

View File

@ -38,7 +38,7 @@
#include "../../feature/leds/leds.h"
#endif
#include "../../Marlin.h" // for wait_for_heatup, idle, startOrResumeJob
#include "../../MarlinCore.h" // for wait_for_heatup, idle, startOrResumeJob
/**
* M141: Set chamber temperature

View File

@ -17,7 +17,7 @@
#if HAS_CHARACTER_LCD
#include "../ultralcd.h"
#include "../../Marlin.h"
#include "../../MarlinCore.h"
#include "ultralcd_HD44780.h"

View File

@ -14,7 +14,7 @@
#include "ultralcd_DOGM.h"
#include "../ultralcd.h"
#include "../../Marlin.h"
#include "../../MarlinCore.h"
#include "../fontutils.h"
#include "u8g_fontutf8.h"

View File

@ -60,7 +60,7 @@
#endif
#if ENABLED(LCD_SHOW_E_TOTAL)
#include "../../Marlin.h" // for printingIsActive
#include "../../MarlinCore.h" // for printingIsActive
#endif
#define TEXT_MODE_LCD_WIDTH 16

View File

@ -32,7 +32,7 @@
#include "../../ui_api.h"
#include "../../../../Marlin.h"
#include "../../../../MarlinCore.h"
#include "../../../../module/temperature.h"
#include "../../../../module/motion.h"
#include "../../../../gcode/queue.h"

View File

@ -25,7 +25,7 @@
#include "../../../../inc/MarlinConfigPre.h"
#include "../../../../Marlin.h"
#include "../../../../MarlinCore.h"
#include "DGUSVPVariable.h"
enum DGUSLCD_Screens : uint8_t;

View File

@ -20,7 +20,7 @@
****************************************************************************/
#include "../../../../../Marlin.h"
#include "../../../../../MarlinCore.h"
#include "language.h"

View File

@ -11,7 +11,7 @@
#if HAS_SPI_LCD
#include "ultralcd.h"
#include "../Marlin.h"
#include "../MarlinCore.h"
#endif
#include "fontutils.h"

View File

@ -213,7 +213,7 @@ void MenuItem_bool::action(PGM_P const, bool * const ptr, screenFunc_t callback)
///////////////// Menu Tree ////////////////
////////////////////////////////////////////
#include "../../Marlin.h"
#include "../../MarlinCore.h"
bool printer_busy() {
return planner.movesplanned() || printingIsActive();

View File

@ -32,7 +32,7 @@
#include "../../module/motion.h"
#include "../../module/planner.h"
#include "../../module/temperature.h"
#include "../../Marlin.h"
#include "../../MarlinCore.h"
#if HAS_LEVELING
#include "../../feature/bedlevel/bedlevel.h"

View File

@ -30,11 +30,13 @@
#include "../feature/host_actions.h"
#endif
// All displays share the MarlinUI class
#include "ultralcd.h"
MarlinUI ui;
// All displays share the MarlinUI class
#if HAS_DISPLAY
#include "../module/printcounter.h"
#include "../MarlinCore.h"
#include "../gcode/queue.h"
#include "fontutils.h"
#include "../sd/cardreader.h"
@ -91,11 +93,8 @@ MarlinUI ui;
#include "../sd/cardreader.h"
#include "../module/temperature.h"
#include "../module/planner.h"
#include "../module/printcounter.h"
#include "../module/motion.h"
#include "../Marlin.h"
#if ENABLED(POWER_LOSS_RECOVERY)
#include "../feature/power_loss_recovery.h"
#endif
@ -1443,9 +1442,6 @@ void MarlinUI::update() {
#endif
}
#include "../Marlin.h"
#include "../module/printcounter.h"
PGM_P print_paused = GET_TEXT(MSG_PRINT_PAUSED);
/**

View File

@ -37,7 +37,7 @@
#if HAS_SPI_LCD
#include "../Marlin.h"
#include "../MarlinCore.h"
#if ENABLED(ADVANCED_PAUSE_FEATURE)
#include "../feature/pause.h"

View File

@ -28,7 +28,7 @@
Nozzle nozzle;
#include "../Marlin.h"
#include "../MarlinCore.h"
#include "../module/motion.h"
#if ENABLED(NOZZLE_CLEAN_FEATURE)

View File

@ -54,7 +54,7 @@
#include "../core/language.h"
#include "../libs/vector_3.h" // for matrix_3x3
#include "../gcode/gcode.h"
#include "../Marlin.h"
#include "../MarlinCore.h"
#if EITHER(EEPROM_SETTINGS, SD_FIRMWARE_UPDATE)
#include "../HAL/shared/persistent_store_api.h"

View File

@ -35,7 +35,7 @@
#include "planner.h"
#include "endstops.h"
#include "../lcd/ultralcd.h"
#include "../Marlin.h"
#include "../MarlinCore.h"
#if HAS_BED_PROBE
#include "probe.h"

View File

@ -27,7 +27,7 @@
#include "endstops.h"
#include "stepper.h"
#include "../Marlin.h"
#include "../MarlinCore.h"
#include "../sd/cardreader.h"
#include "temperature.h"
#include "../lcd/ultralcd.h"

View File

@ -70,7 +70,7 @@
#include "../core/language.h"
#include "../gcode/parser.h"
#include "../Marlin.h"
#include "../MarlinCore.h"
#if HAS_LEVELING
#include "../feature/bedlevel/bedlevel.h"

View File

@ -30,7 +30,7 @@
* Copyright (c) 2009-2011 Simen Svale Skogsrud
*/
#include "../Marlin.h"
#include "../MarlinCore.h"
#include "motion.h"
#include "../gcode/queue.h"

View File

@ -35,7 +35,7 @@
#include "motion.h"
#include "temperature.h"
#include "../Marlin.h"
#include "../MarlinCore.h"
#include "../core/language.h"
#include "../gcode/queue.h"

View File

@ -34,7 +34,7 @@ Stopwatch print_job_timer; // Global Print Job Timer instance
#endif
#include "printcounter.h"
#include "../Marlin.h"
#include "../MarlinCore.h"
#include "../HAL/shared/persistent_store_api.h"
#if HAS_BUZZER && SERVICE_WARNING_BUZZES > 0

View File

@ -38,7 +38,7 @@
#include "../gcode/gcode.h"
#include "../lcd/ultralcd.h"
#include "../Marlin.h" // for stop(), disable_e_steppers, wait_for_user
#include "../MarlinCore.h" // for stop(), disable_e_steppers, wait_for_user
#if HAS_LEVELING
#include "../feature/bedlevel/bedlevel.h"

View File

@ -98,7 +98,7 @@ Stepper stepper; // Singleton
#include "../core/language.h"
#include "../gcode/queue.h"
#include "../sd/cardreader.h"
#include "../Marlin.h"
#include "../MarlinCore.h"
#include "../HAL/shared/Delay.h"
#if MB(ALLIGATOR)

View File

@ -27,7 +27,7 @@
#include "temperature.h"
#include "endstops.h"
#include "../Marlin.h"
#include "../MarlinCore.h"
#include "../lcd/ultralcd.h"
#include "planner.h"
#include "../core/language.h"

View File

@ -29,7 +29,7 @@
#include "planner.h"
#include "temperature.h"
#include "../Marlin.h"
#include "../MarlinCore.h"
#define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE)
#include "../core/debug_out.h"

View File

@ -38,7 +38,7 @@
#include "Sd2Card.h"
#include "../Marlin.h"
#include "../MarlinCore.h"
#if ENABLED(SD_CHECK_AND_RETRY)
static bool crcSupported = true;

View File

@ -33,7 +33,7 @@
#include "SdBaseFile.h"
#include "../Marlin.h"
#include "../MarlinCore.h"
SdBaseFile* SdBaseFile::cwd_ = 0; // Pointer to Current Working Directory
// callback function for date/time

View File

@ -33,7 +33,7 @@
#include "SdVolume.h"
#include "../Marlin.h"
#include "../MarlinCore.h"
#if !USE_MULTIPLE_CARDS
// raw block cache

View File

@ -26,7 +26,7 @@
#include "cardreader.h"
#include "../Marlin.h"
#include "../MarlinCore.h"
#include "../lcd/ultralcd.h"
#include "../module/planner.h"
#include "../module/printcounter.h"

View File

@ -40,7 +40,7 @@
#if ENABLED(USB_FLASH_DRIVE_SUPPORT)
#include "../../Marlin.h"
#include "../../MarlinCore.h"
#include "../../core/serial.h"
#include "../../module/temperature.h"

View File

@ -22,7 +22,7 @@ timer_freq = cpu_freq / args.divider
print("#ifndef SPEED_LOOKUPTABLE_H")
print("#define SPEED_LOOKUPTABLE_H")
print()
print('#include "Marlin.h"')
print('#include "MarlinCore.h"')
print()
print("const uint16_t speed_lookuptable_fast[256][2] PROGMEM = {")