├── Marlin └── src │ ├── HAL │ ├── HAL_STM32F1 │ │ ├── binary.h │ │ ├── pinsDebug.h │ │ ├── README.md │ │ ├── spi_pins.h │ │ ├── persistent_store_eeprom.cpp │ │ └── STM32F1_flag_script.py │ ├── HAL_STM32 │ │ ├── pinsDebug.h │ │ ├── README.md │ │ ├── watchdog_STM32.h │ │ ├── spi_pins.h │ │ ├── fastio_STM32.cpp │ │ ├── HAL_Servo_STM32.h │ │ └── watchdog_STM32.cpp │ ├── HAL_STM32F4 │ │ ├── pinsDebug.h │ │ ├── README.md │ │ ├── watchdog_STM32F4.h │ │ ├── spi_pins.h │ │ └── HAL_Servo_STM32F4.h │ ├── HAL_STM32F7 │ │ ├── pinsDebug.h │ │ ├── EEPROM_Emul │ │ │ └── eeprom_emul.cpp │ │ ├── README.md │ │ ├── spi_pins.h │ │ ├── watchdog_STM32F7.h │ │ └── HAL_Servo_STM32F7.h │ ├── HAL_TEENSY31_32 │ │ ├── pinsDebug.h │ │ ├── HAL_Servo_Teensy.cpp │ │ ├── spi_pins.h │ │ ├── watchdog_Teensy.h │ │ ├── watchdog_Teensy.cpp │ │ ├── SanityCheck.h │ │ ├── persistent_store_impl.cpp │ │ └── HAL_Servo_Teensy.h │ ├── HAL_LPC1768 │ │ ├── usb_serial.cpp │ │ ├── win_usb_driver │ │ │ └── lpc176x_usb_driver.inf │ │ ├── persistent_store_api.h │ │ ├── u8g │ │ │ ├── HAL_LCD_I2C_routines.h │ │ │ └── HAL_LCD_delay.h │ │ ├── watchdog.h │ │ ├── fast_pwm.cpp │ │ └── include │ │ │ └── SPI.h │ ├── HAL_ESP32 │ │ ├── servotimers.h │ │ ├── ota.h │ │ ├── spi_pins.h │ │ ├── web.h │ │ ├── spiffs.h │ │ ├── wifi.h │ │ ├── watchdog_ESP32.h │ │ ├── SanityCheck.h │ │ ├── FlushableHardwareSerial.cpp │ │ ├── watchdog_ESP32.cpp │ │ ├── i2s.h │ │ ├── FlushableHardwareSerial.h │ │ ├── spiffs.cpp │ │ └── web.cpp │ ├── shared │ │ ├── backtrace │ │ │ ├── backtrace.h │ │ │ ├── unwmemaccess.h │ │ │ ├── unwarmmem.h │ │ │ └── unwarmbytab.h │ │ ├── math_32bit.h │ │ ├── persistent_store_api.cpp │ │ └── HAL_ST7920.h │ ├── HAL_TEENSY35_36 │ │ ├── spi_pins.h │ │ ├── watchdog_Teensy.h │ │ ├── HAL_Servo_Teensy.cpp │ │ ├── SanityCheck.h │ │ ├── watchdog_Teensy.cpp │ │ ├── persistent_store_impl.cpp │ │ └── HAL_Servo_Teensy.h │ ├── HAL_LINUX │ │ ├── hardware │ │ │ ├── Gpio.cpp │ │ │ ├── Clock.cpp │ │ │ ├── IOLoggerCSV.h │ │ │ ├── LinearAxis.h │ │ │ └── Heater.h │ │ ├── watchdog.h │ │ └── watchdog.cpp │ ├── HAL_AVR │ │ └── watchdog_AVR.h │ └── HAL_DUE │ │ └── watchdog_Due.h │ ├── lcd │ ├── dogm │ │ ├── fontdata │ │ │ ├── langdata_an.h │ │ │ ├── langdata_ca.h │ │ │ ├── langdata_da.h │ │ │ ├── langdata_de.h │ │ │ ├── langdata_en.h │ │ │ ├── langdata_es.h │ │ │ ├── langdata_eu.h │ │ │ ├── langdata_fi.h │ │ │ ├── langdata_fr.h │ │ │ ├── langdata_gl.h │ │ │ ├── langdata_it.h │ │ │ ├── langdata_nl.h │ │ │ ├── langdata_pt.h │ │ │ ├── langdata_pt-br.h │ │ │ └── langdata_tr.h │ │ └── u8g_fontutf8.h │ └── menu │ │ └── menu_mmu2.h │ ├── feature │ ├── controllerfan.h │ ├── snmm.h │ ├── closedloop.h │ ├── baricuda.h │ ├── leds │ │ ├── tempstat.h │ │ ├── blinkm.h │ │ ├── pca9632.h │ │ └── blinkm.cpp │ ├── digipot │ │ └── digipot.h │ ├── fanmux.h │ ├── solenoid.h │ ├── baricuda.cpp │ ├── dac │ │ ├── dac_dac084s085.h │ │ └── stepper_dac.h │ ├── caselight.h │ ├── power.h │ ├── snmm.cpp │ ├── emergency_parser.cpp │ └── closedloop.cpp │ ├── pins │ ├── pins_STB_11.h │ ├── pins_AZTEEG_X1.h │ ├── pins_MELZI_MAKR3D.h │ ├── pins_MELZI.h │ ├── pins_GT2560_REV_A_PLUS.h │ ├── pins_RUMBA_RAISE3D.h │ ├── pins_K8200.h │ ├── pins_SANGUINOLOLU_12.h │ ├── pins_TRIGORILLA_13.h │ ├── pins_MAKEBOARD_MINI.h │ ├── pins_BIQU_KFB_2.h │ ├── pins_MKS_BASE_HEROIC.h │ ├── pins_RAMPS_13.h │ ├── pins_GT2560_V3_MC2.h │ ├── pins_GT2560_V3_A20.h │ ├── pins_SAINSMART_2IN1.h │ ├── pins_RAMPS_CREALITY.h │ └── pins_RAMPS_ENDER_4.h │ ├── core │ └── millis_t.h │ ├── gcode │ ├── control │ │ ├── M400.cpp │ │ ├── M997.cpp │ │ ├── M85.cpp │ │ └── M120_M121.cpp │ ├── lcd │ │ ├── M117.cpp │ │ ├── M250.cpp │ │ └── M300.cpp │ ├── host │ │ ├── M119.cpp │ │ ├── M110.cpp │ │ ├── M876.cpp │ │ └── M113.cpp │ ├── config │ │ ├── M220.cpp │ │ └── M540.cpp │ ├── motion │ │ ├── G80.cpp │ │ └── G4.cpp │ ├── sdcard │ │ ├── M928.cpp │ │ ├── M26.cpp │ │ ├── M21_M22.cpp │ │ ├── M20.cpp │ │ ├── M524.cpp │ │ ├── M30.cpp │ │ ├── M23.cpp │ │ ├── M34.cpp │ │ └── M33.cpp │ ├── units │ │ ├── M82_M83.cpp │ │ ├── G20_G21.cpp │ │ └── M149.cpp │ ├── bedlevel │ │ └── ubl │ │ │ └── G29.cpp │ ├── probe │ │ ├── G31_G32.cpp │ │ └── M401_M402.cpp │ ├── calibrate │ │ └── M12.cpp │ ├── feature │ │ └── pause │ │ │ └── G27.cpp │ ├── temperature │ │ ├── M155.cpp │ │ └── M105.cpp │ └── stats │ │ └── M31.cpp │ ├── sd │ ├── SdFatUtil.h │ └── Sd2Card_sdio.h │ ├── module │ ├── thermistor │ │ ├── thermistor_998.h │ │ ├── thermistor_999.h │ │ ├── thermistor_110.h │ │ ├── thermistor_147.h │ │ ├── thermistor_1047.h │ │ ├── thermistor_1010.h │ │ └── thermistor_8.h │ └── planner_bezier.h │ └── inc │ └── MarlinConfigPre.h └── .gitattributes /Marlin/src/HAL/HAL_STM32F1/binary.h: -------------------------------------------------------------------------------- 1 | #include "bit_constants.h" 2 | -------------------------------------------------------------------------------- /Marlin/src/HAL/HAL_STM32/pinsDebug.h: -------------------------------------------------------------------------------- 1 | #error "Debug pins is not yet supported for STM32!" 2 | -------------------------------------------------------------------------------- /Marlin/src/HAL/HAL_STM32F1/pinsDebug.h: -------------------------------------------------------------------------------- 1 | #error Debug pins is not supported on this Platform! 2 | -------------------------------------------------------------------------------- /Marlin/src/HAL/HAL_STM32F4/pinsDebug.h: -------------------------------------------------------------------------------- 1 | #error Debug pins is not supported on this Platform! 2 | -------------------------------------------------------------------------------- /Marlin/src/HAL/HAL_STM32F7/pinsDebug.h: -------------------------------------------------------------------------------- 1 | #error Debug pins is not supported on this Platform! 2 | -------------------------------------------------------------------------------- /Marlin/src/HAL/HAL_TEENSY31_32/pinsDebug.h: -------------------------------------------------------------------------------- 1 | #error "Debug pins is not supported on the Teensy 3.1 / 3.2 Platform!" 2 | -------------------------------------------------------------------------------- /Marlin/src/HAL/HAL_STM32F7/EEPROM_Emul/eeprom_emul.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/berghauz/Marlin-bugfix-2.0.x-FLSUN-QQ-S/HEAD/Marlin/src/HAL/HAL_STM32F7/EEPROM_Emul/eeprom_emul.cpp -------------------------------------------------------------------------------- /Marlin/src/HAL/HAL_STM32F4/README.md: -------------------------------------------------------------------------------- 1 | # This HAL is for the STM32F407 MCU used with STM32Generic Arduino core by danieleff. 2 | 3 | # Arduino core is located at: 4 | 5 | https://github.com/danieleff/STM32GENERIC 6 | 7 | Unzip it into [Arduino]/hardware folder 8 | 9 | # This HAL is in development. 10 | 11 | This HAL is a modified version of Chris Barr's Picoprint STM32F4 HAL. 12 | 13 | -------------------------------------------------------------------------------- /Marlin/src/HAL/HAL_STM32/README.md: -------------------------------------------------------------------------------- 1 | # Generic STM32 HAL based on the stm32duino core 2 | 3 | This HAL is intended to act as the generic STM32 HAL for all STM32 chips (The whole F, H and L family). 4 | 5 | Currently it supports: 6 | * STM32F0xx 7 | * STM32F1xx 8 | * STM32F4xx 9 | * STM32F7xx 10 | 11 | Targeting the official [Arduino STM32 Core](https://github.com/stm32duino/Arduino_Core_STM32). 12 | -------------------------------------------------------------------------------- /Marlin/src/lcd/dogm/fontdata/langdata_an.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Generated automatically by buildroot/share/fonts/uxggenpages.sh 3 | * Contents will be REPLACED by future processing! 4 | * Use genallfont.sh to generate font data for updated languages. 5 | */ 6 | #include 7 | 8 | #define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } 9 | static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {}; 10 | -------------------------------------------------------------------------------- /Marlin/src/lcd/dogm/fontdata/langdata_ca.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Generated automatically by buildroot/share/fonts/uxggenpages.sh 3 | * Contents will be REPLACED by future processing! 4 | * Use genallfont.sh to generate font data for updated languages. 5 | */ 6 | #include 7 | 8 | #define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } 9 | static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {}; 10 | -------------------------------------------------------------------------------- /Marlin/src/lcd/dogm/fontdata/langdata_da.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Generated automatically by buildroot/share/fonts/uxggenpages.sh 3 | * Contents will be REPLACED by future processing! 4 | * Use genallfont.sh to generate font data for updated languages. 5 | */ 6 | #include 7 | 8 | #define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } 9 | static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {}; 10 | -------------------------------------------------------------------------------- /Marlin/src/lcd/dogm/fontdata/langdata_de.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Generated automatically by buildroot/share/fonts/uxggenpages.sh 3 | * Contents will be REPLACED by future processing! 4 | * Use genallfont.sh to generate font data for updated languages. 5 | */ 6 | #include 7 | 8 | #define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } 9 | static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {}; 10 | -------------------------------------------------------------------------------- /Marlin/src/lcd/dogm/fontdata/langdata_en.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Generated automatically by buildroot/share/fonts/uxggenpages.sh 3 | * Contents will be REPLACED by future processing! 4 | * Use genallfont.sh to generate font data for updated languages. 5 | */ 6 | #include 7 | 8 | #define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } 9 | static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {}; 10 | -------------------------------------------------------------------------------- /Marlin/src/lcd/dogm/fontdata/langdata_es.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Generated automatically by buildroot/share/fonts/uxggenpages.sh 3 | * Contents will be REPLACED by future processing! 4 | * Use genallfont.sh to generate font data for updated languages. 5 | */ 6 | #include 7 | 8 | #define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } 9 | static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {}; 10 | -------------------------------------------------------------------------------- /Marlin/src/lcd/dogm/fontdata/langdata_eu.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Generated automatically by buildroot/share/fonts/uxggenpages.sh 3 | * Contents will be REPLACED by future processing! 4 | * Use genallfont.sh to generate font data for updated languages. 5 | */ 6 | #include 7 | 8 | #define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } 9 | static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {}; 10 | -------------------------------------------------------------------------------- /Marlin/src/lcd/dogm/fontdata/langdata_fi.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Generated automatically by buildroot/share/fonts/uxggenpages.sh 3 | * Contents will be REPLACED by future processing! 4 | * Use genallfont.sh to generate font data for updated languages. 5 | */ 6 | #include 7 | 8 | #define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } 9 | static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {}; 10 | -------------------------------------------------------------------------------- /Marlin/src/lcd/dogm/fontdata/langdata_fr.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Generated automatically by buildroot/share/fonts/uxggenpages.sh 3 | * Contents will be REPLACED by future processing! 4 | * Use genallfont.sh to generate font data for updated languages. 5 | */ 6 | #include 7 | 8 | #define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } 9 | static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {}; 10 | -------------------------------------------------------------------------------- /Marlin/src/lcd/dogm/fontdata/langdata_gl.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Generated automatically by buildroot/share/fonts/uxggenpages.sh 3 | * Contents will be REPLACED by future processing! 4 | * Use genallfont.sh to generate font data for updated languages. 5 | */ 6 | #include 7 | 8 | #define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } 9 | static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {}; 10 | -------------------------------------------------------------------------------- /Marlin/src/lcd/dogm/fontdata/langdata_it.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Generated automatically by buildroot/share/fonts/uxggenpages.sh 3 | * Contents will be REPLACED by future processing! 4 | * Use genallfont.sh to generate font data for updated languages. 5 | */ 6 | #include 7 | 8 | #define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } 9 | static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {}; 10 | -------------------------------------------------------------------------------- /Marlin/src/lcd/dogm/fontdata/langdata_nl.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Generated automatically by buildroot/share/fonts/uxggenpages.sh 3 | * Contents will be REPLACED by future processing! 4 | * Use genallfont.sh to generate font data for updated languages. 5 | */ 6 | #include 7 | 8 | #define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } 9 | static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {}; 10 | -------------------------------------------------------------------------------- /Marlin/src/lcd/dogm/fontdata/langdata_pt.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Generated automatically by buildroot/share/fonts/uxggenpages.sh 3 | * Contents will be REPLACED by future processing! 4 | * Use genallfont.sh to generate font data for updated languages. 5 | */ 6 | #include 7 | 8 | #define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } 9 | static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {}; 10 | -------------------------------------------------------------------------------- /Marlin/src/lcd/dogm/fontdata/langdata_pt-br.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Generated automatically by buildroot/share/fonts/uxggenpages.sh 3 | * Contents will be REPLACED by future processing! 4 | * Use genallfont.sh to generate font data for updated languages. 5 | */ 6 | #include 7 | 8 | #define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } 9 | static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {}; 10 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Set the default behavior, in case people don't have core.autocrlf set. 2 | * text=auto 3 | 4 | # Files with Unix line endings 5 | *.c text eol=lf 6 | *.cpp text eol=lf 7 | *.h text eol=lf 8 | *.ino text eol=lf 9 | *.py text eol=lf 10 | *.sh text eol=lf 11 | *.scad text eol=lf 12 | 13 | # Files with native line endings 14 | # *.sln text 15 | 16 | # Binary files 17 | *.png binary 18 | *.jpg binary 19 | *.fon binary 20 | -------------------------------------------------------------------------------- /Marlin/src/HAL/HAL_LPC1768/usb_serial.cpp: -------------------------------------------------------------------------------- 1 | #ifdef TARGET_LPC1768 2 | #include "../../inc/MarlinConfigPre.h" 3 | 4 | #if ENABLED(EMERGENCY_PARSER) 5 | #include "../../feature/emergency_parser.h" 6 | EmergencyParser::State emergency_state; 7 | bool CDC_RecvCallback(const char buffer) { 8 | emergency_parser.update(emergency_state, buffer); 9 | return true; 10 | } 11 | #endif // ENABLED(EMERGENCY_PARSER) 12 | 13 | #endif // TARGET_LPC1768 14 | -------------------------------------------------------------------------------- /Marlin/src/HAL/HAL_STM32F1/README.md: -------------------------------------------------------------------------------- 1 | # This HAL is for STM32F103 boards used with libmaple/stm32duino Arduino core. 2 | 3 | # This HAL is in development. Currently has been tested in Malyan M200 (103CBT6), Chitu 3d (103ZET6), and custom boards(103VET6). 4 | 5 | ### The stm32 core needs a modification in the file util.h to avoid conflict with Marlin macros for Debug. 6 | Since only 1 file needs change in the stm32duino core, it's preferable over making changes to Marlin. 7 | 8 | 9 | After these lines: 10 | <> 11 | #else 12 | #define ASSERT_FAULT(exp) (void)((0)) 13 | #endif 14 | <> 15 | 16 | ### Main developers: 17 | Victorpv 18 | xC000005 19 | 20 | 21 | ### Most up to date repository for this HAL: 22 | https://github.com/victorpv/Marlin/tree/bugfix-2.0.x 23 | 24 | PRs should only be sent to Marlin bugfix-2.0.x branch once tested in printing so not to introduce new bugs. 25 | For testing/dev, you can submit to the above branch 26 | -------------------------------------------------------------------------------- /Marlin/src/HAL/HAL_ESP32/servotimers.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | -------------------------------------------------------------------------------- /Marlin/src/HAL/HAL_STM32F7/README.md: -------------------------------------------------------------------------------- 1 | # This HAL is for the STM32F765 board "The Borg" used with STM32Generic Arduino core by danieleff. 2 | 3 | # Original core is located at: 4 | 5 | https://github.com/danieleff/STM32GENERIC 6 | 7 | but i have not committed the changes needed for the Borg there yet, so please use: 8 | 9 | https://github.com/Spawn32/STM32GENERIC 10 | 11 | Unzip it into [Arduino]/hardware folder 12 | 13 | 14 | Download the latest GNU ARM Embedded Toolchain: 15 | 16 | https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads 17 | 18 | (The one in Arduino dosen't support STM32F7). 19 | 20 | Change compiler.path in platform.txt to point to that you downloaded. 21 | 22 | # This HAL is in development. 23 | # Currently only tested on "The Borg". 24 | 25 | You will also need the latest Arduino 1.9.0-beta or newer. 26 | 27 | This HAL is a modified version of Chris Barr's Picoprint STM32F4 HAL, so shouldn't be to hard to get it to work on a F4. 28 | 29 | -------------------------------------------------------------------------------- /Marlin/src/HAL/HAL_ESP32/ota.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | #pragma once 20 | 21 | void OTA_init(); 22 | void OTA_handle(); 23 | -------------------------------------------------------------------------------- /Marlin/src/HAL/HAL_ESP32/spi_pins.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | * 18 | */ 19 | #pragma once 20 | 21 | #define SS_PIN SDSS 22 | #define SCK_PIN 18 23 | #define MISO_PIN 19 24 | #define MOSI_PIN 23 25 | -------------------------------------------------------------------------------- /Marlin/src/HAL/HAL_LPC1768/win_usb_driver/lpc176x_usb_driver.inf: -------------------------------------------------------------------------------- 1 | [Version] 2 | Signature="$Windows NT$" 3 | Class=Ports 4 | ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318} 5 | Provider=%PROVIDER% 6 | DriverVer =04/14/2008, 5.1.2600.5512 7 | 8 | [Manufacturer] 9 | %PROVIDER%=DeviceList,ntamd64 10 | 11 | 12 | [DeviceList] 13 | %DESCRIPTION%=LPC1768USB, USB\VID_1D50&PID_6029&MI_00 14 | 15 | [DeviceList.ntamd64] 16 | %DESCRIPTION%=LPC1768USB, USB\VID_1D50&PID_6029&MI_00 17 | 18 | 19 | [LPC1768USB] 20 | include=mdmcpq.inf 21 | CopyFiles=FakeModemCopyFileSection 22 | AddReg=LowerFilterAddReg,SerialPropPageAddReg 23 | 24 | [LPC1768USB.Services] 25 | include=mdmcpq.inf 26 | AddService=usbser, 0x00000002, LowerFilter_Service_Inst 27 | 28 | [SerialPropPageAddReg] 29 | HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider" 30 | 31 | 32 | [Strings] 33 | PROVIDER = "marlinfw.org" 34 | DRIVER.SVC = "Marlin USB Driver" 35 | DESCRIPTION= "Marlin USB Serial" 36 | COMPOSITE = "Marlin USB VCOM" -------------------------------------------------------------------------------- /Marlin/src/HAL/HAL_ESP32/web.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | #pragma once 23 | 24 | void web_init(); 25 | -------------------------------------------------------------------------------- /Marlin/src/feature/controllerfan.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | #pragma once 23 | 24 | void controllerfan_update(); 25 | -------------------------------------------------------------------------------- /Marlin/src/feature/snmm.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | #pragma once 23 | 24 | void select_multiplexed_stepper(const uint8_t e); 25 | -------------------------------------------------------------------------------- /Marlin/src/HAL/HAL_STM32/watchdog_STM32.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | #pragma once 23 | 24 | void watchdog_init(); 25 | void watchdog_reset(); 26 | -------------------------------------------------------------------------------- /Marlin/src/HAL/HAL_ESP32/spiffs.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | #pragma once 23 | 24 | extern bool spiffs_initialized; 25 | 26 | void spiffs_init(); 27 | -------------------------------------------------------------------------------- /Marlin/src/HAL/HAL_STM32F7/spi_pins.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | * 18 | */ 19 | #pragma once 20 | 21 | /** 22 | * Define SPI Pins: SCK, MISO, MOSI, SS 23 | */ 24 | #define SCK_PIN PA5 25 | #define MISO_PIN PA6 26 | #define MOSI_PIN PA7 27 | #define SS_PIN PA8 28 | -------------------------------------------------------------------------------- /Marlin/src/feature/closedloop.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | #pragma once 23 | 24 | void init_closedloop(); 25 | void set_closedloop(const byte val); 26 | -------------------------------------------------------------------------------- /Marlin/src/HAL/HAL_LPC1768/persistent_store_api.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | #include "../shared/persistent_store_api.h" 23 | 24 | #define FLASH_EEPROM_EMULATION 25 | -------------------------------------------------------------------------------- /Marlin/src/HAL/shared/backtrace/backtrace.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | #pragma once 23 | 24 | // Perform a backtrace to the serial port 25 | void backtrace(void); 26 | -------------------------------------------------------------------------------- /Marlin/src/feature/baricuda.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | #pragma once 23 | 24 | extern uint8_t baricuda_valve_pressure, 25 | baricuda_e_to_p_pressure; 26 | -------------------------------------------------------------------------------- /Marlin/src/feature/leds/tempstat.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | #pragma once 23 | 24 | /** 25 | * Marlin general RGB LED support 26 | */ 27 | 28 | void handle_status_leds(void); 29 | -------------------------------------------------------------------------------- /Marlin/src/pins/pins_STB_11.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | /** 24 | * STB V1.1 pin assignments 25 | */ 26 | 27 | #define BOARD_NAME "STB V1.1" 28 | #include "pins_SANGUINOLOLU_12.h" 29 | -------------------------------------------------------------------------------- /Marlin/src/HAL/HAL_STM32F4/watchdog_STM32F4.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | #pragma once 23 | 24 | extern IWDG_HandleTypeDef hiwdg; 25 | 26 | void watchdog_init(); 27 | void watchdog_reset(); 28 | -------------------------------------------------------------------------------- /Marlin/src/HAL/HAL_STM32F7/watchdog_STM32F7.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | #pragma once 23 | 24 | extern IWDG_HandleTypeDef hiwdg; 25 | 26 | void watchdog_init(); 27 | void watchdog_reset(); 28 | -------------------------------------------------------------------------------- /Marlin/src/feature/digipot/digipot.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | #pragma once 23 | 24 | void digipot_i2c_set_current(const uint8_t channel, const float current); 25 | void digipot_i2c_init(); 26 | -------------------------------------------------------------------------------- /Marlin/src/lcd/menu/menu_mmu2.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | #pragma once 23 | 24 | #include 25 | 26 | void menu_mmu2(); 27 | void mmu2_M600(); 28 | uint8_t mmu2_choose_filament(); 29 | -------------------------------------------------------------------------------- /Marlin/src/pins/pins_AZTEEG_X1.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | /** 24 | * Azteeg X1 pin assignments 25 | */ 26 | 27 | #define BOARD_NAME "Azteeg X1" 28 | 29 | #include "pins_SANGUINOLOLU_12.h" 30 | -------------------------------------------------------------------------------- /Marlin/src/pins/pins_MELZI_MAKR3D.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | /** 24 | * Melzi with ATmega1284 (MaKr3d version) pin assignments 25 | */ 26 | 27 | #define BOARD_NAME "Melzi (ATmega1284)" 28 | #include "pins_MELZI.h" 29 | -------------------------------------------------------------------------------- /Marlin/src/HAL/HAL_ESP32/wifi.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | #pragma once 23 | 24 | #include 25 | 26 | extern AsyncWebServer server; 27 | 28 | #define DEFAULT_WIFI_HOSTNAME "marlin" 29 | 30 | void wifi_init(); 31 | -------------------------------------------------------------------------------- /Marlin/src/HAL/HAL_TEENSY31_32/HAL_Servo_Teensy.cpp: -------------------------------------------------------------------------------- 1 | #ifdef __MK20DX256__ 2 | 3 | #include "../../inc/MarlinConfig.h" 4 | 5 | #if HAS_SERVOS 6 | 7 | #include "HAL_Servo_Teensy.h" 8 | 9 | uint8_t servoPin[MAX_SERVOS] = { 0 }; 10 | 11 | int8_t libServo::attach(const int pin) { 12 | if (this->servoIndex >= MAX_SERVOS) return -1; 13 | if (pin > 0) servoPin[this->servoIndex] = pin; 14 | return Servo::attach(servoPin[this->servoIndex]); 15 | } 16 | 17 | int8_t libServo::attach(const int pin, const int min, const int max) { 18 | if (pin > 0) servoPin[this->servoIndex] = pin; 19 | return Servo::attach(servoPin[this->servoIndex], min, max); 20 | } 21 | 22 | void libServo::move(const int value) { 23 | constexpr uint16_t servo_delay[] = SERVO_DELAY; 24 | static_assert(COUNT(servo_delay) == NUM_SERVOS, "SERVO_DELAY must be an array NUM_SERVOS long."); 25 | if (this->attach(0) >= 0) { 26 | this->write(value); 27 | safe_delay(servo_delay[this->servoIndex]); 28 | #if ENABLED(DEACTIVATE_SERVOS_AFTER_MOVE) 29 | this->detach(); 30 | #endif 31 | } 32 | } 33 | 34 | #endif // HAS_SERVOS 35 | 36 | #endif // __MK20DX256__ 37 | -------------------------------------------------------------------------------- /Marlin/src/HAL/HAL_TEENSY35_36/spi_pins.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | #pragma once 23 | 24 | #define SCK_PIN 13 25 | #define MISO_PIN 12 26 | #define MOSI_PIN 11 27 | #define SS_PIN 20 // SDSS // A.28, A.29, B.21, C.26, C.29 28 | -------------------------------------------------------------------------------- /Marlin/src/HAL/shared/backtrace/unwmemaccess.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | * ARM Stack Unwinder, Michael.McTernan.2001@cs.bris.ac.uk 3 | * Updated, adapted and several bug fixes on 2018 by Eduardo José Tagle 4 | * 5 | * This program is PUBLIC DOMAIN. 6 | * This means that there is no copyright and anyone is able to take a copy 7 | * for free and use it as they wish, with or without modifications, and in 8 | * any context, commerically or otherwise. The only limitation is that I 9 | * don't guarantee that the software is fit for any purpose or accept any 10 | * liablity for it's use or misuse - this software is without warranty. 11 | *************************************************************************** 12 | * File Description: Utility functions to access memory 13 | **************************************************************************/ 14 | 15 | #pragma once 16 | 17 | #include "unwarm.h" 18 | #include 19 | 20 | bool UnwReadW(const uint32_t a, uint32_t *v); 21 | bool UnwReadH(const uint32_t a, uint16_t *v); 22 | bool UnwReadB(const uint32_t a, uint8_t *v); 23 | -------------------------------------------------------------------------------- /Marlin/src/HAL/HAL_TEENSY31_32/spi_pins.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | #pragma once 24 | 25 | #define SCK_PIN 13 26 | #define MISO_PIN 12 27 | #define MOSI_PIN 11 28 | #define SS_PIN 20 //SDSS // A.28, A.29, B.21, C.26, C.29 29 | -------------------------------------------------------------------------------- /Marlin/src/HAL/HAL_ESP32/watchdog_ESP32.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | #pragma once 23 | 24 | // Initialize watchdog with a 4 second interrupt time 25 | void watchdog_init(); 26 | 27 | // Reset watchdog. 28 | inline void watchdog_reset() { } 29 | -------------------------------------------------------------------------------- /Marlin/src/pins/pins_MELZI.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | /** 24 | * Melzi pin assignments 25 | */ 26 | 27 | #ifndef BOARD_NAME 28 | #define BOARD_NAME "Melzi" 29 | #endif 30 | 31 | #define IS_MELZI 32 | #include "pins_SANGUINOLOLU_12.h" 33 | -------------------------------------------------------------------------------- /Marlin/src/core/millis_t.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | #pragma once 23 | 24 | #include 25 | 26 | typedef uint32_t millis_t; 27 | 28 | #define PENDING(NOW,SOON) ((int32_t)(NOW-(SOON))<0) 29 | #define ELAPSED(NOW,SOON) (!PENDING(NOW,SOON)) 30 | -------------------------------------------------------------------------------- /Marlin/src/feature/fanmux.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | #pragma once 23 | 24 | /** 25 | * feature/fanmux.h - Cooling Fan Multiplexer support functions 26 | */ 27 | 28 | extern void fanmux_switch(const uint8_t e); 29 | extern void fanmux_init(void); 30 | -------------------------------------------------------------------------------- /Marlin/src/feature/solenoid.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | #pragma once 23 | 24 | void enable_solenoid_on_active_extruder(); 25 | void disable_all_solenoids(); 26 | void enable_solenoid(const uint8_t num); 27 | void disable_solenoid(const uint8_t num); 28 | -------------------------------------------------------------------------------- /Marlin/src/HAL/HAL_LINUX/hardware/Gpio.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | #ifdef __PLAT_LINUX__ 24 | 25 | #include "Gpio.h" 26 | 27 | pin_data Gpio::pin_map[Gpio::pin_count+1] = {}; 28 | IOLogger* Gpio::logger = nullptr; 29 | 30 | #endif // __PLAT_LINUX__ 31 | -------------------------------------------------------------------------------- /Marlin/src/feature/leds/blinkm.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | #pragma once 23 | 24 | /** 25 | * blinkm.h - Control a BlinkM over i2c 26 | */ 27 | 28 | struct LEDColor; 29 | typedef LEDColor LEDColor; 30 | 31 | void blinkm_set_led_color(const LEDColor &color); 32 | -------------------------------------------------------------------------------- /Marlin/src/gcode/control/M400.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | #include "../gcode.h" 24 | #include "../../module/stepper.h" 25 | 26 | /** 27 | * M400: Finish all moves 28 | */ 29 | void GcodeSuite::M400() { 30 | 31 | planner.synchronize(); 32 | 33 | } 34 | -------------------------------------------------------------------------------- /Marlin/src/HAL/HAL_TEENSY35_36/watchdog_Teensy.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | #pragma once 23 | 24 | void watchdog_init(); 25 | 26 | inline void watchdog_reset() { 27 | // Watchdog refresh sequence 28 | WDOG_REFRESH = 0xA602; 29 | WDOG_REFRESH = 0xB480; 30 | } 31 | -------------------------------------------------------------------------------- /Marlin/src/gcode/lcd/M117.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | #include "../gcode.h" 24 | #include "../../lcd/ultralcd.h" 25 | 26 | /** 27 | * M117: Set LCD Status Message 28 | */ 29 | void GcodeSuite::M117() { 30 | 31 | ui.set_status(parser.string_arg); 32 | 33 | } 34 | -------------------------------------------------------------------------------- /Marlin/src/gcode/host/M119.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | #include "../gcode.h" 24 | #include "../../module/endstops.h" 25 | 26 | /** 27 | * M119: Output endstop states to serial output 28 | */ 29 | void GcodeSuite::M119() { 30 | 31 | endstops.M119(); 32 | 33 | } 34 | -------------------------------------------------------------------------------- /Marlin/src/HAL/HAL_TEENSY35_36/HAL_Servo_Teensy.cpp: -------------------------------------------------------------------------------- 1 | #if defined(__MK64FX512__) || defined(__MK66FX1M0__) 2 | 3 | #include "../../inc/MarlinConfig.h" 4 | 5 | #if HAS_SERVOS 6 | 7 | #include "HAL_Servo_Teensy.h" 8 | 9 | uint8_t servoPin[MAX_SERVOS] = { 0 }; 10 | 11 | int8_t libServo::attach(const int pin) { 12 | if (this->servoIndex >= MAX_SERVOS) return -1; 13 | if (pin > 0) servoPin[this->servoIndex] = pin; 14 | return Servo::attach(servoPin[this->servoIndex]); 15 | } 16 | 17 | int8_t libServo::attach(const int pin, const int min, const int max) { 18 | if (pin > 0) servoPin[this->servoIndex] = pin; 19 | return Servo::attach(servoPin[this->servoIndex], min, max); 20 | } 21 | 22 | void libServo::move(const int value) { 23 | constexpr uint16_t servo_delay[] = SERVO_DELAY; 24 | static_assert(COUNT(servo_delay) == NUM_SERVOS, "SERVO_DELAY must be an array NUM_SERVOS long."); 25 | if (this->attach(0) >= 0) { 26 | this->write(value); 27 | safe_delay(servo_delay[this->servoIndex]); 28 | #if ENABLED(DEACTIVATE_SERVOS_AFTER_MOVE) 29 | this->detach(); 30 | #endif 31 | } 32 | } 33 | 34 | #endif // HAS_SERVOS 35 | 36 | #endif // __MK64FX512__ || __MK66FX1M0__ 37 | -------------------------------------------------------------------------------- /Marlin/src/feature/baricuda.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | #include "../inc/MarlinConfig.h" 24 | 25 | #if ENABLED(BARICUDA) 26 | 27 | #include "baricuda.h" 28 | 29 | uint8_t baricuda_valve_pressure = 0, 30 | baricuda_e_to_p_pressure = 0; 31 | 32 | #endif // BARICUDA 33 | -------------------------------------------------------------------------------- /Marlin/src/HAL/HAL_LPC1768/u8g/HAL_LCD_I2C_routines.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | void u8g_i2c_init(uint8_t options); 24 | uint8_t u8g_i2c_wait(uint8_t mask, uint8_t pos); 25 | uint8_t u8g_i2c_start(uint8_t sla); 26 | uint8_t u8g_i2c_send_byte(uint8_t data); 27 | void u8g_i2c_stop(void); 28 | -------------------------------------------------------------------------------- /Marlin/src/HAL/HAL_STM32F4/spi_pins.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | * 18 | */ 19 | #pragma once 20 | 21 | /** 22 | * Define SPI Pins: SCK, MISO, MOSI, SS 23 | */ 24 | #ifndef SCK_PIN 25 | #define SCK_PIN PA5 26 | #endif 27 | #ifndef MISO_PIN 28 | #define MISO_PIN PA6 29 | #endif 30 | #ifndef MOSI_PIN 31 | #define MOSI_PIN PA7 32 | #endif 33 | #ifndef SS_PIN 34 | #define SS_PIN PA8 35 | #endif 36 | -------------------------------------------------------------------------------- /Marlin/src/gcode/host/M110.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | #include "../gcode.h" 24 | #include "../queue.h" // for gcode_LastN 25 | 26 | /** 27 | * M110: Set Current Line Number 28 | */ 29 | void GcodeSuite::M110() { 30 | if (parser.seenval('N')) gcode_LastN = parser.value_long(); 31 | } 32 | -------------------------------------------------------------------------------- /Marlin/src/HAL/HAL_STM32F1/spi_pins.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | * 18 | */ 19 | #pragma once 20 | 21 | /** 22 | * HAL for stm32duino.com based on Libmaple and compatible (STM32F1) 23 | */ 24 | 25 | /** 26 | * Define SPI Pins: SCK, MISO, MOSI, SS 27 | * 28 | * Any PIN can be used for Chip Select (SS) 29 | */ 30 | #define SCK_PIN PA5 31 | #define MISO_PIN PA6 32 | #define MOSI_PIN PA7 33 | #define SS_PIN PA4 34 | -------------------------------------------------------------------------------- /Marlin/src/feature/dac/dac_dac084s085.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | #pragma once 23 | 24 | class dac084s085 { 25 | public: 26 | dac084s085(); 27 | static void begin(void); 28 | static void setValue(const uint8_t channel, const uint8_t value); 29 | private: 30 | static void cshigh(); 31 | }; 32 | -------------------------------------------------------------------------------- /Marlin/src/feature/leds/pca9632.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | #pragma once 23 | 24 | /** 25 | * Driver for the Philips PCA9632 LED driver. 26 | * Written by Robert Mendon Feb 2017. 27 | */ 28 | 29 | struct LEDColor; 30 | typedef LEDColor LEDColor; 31 | 32 | void pca9632_set_led_color(const LEDColor &color); 33 | -------------------------------------------------------------------------------- /Marlin/src/gcode/control/M997.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | #include "../gcode.h" 24 | 25 | #if ENABLED(PLATFORM_M997_SUPPORT) 26 | 27 | /** 28 | * M997: Perform in-application firmware update 29 | */ 30 | void GcodeSuite::M997() { 31 | flashFirmware(parser.intval('S')); 32 | } 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /Marlin/src/HAL/shared/backtrace/unwarmmem.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | * ARM Stack Unwinder, Michael.McTernan.2001@cs.bris.ac.uk 3 | * Updated, adapted and several bug fixes on 2018 by Eduardo José Tagle 4 | * 5 | * This program is PUBLIC DOMAIN. 6 | * This means that there is no copyright and anyone is able to take a copy 7 | * for free and use it as they wish, with or without modifications, and in 8 | * any context, commerically or otherwise. The only limitation is that I 9 | * don't guarantee that the software is fit for any purpose or accept any 10 | * liablity for it's use or misuse - this software is without warranty. 11 | *************************************************************************** 12 | * File Description: Interface to the memory tracking sub-system. 13 | **************************************************************************/ 14 | 15 | #pragma once 16 | 17 | #include "unwarm.h" 18 | 19 | bool UnwMemHashRead(MemData * const memData, uint32_t addr, uint32_t * const data, bool * const tracked); 20 | bool UnwMemHashWrite(MemData * const memData, uint32_t addr, uint32_t val, bool valValid); 21 | void UnwMemHashGC(UnwState * const state); 22 | -------------------------------------------------------------------------------- /Marlin/src/HAL/HAL_STM32/spi_pins.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | * 18 | */ 19 | #pragma once 20 | 21 | /** 22 | * Define SPI Pins: SCK, MISO, MOSI, SS 23 | */ 24 | #ifndef SCK_PIN 25 | #define SCK_PIN PIN_SPI_SCK 26 | #endif 27 | #ifndef MISO_PIN 28 | #define MISO_PIN PIN_SPI_MISO 29 | #endif 30 | #ifndef MOSI_PIN 31 | #define MOSI_PIN PIN_SPI_MOSI 32 | #endif 33 | #ifndef SS_PIN 34 | #define SS_PIN PIN_SPI_SS 35 | #endif 36 | -------------------------------------------------------------------------------- /Marlin/src/HAL/HAL_ESP32/SanityCheck.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | #if ENABLED(EMERGENCY_PARSER) 24 | #error "EMERGENCY_PARSER is not yet implemented for ESP32. Disable EMERGENCY_PARSER to continue." 25 | #endif 26 | 27 | #if ENABLED(FAST_PWM_FAN) 28 | #error "FAST_PWM_FAN is not yet implemented for this platform." 29 | #endif 30 | -------------------------------------------------------------------------------- /Marlin/src/HAL/shared/math_32bit.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | #pragma once 23 | 24 | #include "../../core/macros.h" 25 | 26 | /** 27 | * Math helper functions for 32 bit CPUs 28 | */ 29 | static FORCE_INLINE uint32_t MultiU32X24toH32(uint32_t longIn1, uint32_t longIn2) { 30 | return ((uint64_t)longIn1 * longIn2 + 0x00800000) >> 24; 31 | } 32 | -------------------------------------------------------------------------------- /Marlin/src/pins/pins_GT2560_REV_A_PLUS.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | /** 24 | * Geeetech GT2560 Revision A+ board pin assignments 25 | */ 26 | 27 | #define BOARD_NAME "GT2560 Rev.A+" 28 | 29 | #include "pins_GT2560_REV_A.h" 30 | 31 | #if ENABLED(BLTOUCH) 32 | #define SERVO0_PIN 11 33 | #else 34 | #define SERVO0_PIN 32 35 | #endif 36 | -------------------------------------------------------------------------------- /Marlin/src/gcode/config/M220.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | #include "../gcode.h" 24 | #include "../../module/motion.h" 25 | 26 | /** 27 | * M220: Set speed percentage factor, aka "Feed Rate" (M220 S95) 28 | */ 29 | void GcodeSuite::M220() { 30 | 31 | if (parser.seenval('S')) 32 | feedrate_percentage = parser.value_int(); 33 | 34 | } 35 | -------------------------------------------------------------------------------- /Marlin/src/HAL/HAL_TEENSY31_32/watchdog_Teensy.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | #pragma once 24 | 25 | #include "HAL.h" 26 | 27 | // Arduino Due core now has watchdog support 28 | 29 | void watchdog_init(); 30 | 31 | inline void watchdog_reset() { 32 | // Watchdog refresh sequence 33 | WDOG_REFRESH = 0xA602; 34 | WDOG_REFRESH = 0xB480; 35 | } 36 | -------------------------------------------------------------------------------- /Marlin/src/gcode/motion/G80.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | #include "../../inc/MarlinConfigPre.h" 24 | 25 | #if ENABLED(GCODE_MOTION_MODES) 26 | 27 | #include "../gcode.h" 28 | 29 | /** 30 | * G80: Cancel current motion mode 31 | */ 32 | void GcodeSuite::G80() { 33 | 34 | parser.cancel_motion_mode(); 35 | 36 | } 37 | 38 | #endif // GCODE_MOTION_MODES 39 | -------------------------------------------------------------------------------- /Marlin/src/HAL/HAL_ESP32/FlushableHardwareSerial.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | #include "FlushableHardwareSerial.h" 24 | 25 | #ifdef ARDUINO_ARCH_ESP32 26 | 27 | FlushableHardwareSerial::FlushableHardwareSerial(int uart_nr) 28 | : HardwareSerial(uart_nr) 29 | {} 30 | 31 | FlushableHardwareSerial flushableSerial(0); 32 | 33 | #endif // ARDUINO_ARCH_ESP32 34 | -------------------------------------------------------------------------------- /Marlin/src/feature/caselight.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | #pragma once 23 | 24 | extern uint8_t case_light_brightness; 25 | extern bool case_light_on; 26 | extern uint8_t case_light_brightness_sav; // saves brighness info when case_light_on is false 27 | extern bool case_light_arg_flag; // flag to notify if S or P argument type 28 | 29 | void update_case_light(); 30 | -------------------------------------------------------------------------------- /Marlin/src/pins/pins_RUMBA_RAISE3D.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | #define DEFAULT_MACHINE_NAME "Raise3D N Series" 24 | #define BOARD_NAME "Raise3D Rumba" 25 | 26 | // Raise3D uses thermocouples on the standard input pins 27 | #define TEMP_0_PIN 15 // Analog Input 28 | #define TEMP_1_PIN 14 // Analog Input 29 | 30 | #include "pins_RUMBA.h" 31 | -------------------------------------------------------------------------------- /Marlin/src/HAL/shared/persistent_store_api.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * 4 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 5 | * Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com 6 | * Copyright (c) 2015-2016 Nico Tonnhofer wurstnase.reprap@gmail.com 7 | * Copyright (c) 2016 Victor Perez victor_pv@hotmail.com 8 | * 9 | * This program is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as published by 11 | * the Free Software Foundation, either version 3 of the License, or 12 | * (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program. If not, see . 21 | * 22 | */ 23 | #include "../../inc/MarlinConfigPre.h" 24 | 25 | #if EITHER(EEPROM_SETTINGS, SD_FIRMWARE_UPDATE) 26 | 27 | #include "persistent_store_api.h" 28 | PersistentStore persistentStore; 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /Marlin/src/pins/pins_K8200.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | /** 24 | * K8200 Arduino Mega with RAMPS v1.3 pin assignments 25 | * Identical to 3DRAG 26 | */ 27 | 28 | #define BOARD_NAME "Velleman K8200" 29 | #define DEFAULT_MACHINE_NAME "K8200" 30 | #define DEFAULT_SOURCE_CODE_URL "https://github.com/CONSULitAS/Marlin-K8200" 31 | 32 | #include "pins_3DRAG.h" 33 | -------------------------------------------------------------------------------- /Marlin/src/gcode/sdcard/M928.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | #include "../../inc/MarlinConfig.h" 24 | 25 | #if ENABLED(SDSUPPORT) 26 | 27 | #include "../gcode.h" 28 | #include "../../sd/cardreader.h" 29 | 30 | /** 31 | * M928: Start SD Logging 32 | */ 33 | void GcodeSuite::M928() { 34 | 35 | card.openLogFile(parser.string_arg); 36 | 37 | } 38 | 39 | #endif // SDSUPPORT 40 | -------------------------------------------------------------------------------- /Marlin/src/gcode/units/M82_M83.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | #include "../gcode.h" 24 | 25 | /** 26 | * M82: Set E codes absolute (default) 27 | */ 28 | void GcodeSuite::M82() { axis_relative_modes[E_AXIS] = false; } 29 | 30 | /** 31 | * M83: Set E codes relative while in Absolute Coordinates (G90) mode 32 | */ 33 | void GcodeSuite::M83() { axis_relative_modes[E_AXIS] = true; } 34 | -------------------------------------------------------------------------------- /Marlin/src/gcode/bedlevel/ubl/G29.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | /** 24 | * G29.cpp - Unified Bed Leveling 25 | */ 26 | 27 | #include "../../../inc/MarlinConfig.h" 28 | 29 | #if ENABLED(AUTO_BED_LEVELING_UBL) 30 | 31 | #include "../../gcode.h" 32 | #include "../../../feature/bedlevel/ubl/ubl.h" 33 | 34 | void GcodeSuite::G29() { ubl.G29(); } 35 | 36 | #endif // AUTO_BED_LEVELING_UBL 37 | -------------------------------------------------------------------------------- /Marlin/src/HAL/HAL_AVR/watchdog_AVR.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | #pragma once 23 | 24 | #include 25 | 26 | // Initialize watchdog with a 4 second interrupt time 27 | void watchdog_init(); 28 | 29 | // Reset watchdog. MUST be called at least every 4 seconds after the 30 | // first watchdog_init or AVR will go into emergency procedures. 31 | inline void watchdog_reset() { wdt_reset(); } 32 | -------------------------------------------------------------------------------- /Marlin/src/gcode/control/M85.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | #include "../gcode.h" 24 | #include "../../Marlin.h" // for max_inactive_time 25 | 26 | /** 27 | * M85: Set inactivity shutdown timer with parameter S. To disable set zero (default) 28 | */ 29 | void GcodeSuite::M85() { 30 | 31 | if (parser.seen('S')) max_inactive_time = parser.value_millis_from_seconds(); 32 | 33 | } 34 | -------------------------------------------------------------------------------- /Marlin/src/HAL/HAL_LINUX/hardware/Clock.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | #ifdef __PLAT_LINUX__ 24 | 25 | #include "../../../inc/MarlinConfig.h" 26 | #include "Clock.h" 27 | 28 | std::chrono::nanoseconds Clock::startup = std::chrono::high_resolution_clock::now().time_since_epoch(); 29 | uint32_t Clock::frequency = F_CPU; 30 | double Clock::time_multiplier = 1.0; 31 | 32 | #endif // __PLAT_LINUX__ 33 | -------------------------------------------------------------------------------- /Marlin/src/HAL/HAL_LINUX/watchdog.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | #pragma once 23 | 24 | #define RST_POWER_ON 1 25 | #define RST_EXTERNAL 2 26 | #define RST_BROWN_OUT 4 27 | #define RST_WATCHDOG 8 28 | 29 | #define WDT_TIMEOUT 4000000 // 4 second timeout 30 | 31 | void watchdog_init(void); 32 | void watchdog_reset(void); 33 | void HAL_clear_reset_source(void); 34 | uint8_t HAL_get_reset_source(void); 35 | -------------------------------------------------------------------------------- /Marlin/src/HAL/HAL_LPC1768/watchdog.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | #pragma once 23 | 24 | #define RST_POWER_ON 1 25 | #define RST_EXTERNAL 2 26 | #define RST_BROWN_OUT 4 27 | #define RST_WATCHDOG 8 28 | 29 | #define WDT_TIMEOUT 4000000 // 4 second timeout 30 | 31 | void watchdog_init(void); 32 | void watchdog_reset(void); 33 | void HAL_clear_reset_source(void); 34 | uint8_t HAL_get_reset_source(void); 35 | -------------------------------------------------------------------------------- /Marlin/src/HAL/shared/backtrace/unwarmbytab.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | * ARM Stack Unwinder, Michael.McTernan.2001@cs.bris.ac.uk 3 | * Updated, adapted and several bug fixes on 2018 by Eduardo José Tagle 4 | * 5 | * This program is PUBLIC DOMAIN. 6 | * This means that there is no copyright and anyone is able to take a copy 7 | * for free and use it as they wish, with or without modifications, and in 8 | * any context, commerically or otherwise. The only limitation is that I 9 | * don't guarantee that the software is fit for any purpose or accept any 10 | * liablity for it's use or misuse - this software is without warranty. 11 | *************************************************************************** 12 | * File Description: Interface to the memory tracking sub-system. 13 | **************************************************************************/ 14 | 15 | #pragma once 16 | 17 | #include "unwarm.h" 18 | 19 | typedef struct { 20 | uint32_t vrs[16]; 21 | uint32_t current; /* Address of current byte */ 22 | int remaining; 23 | int byte; 24 | } UnwTabState; 25 | 26 | typedef struct { 27 | uint32_t addr_offset; 28 | uint32_t insn; 29 | } UnwTabEntry; 30 | 31 | UnwResult UnwindByTableStart(UnwindFrame* frame, const UnwindCallbacks *cb, void *data); 32 | -------------------------------------------------------------------------------- /Marlin/src/sd/SdFatUtil.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | #pragma once 23 | 24 | /** 25 | * Arduino SdFat Library 26 | * Copyright (C) 2008 by William Greiman 27 | * 28 | * This file is part of the Arduino Sd2Card Library 29 | */ 30 | 31 | /** 32 | * \file 33 | * \brief Useful utility functions. 34 | */ 35 | 36 | namespace SdFatUtil { 37 | int FreeRam(); 38 | } 39 | 40 | using namespace SdFatUtil; // NOLINT 41 | -------------------------------------------------------------------------------- /Marlin/src/module/thermistor/thermistor_998.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | // User-defined table 1 24 | // Dummy Thermistor table.. It will ALWAYS read a fixed value. 25 | #ifndef DUMMY_THERMISTOR_998_VALUE 26 | #define DUMMY_THERMISTOR_998_VALUE 25 27 | #endif 28 | 29 | const short temptable_998[][2] PROGMEM = { 30 | { OV( 1), DUMMY_THERMISTOR_998_VALUE }, 31 | { OV(1023), DUMMY_THERMISTOR_998_VALUE } 32 | }; 33 | -------------------------------------------------------------------------------- /Marlin/src/module/thermistor/thermistor_999.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | // User-defined table 2 24 | // Dummy Thermistor table.. It will ALWAYS read a fixed value. 25 | #ifndef DUMMY_THERMISTOR_999_VALUE 26 | #define DUMMY_THERMISTOR_999_VALUE 25 27 | #endif 28 | 29 | const short temptable_999[][2] PROGMEM = { 30 | { OV( 1), DUMMY_THERMISTOR_999_VALUE }, 31 | { OV(1023), DUMMY_THERMISTOR_999_VALUE } 32 | }; 33 | -------------------------------------------------------------------------------- /Marlin/src/HAL/HAL_TEENSY31_32/watchdog_Teensy.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | #ifdef __MK20DX256__ 24 | 25 | #include "../../inc/MarlinConfig.h" 26 | 27 | #if ENABLED(USE_WATCHDOG) 28 | 29 | #include "watchdog_Teensy.h" 30 | 31 | void watchdog_init() { 32 | WDOG_TOVALH = 0; 33 | WDOG_TOVALL = 4000; 34 | WDOG_STCTRLH = WDOG_STCTRLH_WDOGEN; 35 | } 36 | 37 | #endif // USE_WATCHDOG 38 | 39 | #endif // __MK20DX256__ 40 | -------------------------------------------------------------------------------- /Marlin/src/gcode/sdcard/M26.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | #include "../../inc/MarlinConfig.h" 24 | 25 | #if ENABLED(SDSUPPORT) 26 | 27 | #include "../gcode.h" 28 | #include "../../sd/cardreader.h" 29 | 30 | /** 31 | * M26: Set SD Card file index 32 | */ 33 | void GcodeSuite::M26() { 34 | if (card.isDetected() && parser.seenval('S')) 35 | card.setIndex(parser.value_long()); 36 | } 37 | 38 | #endif // SDSUPPORT 39 | -------------------------------------------------------------------------------- /Marlin/src/gcode/sdcard/M21_M22.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | #include "../../inc/MarlinConfig.h" 24 | 25 | #if ENABLED(SDSUPPORT) 26 | 27 | #include "../gcode.h" 28 | #include "../../sd/cardreader.h" 29 | 30 | /** 31 | * M21: Init SD Card 32 | */ 33 | void GcodeSuite::M21() { card.initsd(); } 34 | 35 | /** 36 | * M22: Release SD Card 37 | */ 38 | void GcodeSuite::M22() { card.release(); } 39 | 40 | #endif // SDSUPPORT 41 | -------------------------------------------------------------------------------- /Marlin/src/feature/power.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | #pragma once 23 | 24 | /** 25 | * power.h - power control 26 | */ 27 | 28 | #include "../core/millis_t.h" 29 | 30 | class Power { 31 | public: 32 | static void check(); 33 | static void power_on(); 34 | static void power_off(); 35 | private: 36 | static millis_t lastPowerOn; 37 | static bool is_power_needed(); 38 | }; 39 | 40 | extern Power powerManager; 41 | -------------------------------------------------------------------------------- /Marlin/src/module/thermistor/thermistor_110.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | // Pt100 with 1k0 pullup 24 | const short temptable_110[][2] PROGMEM = { 25 | // only a few values are needed as the curve is very flat 26 | PtLine( 0, 100, 1000), 27 | PtLine( 50, 100, 1000), 28 | PtLine(100, 100, 1000), 29 | PtLine(150, 100, 1000), 30 | PtLine(200, 100, 1000), 31 | PtLine(250, 100, 1000), 32 | PtLine(300, 100, 1000) 33 | }; 34 | -------------------------------------------------------------------------------- /Marlin/src/module/thermistor/thermistor_147.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | // Pt100 with 4k7 pullup 24 | const short temptable_147[][2] PROGMEM = { 25 | // only a few values are needed as the curve is very flat 26 | PtLine( 0, 100, 4700), 27 | PtLine( 50, 100, 4700), 28 | PtLine(100, 100, 4700), 29 | PtLine(150, 100, 4700), 30 | PtLine(200, 100, 4700), 31 | PtLine(250, 100, 4700), 32 | PtLine(300, 100, 4700) 33 | }; 34 | -------------------------------------------------------------------------------- /Marlin/src/gcode/probe/G31_G32.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | #include "../../inc/MarlinConfig.h" 24 | 25 | #if ENABLED(Z_PROBE_SLED) 26 | 27 | #include "../gcode.h" 28 | #include "../../module/probe.h" 29 | 30 | /** 31 | * G31: Deploy the Z probe 32 | */ 33 | void GcodeSuite::G31() { DEPLOY_PROBE(); } 34 | 35 | /** 36 | * G32: Stow the Z probe 37 | */ 38 | void GcodeSuite::G32() { STOW_PROBE(); } 39 | 40 | #endif // Z_PROBE_SLED 41 | -------------------------------------------------------------------------------- /Marlin/src/gcode/sdcard/M20.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | #include "../../inc/MarlinConfig.h" 24 | 25 | #if ENABLED(SDSUPPORT) 26 | 27 | #include "../gcode.h" 28 | #include "../../sd/cardreader.h" 29 | 30 | /** 31 | * M20: List SD card to serial output 32 | */ 33 | void GcodeSuite::M20() { 34 | SERIAL_ECHOLNPGM(MSG_BEGIN_FILE_LIST); 35 | card.ls(); 36 | SERIAL_ECHOLNPGM(MSG_END_FILE_LIST); 37 | } 38 | 39 | #endif // SDSUPPORT 40 | -------------------------------------------------------------------------------- /Marlin/src/gcode/sdcard/M524.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | #include "../../inc/MarlinConfig.h" 24 | 25 | #if ENABLED(SDSUPPORT) 26 | 27 | #include "../gcode.h" 28 | #include "../../sd/cardreader.h" 29 | 30 | /** 31 | * M524: Abort the current SD print job (started with M24) 32 | */ 33 | void GcodeSuite::M524() { 34 | 35 | if (IS_SD_PRINTING()) 36 | card.flag.abort_sd_printing = true; 37 | 38 | } 39 | 40 | #endif // SDSUPPORT 41 | -------------------------------------------------------------------------------- /Marlin/src/module/thermistor/thermistor_1047.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | // Pt1000 with 4k7 pullup 24 | const short temptable_1047[][2] PROGMEM = { 25 | // only a few values are needed as the curve is very flat 26 | PtLine( 0, 1000, 4700), 27 | PtLine( 50, 1000, 4700), 28 | PtLine(100, 1000, 4700), 29 | PtLine(150, 1000, 4700), 30 | PtLine(200, 1000, 4700), 31 | PtLine(250, 1000, 4700), 32 | PtLine(300, 1000, 4700) 33 | }; 34 | -------------------------------------------------------------------------------- /Marlin/src/HAL/HAL_DUE/watchdog_Due.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | #pragma once 23 | 24 | // Arduino Due core now has watchdog support 25 | 26 | #include "HAL.h" 27 | 28 | // Initialize watchdog with a 4 second interrupt time 29 | void watchdog_init(); 30 | 31 | // Reset watchdog. MUST be called at least every 4 seconds after the 32 | // first watchdog_init or AVR will go into emergency procedures. 33 | inline void watchdog_reset() { watchdogReset(); } 34 | -------------------------------------------------------------------------------- /Marlin/src/HAL/HAL_ESP32/watchdog_ESP32.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | #ifdef ARDUINO_ARCH_ESP32 24 | 25 | #include "../../inc/MarlinConfig.h" 26 | 27 | #if ENABLED(USE_WATCHDOG) 28 | 29 | #include "watchdog_ESP32.h" 30 | 31 | void watchdogSetup(void) { 32 | // do whatever. don't remove this function. 33 | } 34 | 35 | void watchdog_init(void) { 36 | // TODO 37 | } 38 | 39 | #endif // USE_WATCHDOG 40 | 41 | #endif // ARDUINO_ARCH_ESP32 42 | -------------------------------------------------------------------------------- /Marlin/src/gcode/calibrate/M12.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | #include "../../inc/MarlinConfigPre.h" 23 | 24 | #if ENABLED(EXTERNAL_CLOSED_LOOP_CONTROLLER) 25 | 26 | #include "../gcode.h" 27 | #include "../../module/planner.h" 28 | #include "../../feature/closedloop.h" 29 | 30 | void GcodeSuite::M12() { 31 | planner.synchronize(); 32 | if (parser.seenval('S')) 33 | set_closedloop(parser.value_int()); // Force a CLC set 34 | } 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /Marlin/src/gcode/sdcard/M30.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | #include "../../inc/MarlinConfig.h" 24 | 25 | #if ENABLED(SDSUPPORT) 26 | 27 | #include "../gcode.h" 28 | #include "../../sd/cardreader.h" 29 | 30 | /** 31 | * M30 : Delete SD Card file 32 | */ 33 | void GcodeSuite::M30() { 34 | if (card.isDetected()) { 35 | card.closefile(); 36 | card.removeFile(parser.string_arg); 37 | } 38 | } 39 | 40 | #endif // SDSUPPORT 41 | -------------------------------------------------------------------------------- /Marlin/src/HAL/HAL_TEENSY31_32/SanityCheck.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | /** 24 | * Test TEENSY35_36 specific configuration values for errors at compile-time. 25 | */ 26 | 27 | #if ENABLED(EMERGENCY_PARSER) 28 | #error "EMERGENCY_PARSER is not yet implemented for Teensy 3.1/3.2. Disable EMERGENCY_PARSER to continue." 29 | #endif 30 | 31 | #if ENABLED(FAST_PWM_FAN) 32 | #error "FAST_PWM_FAN is not yet implemented for this platform." 33 | #endif 34 | -------------------------------------------------------------------------------- /Marlin/src/HAL/HAL_TEENSY35_36/SanityCheck.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | /** 24 | * Test TEENSY35_36 specific configuration values for errors at compile-time. 25 | */ 26 | 27 | #if ENABLED(EMERGENCY_PARSER) 28 | #error "EMERGENCY_PARSER is not yet implemented for Teensy 3.5/3.6. Disable EMERGENCY_PARSER to continue." 29 | #endif 30 | 31 | #if ENABLED(FAST_PWM_FAN) 32 | #error "FAST_PWM_FAN is not yet implemented for this platform." 33 | #endif 34 | -------------------------------------------------------------------------------- /Marlin/src/HAL/HAL_ESP32/i2s.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | #pragma once 23 | 24 | #include 25 | 26 | // current value of the outputs provided over i2s 27 | extern uint32_t i2s_port_data; 28 | 29 | int i2s_init(); 30 | 31 | uint8_t i2s_state(uint8_t pin); 32 | 33 | void i2s_write(uint8_t pin, uint8_t val); 34 | 35 | void i2s_push_sample(); 36 | 37 | // pin definitions 38 | 39 | #define I2S_WS 25 40 | #define I2S_BCK 26 41 | #define I2S_DATA 27 42 | -------------------------------------------------------------------------------- /Marlin/src/HAL/HAL_STM32/fastio_STM32.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * Copyright (C) 2017 Victor Perez 8 | * 9 | * This program is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as published by 11 | * the Free Software Foundation, either version 3 of the License, or 12 | * (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program. If not, see . 21 | * 22 | */ 23 | #if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) 24 | 25 | #include "../../inc/MarlinConfig.h" 26 | 27 | GPIO_TypeDef* FastIOPortMap[LastPort + 1]; 28 | 29 | void FastIO_init() { 30 | for (uint8_t i = 0; i < NUM_DIGITAL_PINS; i++) 31 | FastIOPortMap[STM_PORT(digitalPin[i])] = get_GPIO_Port(STM_PORT(digitalPin[i])); 32 | } 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /Marlin/src/gcode/control/M120_M121.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | #include "../gcode.h" 24 | #include "../../module/endstops.h" 25 | 26 | /** 27 | * M120: Enable endstops and set non-homing endstop state to "enabled" 28 | */ 29 | void GcodeSuite::M120() { endstops.enable_globally(true); } 30 | 31 | /** 32 | * M121: Disable endstops and set non-homing endstop state to "disabled" 33 | */ 34 | void GcodeSuite::M121() { endstops.enable_globally(false); } 35 | -------------------------------------------------------------------------------- /Marlin/src/pins/pins_SANGUINOLOLU_12.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | /** 24 | * Sanguinololu V1.2 pin assignments 25 | * 26 | * Applies to the following boards: 27 | * 28 | * AZTEEG_X1 29 | * MELZI 30 | * MELZI_CREALITY 31 | * MELZI_MAKR3D 32 | * SANGUINOLOLU_12 33 | * STB_11 34 | */ 35 | 36 | #ifndef BOARD_NAME 37 | #define BOARD_NAME "Sanguinololu 1.2" 38 | #endif 39 | 40 | #define SANGUINOLOLU_V_1_2 41 | #include "pins_SANGUINOLOLU_11.h" 42 | -------------------------------------------------------------------------------- /Marlin/src/pins/pins_TRIGORILLA_13.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | /** 24 | * Arduino Mega with RAMPS v1.3 for Anycubic 25 | */ 26 | 27 | #define BOARD_NAME "Anycubic RAMPS 1.3" 28 | 29 | #define IS_RAMPS_EFB 30 | #define RAMPS_D9_PIN 44 31 | #define FAN2_PIN 9 32 | #define ORIG_E0_AUTO_FAN_PIN 9 33 | 34 | #include "pins_RAMPS_13.h" 35 | 36 | #undef E1_STEP_PIN 37 | #undef E1_DIR_PIN 38 | #undef E1_ENABLE_PIN 39 | #undef E1_CS_PIN 40 | -------------------------------------------------------------------------------- /Marlin/src/pins/pins_MAKEBOARD_MINI.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | #include "pins_RAMPS.h" 24 | 25 | #undef BOARD_NAME 26 | #define BOARD_NAME "MAKEBOARD_MINI" 27 | 28 | // 29 | // Only 3 Limit Switch plugs on Micromake C1 30 | // 31 | #undef X_MIN_PIN 32 | #undef Y_MIN_PIN 33 | #undef Z_MIN_PIN 34 | #undef X_MAX_PIN 35 | #undef Y_MAX_PIN 36 | #undef Z_MAX_PIN 37 | #define X_STOP_PIN 2 38 | #define Y_STOP_PIN 15 39 | #define Z_STOP_PIN 19 40 | -------------------------------------------------------------------------------- /Marlin/src/gcode/lcd/M250.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | #include "../../inc/MarlinConfig.h" 24 | 25 | #if HAS_LCD_CONTRAST 26 | 27 | #include "../gcode.h" 28 | #include "../../lcd/ultralcd.h" 29 | 30 | /** 31 | * M250: Read and optionally set the LCD contrast 32 | */ 33 | void GcodeSuite::M250() { 34 | if (parser.seen('C')) ui.set_contrast(parser.value_int()); 35 | SERIAL_ECHOLNPAIR("LCD Contrast: ", ui.contrast); 36 | } 37 | 38 | #endif // HAS_LCD_CONTRAST 39 | -------------------------------------------------------------------------------- /Marlin/src/HAL/HAL_TEENSY31_32/persistent_store_impl.cpp: -------------------------------------------------------------------------------- 1 | #ifdef __MK20DX256__ 2 | 3 | #include "../../inc/MarlinConfig.h" 4 | 5 | #if ENABLED(EEPROM_SETTINGS) 6 | 7 | #include "../persistent_store_api.h" 8 | 9 | namespace HAL { 10 | namespace PersistentStore { 11 | 12 | bool access_start() { return true; } 13 | bool access_finish() { return true; } 14 | 15 | bool write_data(int &pos, const uint8_t *value, uint16_t size, uint16_t *crc) { 16 | while (size--) { 17 | uint8_t * const p = (uint8_t * const)pos; 18 | uint8_t v = *value; 19 | // EEPROM has only ~100,000 write cycles, 20 | // so only write bytes that have changed! 21 | if (v != eeprom_read_byte(p)) { 22 | eeprom_write_byte(p, v); 23 | if (eeprom_read_byte(p) != v) { 24 | SERIAL_ECHO_MSG(MSG_ERR_EEPROM_WRITE); 25 | return true; 26 | } 27 | } 28 | crc16(crc, &v, 1); 29 | pos++; 30 | value++; 31 | }; 32 | return false; 33 | } 34 | 35 | bool read_data(int &pos, uint8_t* value, uint16_t size, uint16_t *crc, const bool writing/*=true*/) { 36 | do { 37 | uint8_t c = eeprom_read_byte((uint8_t*)pos); 38 | if (writing) *value = c; 39 | crc16(crc, &c, 1); 40 | pos++; 41 | value++; 42 | } while (--size); 43 | return false; 44 | } 45 | 46 | } // PersistentStore 47 | } // HAL 48 | 49 | #endif // EEPROM_SETTINGS 50 | #endif // __MK20DX256__ 51 | -------------------------------------------------------------------------------- /Marlin/src/HAL/HAL_TEENSY35_36/watchdog_Teensy.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | #if defined(__MK64FX512__) || defined(__MK66FX1M0__) 24 | 25 | #include "../../inc/MarlinConfig.h" 26 | 27 | #if ENABLED(USE_WATCHDOG) 28 | 29 | #include "watchdog_Teensy.h" 30 | 31 | void watchdog_init() { 32 | WDOG_TOVALH = 0; 33 | WDOG_TOVALL = 4000; 34 | WDOG_STCTRLH = WDOG_STCTRLH_WDOGEN; 35 | } 36 | 37 | #endif // USE_WATCHDOG 38 | 39 | #endif // __MK64FX512__ || __MK66FX1M0__ 40 | -------------------------------------------------------------------------------- /Marlin/src/HAL/HAL_LINUX/hardware/IOLoggerCSV.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | #pragma once 23 | 24 | #include 25 | #include 26 | #include 27 | #include "Gpio.h" 28 | 29 | class IOLoggerCSV: public IOLogger { 30 | public: 31 | IOLoggerCSV(std::string filename); 32 | virtual ~IOLoggerCSV(); 33 | void flush(); 34 | void log(GpioEvent ev); 35 | 36 | private: 37 | std::ofstream file; 38 | std::list events; 39 | std::mutex vector_lock; 40 | }; 41 | -------------------------------------------------------------------------------- /Marlin/src/pins/pins_BIQU_KFB_2.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | /** 24 | * KFB 2.0 – Arduino Mega2560 with RAMPS v1.4 pin assignments 25 | */ 26 | 27 | #if HOTENDS > 2 || E_STEPPERS > 2 28 | #error "KFB 2.0 supports up to 2 hotends / E-steppers. Comment out this line to continue." 29 | #endif 30 | 31 | #define BOARD_NAME "KFB 2.0" 32 | 33 | // 34 | // Heaters / Fans 35 | // 36 | // Power outputs BEEF or BEFF 37 | #define MOSFET_D_PIN 7 38 | 39 | #include "pins_RAMPS.h" 40 | -------------------------------------------------------------------------------- /Marlin/src/HAL/shared/HAL_ST7920.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | #pragma once 23 | 24 | /** 25 | * HAL/HAL_ST7920.h 26 | * For the HALs that provide direct access to the ST7920 display 27 | * (bypassing U8G), it will allow the LIGHTWEIGHT_UI to operate. 28 | */ 29 | 30 | #if HAS_GRAPHICAL_LCD && ENABLED(LIGHTWEIGHT_UI) 31 | void ST7920_cs(); 32 | void ST7920_ncs(); 33 | void ST7920_set_cmd(); 34 | void ST7920_set_dat(); 35 | void ST7920_write_byte(const uint8_t data); 36 | #endif 37 | -------------------------------------------------------------------------------- /Marlin/src/HAL/HAL_ESP32/FlushableHardwareSerial.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | #ifdef ARDUINO_ARCH_ESP32 24 | 25 | #include 26 | 27 | class FlushableHardwareSerial : public HardwareSerial { 28 | public: 29 | FlushableHardwareSerial(int uart_nr); 30 | 31 | inline void flushTX(void) { /* No need to flush the hardware serial, but defined here for compatibility. */ } 32 | }; 33 | 34 | extern FlushableHardwareSerial flushableSerial; 35 | 36 | #endif // ARDUINO_ARCH_ESP32 37 | -------------------------------------------------------------------------------- /Marlin/src/gcode/units/G20_G21.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | #include "../../inc/MarlinConfig.h" 24 | 25 | #if ENABLED(INCH_MODE_SUPPORT) 26 | 27 | #include "../gcode.h" 28 | 29 | /** 30 | * G20: Set input mode to inches 31 | */ 32 | void GcodeSuite::G20() { parser.set_input_linear_units(LINEARUNIT_INCH); } 33 | 34 | /** 35 | * G21: Set input mode to millimeters 36 | */ 37 | void GcodeSuite::G21() { parser.set_input_linear_units(LINEARUNIT_MM); } 38 | 39 | #endif // INCH_MODE_SUPPORT 40 | -------------------------------------------------------------------------------- /Marlin/src/feature/dac/stepper_dac.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | #pragma once 23 | 24 | /** 25 | * stepper_dac.h - To set stepper current via DAC 26 | */ 27 | 28 | #include "dac_mcp4728.h" 29 | 30 | int dac_init(); 31 | void dac_current_percent(uint8_t channel, float val); 32 | void dac_current_raw(uint8_t channel, uint16_t val); 33 | void dac_print_values(); 34 | void dac_commit_eeprom(); 35 | uint8_t dac_current_get_percent(AxisEnum axis); 36 | void dac_current_set_percents(const uint8_t pct[XYZE]); 37 | -------------------------------------------------------------------------------- /Marlin/src/feature/snmm.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | #include "../inc/MarlinConfig.h" 24 | 25 | #if ENABLED(MK2_MULTIPLEXER) 26 | 27 | #include "../module/stepper.h" 28 | 29 | void select_multiplexed_stepper(const uint8_t e) { 30 | planner.synchronize(); 31 | disable_e_steppers(); 32 | WRITE(E_MUX0_PIN, TEST(e, 0) ? HIGH : LOW); 33 | WRITE(E_MUX1_PIN, TEST(e, 1) ? HIGH : LOW); 34 | WRITE(E_MUX2_PIN, TEST(e, 2) ? HIGH : LOW); 35 | safe_delay(100); 36 | } 37 | 38 | #endif // MK2_MULTIPLEXER 39 | -------------------------------------------------------------------------------- /Marlin/src/lcd/dogm/u8g_fontutf8.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file fontutf8.h 3 | * @brief font api for u8g lib 4 | * @author Yunhui Fu (yhfudev@gmail.com) 5 | * @version 1.0 6 | * @date 2015-02-19 7 | * @copyright GPL/BSD 8 | */ 9 | #pragma once 10 | 11 | #include 12 | #include "../fontutils.h" 13 | 14 | // the macro to indicate a UTF-8 string 15 | // You should to save the C/C++ source in UTF-8 encoding! 16 | // Once you change your UTF-8 strings, you need to call the script uxggenpages.sh to create the font data file fontutf8-data.h 17 | #define _UxGT(a) a 18 | 19 | typedef struct _uxg_fontinfo_t { 20 | uint16_t page; 21 | uint8_t begin; 22 | uint8_t end; 23 | uint16_t size; 24 | const u8g_fntpgm_uint8_t *fntdata; 25 | } uxg_fontinfo_t; 26 | 27 | int uxg_SetUtf8Fonts(const uxg_fontinfo_t * fntinfo, int number); // fntinfo is type of PROGMEM 28 | 29 | unsigned int uxg_DrawWchar(u8g_t *pu8g, unsigned int x, unsigned int y, wchar_t ch, pixel_len_t max_length); 30 | 31 | unsigned int uxg_DrawUtf8Str(u8g_t *pu8g, unsigned int x, unsigned int y, const char *utf8_msg, pixel_len_t max_length); 32 | unsigned int uxg_DrawUtf8StrP(u8g_t *pu8g, unsigned int x, unsigned int y, PGM_P utf8_msg, pixel_len_t max_length); 33 | 34 | int uxg_GetUtf8StrPixelWidth(u8g_t *pu8g, const char *utf8_msg); 35 | int uxg_GetUtf8StrPixelWidthP(u8g_t *pu8g, PGM_P utf8_msg); 36 | 37 | #define uxg_GetFont(puxg) ((puxg)->font) 38 | -------------------------------------------------------------------------------- /Marlin/src/gcode/host/M876.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | #include "../../inc/MarlinConfig.h" 23 | 24 | #if ENABLED(HOST_PROMPT_SUPPORT) && DISABLED(EMERGENCY_PARSER) 25 | 26 | #include "../../feature/host_actions.h" 27 | #include "../gcode.h" 28 | #include "../../Marlin.h" 29 | 30 | /** 31 | * M876: Handle Prompt Response 32 | */ 33 | void GcodeSuite::M876() { 34 | if (parser.seenval('S')) host_response_handler((uint8_t)parser.value_int()); 35 | } 36 | 37 | #endif // HOST_PROMPT_SUPPORT && !EMERGENCY_PARSER 38 | -------------------------------------------------------------------------------- /Marlin/src/inc/MarlinConfigPre.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | #pragma once 23 | 24 | #define __MARLIN_FIRMWARE__ 25 | 26 | // 27 | // Prefix header to acquire configurations 28 | // 29 | 30 | #include "../HAL/platforms.h" 31 | #include "../core/boards.h" 32 | #include "../core/macros.h" 33 | #include "../core/millis_t.h" 34 | #include "Version.h" 35 | #include "../../Configuration.h" 36 | #include "Conditionals_LCD.h" 37 | #include "../core/drivers.h" 38 | #include "../../Configuration_adv.h" 39 | #include "Conditionals_adv.h" 40 | -------------------------------------------------------------------------------- /Marlin/src/gcode/config/M540.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | #include "../../inc/MarlinConfig.h" 24 | 25 | #if ENABLED(ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED) 26 | 27 | #include "../gcode.h" 28 | #include "../../module/stepper.h" 29 | 30 | /** 31 | * M540: Set whether SD card print should abort on endstop hit (M540 S<0|1>) 32 | */ 33 | void GcodeSuite::M540() { 34 | 35 | if (parser.seen('S')) 36 | planner.abort_on_endstop_hit = parser.value_bool(); 37 | 38 | } 39 | 40 | #endif // ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED 41 | -------------------------------------------------------------------------------- /Marlin/src/HAL/HAL_TEENSY35_36/persistent_store_impl.cpp: -------------------------------------------------------------------------------- 1 | #if defined(__MK64FX512__) || defined(__MK66FX1M0__) 2 | 3 | #include "../../inc/MarlinConfig.h" 4 | 5 | #if ENABLED(EEPROM_SETTINGS) 6 | 7 | #include "../shared/persistent_store_api.h" 8 | 9 | namespace HAL { 10 | namespace PersistentStore { 11 | 12 | bool access_start() { return true; } 13 | bool access_finish() { return true; } 14 | 15 | bool write_data(int &pos, const uint8_t *value, uint16_t size, uint16_t *crc) { 16 | while (size--) { 17 | uint8_t * const p = (uint8_t * const)pos; 18 | uint8_t v = *value; 19 | // EEPROM has only ~100,000 write cycles, 20 | // so only write bytes that have changed! 21 | if (v != eeprom_read_byte(p)) { 22 | eeprom_write_byte(p, v); 23 | if (eeprom_read_byte(p) != v) { 24 | SERIAL_ECHO_MSG(MSG_ERR_EEPROM_WRITE); 25 | return true; 26 | } 27 | } 28 | crc16(crc, &v, 1); 29 | pos++; 30 | value++; 31 | }; 32 | return false; 33 | } 34 | 35 | bool read_data(int &pos, uint8_t* value, uint16_t size, uint16_t *crc, const bool writing/*=true*/) { 36 | do { 37 | uint8_t c = eeprom_read_byte((uint8_t*)pos); 38 | if (writing) *value = c; 39 | crc16(crc, &c, 1); 40 | pos++; 41 | value++; 42 | } while (--size); 43 | return false; 44 | } 45 | 46 | } // PersistentStore 47 | } // HAL 48 | 49 | #endif // EEPROM_SETTINGS 50 | #endif // __MK64FX512__ || __MK66FX1M0__ 51 | -------------------------------------------------------------------------------- /Marlin/src/HAL/HAL_TEENSY35_36/HAL_Servo_Teensy.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | #pragma once 23 | 24 | #include 25 | 26 | // Inherit and expand on the official library 27 | class libServo : public Servo { 28 | public: 29 | int8_t attach(const int pin); 30 | int8_t attach(const int pin, const int min, const int max); 31 | void move(const int value); 32 | private: 33 | uint16_t min_ticks; 34 | uint16_t max_ticks; 35 | uint8_t servoIndex; // index into the channel data for this servo 36 | }; 37 | -------------------------------------------------------------------------------- /Marlin/src/HAL/HAL_LPC1768/u8g/HAL_LCD_delay.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | /** 24 | * LCD delay routines - used by all the drivers. 25 | * 26 | * These are based on the LPC1768 routines. 27 | * 28 | * Couldn't just call exact copies because the overhead resulted in the 29 | * one microsecond delay being about 4uS. 30 | */ 31 | 32 | #ifdef __cplusplus 33 | extern "C" { 34 | #endif 35 | 36 | void U8g_delay(int msec); 37 | void u8g_MicroDelay(void); 38 | void u8g_10MicroDelay(void); 39 | 40 | #ifdef __cplusplus 41 | } 42 | #endif 43 | -------------------------------------------------------------------------------- /Marlin/src/HAL/HAL_TEENSY31_32/HAL_Servo_Teensy.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | #pragma once 24 | 25 | #include 26 | 27 | // Inherit and expand on the official library 28 | class libServo : public Servo { 29 | public: 30 | int8_t attach(const int pin); 31 | int8_t attach(const int pin, const int min, const int max); 32 | void move(const int value); 33 | private: 34 | uint16_t min_ticks; 35 | uint16_t max_ticks; 36 | uint8_t servoIndex; // index into the channel data for this servo 37 | }; 38 | -------------------------------------------------------------------------------- /Marlin/src/gcode/feature/pause/G27.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | 24 | #include "../../../inc/MarlinConfig.h" 25 | 26 | #if ENABLED(NOZZLE_PARK_FEATURE) 27 | 28 | #include "../../gcode.h" 29 | #include "../../../libs/nozzle.h" 30 | #include "../../../module/motion.h" 31 | 32 | /** 33 | * G27: Park the nozzle 34 | */ 35 | void GcodeSuite::G27() { 36 | // Don't allow nozzle parking without homing first 37 | if (axis_unhomed_error()) return; 38 | Nozzle::park(parser.ushortval('P')); 39 | } 40 | 41 | #endif // NOZZLE_PARK_FEATURE 42 | -------------------------------------------------------------------------------- /Marlin/src/HAL/HAL_ESP32/spiffs.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | #ifdef ARDUINO_ARCH_ESP32 24 | 25 | #include "../../inc/MarlinConfigPre.h" 26 | 27 | #if EITHER(WEBSUPPORT, EEPROM_SETTINGS) 28 | 29 | #include "../../core/serial.h" 30 | 31 | #include "FS.h" 32 | #include "SPIFFS.h" 33 | 34 | bool spiffs_initialized; 35 | 36 | void spiffs_init() { 37 | if (SPIFFS.begin()) 38 | spiffs_initialized = true; 39 | else 40 | SERIAL_ECHO_MSG("SPIFFS mount failed"); 41 | } 42 | 43 | #endif // WEBSUPPORT 44 | #endif // ARDUINO_ARCH_ESP32 45 | -------------------------------------------------------------------------------- /Marlin/src/HAL/HAL_STM32/HAL_Servo_STM32.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * Copyright (C) 2017 Victor Perez 8 | * 9 | * This program is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as published by 11 | * the Free Software Foundation, either version 3 of the License, or 12 | * (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program. If not, see . 21 | * 22 | */ 23 | #pragma once 24 | 25 | #include 26 | 27 | // Inherit and expand on the official library 28 | class libServo : public Servo { 29 | public: 30 | int8_t attach(const int pin); 31 | int8_t attach(const int pin, const int min, const int max); 32 | void move(const int value); 33 | private: 34 | uint16_t min_ticks, max_ticks; 35 | uint8_t servoIndex; // index into the channel data for this servo 36 | }; 37 | -------------------------------------------------------------------------------- /Marlin/src/gcode/temperature/M155.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | #include "../../inc/MarlinConfig.h" 24 | 25 | #if ENABLED(AUTO_REPORT_TEMPERATURES) && HAS_TEMP_SENSOR 26 | 27 | #include "../gcode.h" 28 | #include "../../module/temperature.h" 29 | 30 | /** 31 | * M155: Set temperature auto-report interval. M155 S 32 | */ 33 | void GcodeSuite::M155() { 34 | 35 | if (parser.seenval('S')) 36 | thermalManager.set_auto_report_interval(parser.value_byte()); 37 | 38 | } 39 | 40 | #endif // AUTO_REPORT_TEMPERATURES && HAS_TEMP_SENSOR 41 | -------------------------------------------------------------------------------- /Marlin/src/gcode/units/M149.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | #include "../../inc/MarlinConfig.h" 24 | 25 | #if ENABLED(TEMPERATURE_UNITS_SUPPORT) 26 | 27 | #include "../gcode.h" 28 | 29 | /** 30 | * M149: Set temperature units 31 | */ 32 | void GcodeSuite::M149() { 33 | if (parser.seenval('C')) parser.set_input_temp_units(TEMPUNIT_C); 34 | else if (parser.seenval('K')) parser.set_input_temp_units(TEMPUNIT_K); 35 | else if (parser.seenval('F')) parser.set_input_temp_units(TEMPUNIT_F); 36 | } 37 | 38 | #endif // TEMPERATURE_UNITS_SUPPORT 39 | -------------------------------------------------------------------------------- /Marlin/src/pins/pins_MKS_BASE_HEROIC.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | /** 24 | * MKS BASE with Heroic HR4982 stepper drivers 25 | */ 26 | 27 | #include "pins_MKS_BASE_15.h" 28 | 29 | /** 30 | * Some new boards use HR4982 (Heroic) instead of the A4982 (Allegro) stepper drivers. 31 | * Most the functionality is similar, the HR variant obviously doesn't work with diode 32 | * smoothers (no fast decay). And the Heroic has a 128 µStepping mode where the A4982 33 | * is doing quarter steps (MS1=0, MS2=1). 34 | */ 35 | #define HEROIC_STEPPER_DRIVERS 36 | -------------------------------------------------------------------------------- /Marlin/src/pins/pins_RAMPS_13.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | /** 24 | * Arduino Mega with RAMPS v1.3 pin assignments 25 | * 26 | * Applies to the following boards: 27 | * 28 | * RAMPS_13_EFB (Extruder, Fan, Bed) 29 | * RAMPS_13_EEB (Extruder, Extruder, Bed) 30 | * RAMPS_13_EFF (Extruder, Fan, Fan) 31 | * RAMPS_13_EEF (Extruder, Extruder, Fan) 32 | * RAMPS_13_SF (Spindle, Controller Fan) 33 | * 34 | */ 35 | 36 | #ifndef BOARD_NAME 37 | #define BOARD_NAME "RAMPS 1.3" 38 | #endif 39 | 40 | #define IS_RAMPS_13 41 | #include "pins_RAMPS.h" 42 | -------------------------------------------------------------------------------- /Marlin/src/module/thermistor/thermistor_1010.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | // Pt1000 with 1k0 pullup 24 | const short temptable_1010[][2] PROGMEM = { 25 | PtLine( 0, 1000, 1000), 26 | PtLine( 25, 1000, 1000), 27 | PtLine( 50, 1000, 1000), 28 | PtLine( 75, 1000, 1000), 29 | PtLine(100, 1000, 1000), 30 | PtLine(125, 1000, 1000), 31 | PtLine(150, 1000, 1000), 32 | PtLine(175, 1000, 1000), 33 | PtLine(200, 1000, 1000), 34 | PtLine(225, 1000, 1000), 35 | PtLine(250, 1000, 1000), 36 | PtLine(275, 1000, 1000), 37 | PtLine(300, 1000, 1000) 38 | }; 39 | -------------------------------------------------------------------------------- /Marlin/src/HAL/HAL_STM32F1/persistent_store_eeprom.cpp: -------------------------------------------------------------------------------- 1 | #ifdef __STM32F1__ 2 | 3 | #include "../../inc/MarlinConfig.h" 4 | 5 | #if ENABLED(EEPROM_SETTINGS) && ENABLED(I2C_EEPROM) 6 | 7 | #include "../shared/persistent_store_api.h" 8 | 9 | bool PersistentStore::access_start() { return true; } 10 | bool PersistentStore::access_finish() { return true; } 11 | 12 | bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) { 13 | while (size--) { 14 | uint8_t * const p = (uint8_t * const)pos; 15 | uint8_t v = *value; 16 | // EEPROM has only ~100,000 write cycles, 17 | // so only write bytes that have changed! 18 | if (v != eeprom_read_byte(p)) { 19 | eeprom_write_byte(p, v); 20 | if (eeprom_read_byte(p) != v) { 21 | SERIAL_ECHO_MSG(MSG_ERR_EEPROM_WRITE); 22 | return true; 23 | } 24 | } 25 | crc16(crc, &v, 1); 26 | pos++; 27 | value++; 28 | }; 29 | return false; 30 | } 31 | 32 | bool PersistentStore::read_data(int &pos, uint8_t* value, size_t size, uint16_t *crc, const bool writing/*=true*/) { 33 | do { 34 | uint8_t c = eeprom_read_byte((uint8_t*)pos); 35 | if (writing) *value = c; 36 | crc16(crc, &c, 1); 37 | pos++; 38 | value++; 39 | } while (--size); 40 | return false; // always assume success for AVR's 41 | } 42 | 43 | size_t PersistentStore::capacity() { return E2END + 1; } 44 | 45 | #endif // EEPROM_SETTINGS || I2C_EEPROM 46 | #endif // __STM32F1__ 47 | -------------------------------------------------------------------------------- /Marlin/src/HAL/HAL_STM32F4/HAL_Servo_STM32F4.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * Copyright (C) 2017 Victor Perez 8 | * 9 | * This program is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as published by 11 | * the Free Software Foundation, either version 3 of the License, or 12 | * (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program. If not, see . 21 | * 22 | */ 23 | #pragma once 24 | 25 | #include 26 | 27 | // Inherit and expand on the official library 28 | class libServo : public Servo { 29 | public: 30 | int8_t attach(const int pin); 31 | int8_t attach(const int pin, const int min, const int max); 32 | void move(const int value); 33 | private: 34 | uint16_t min_ticks; 35 | uint16_t max_ticks; 36 | uint8_t servoIndex; // index into the channel data for this servo 37 | }; 38 | -------------------------------------------------------------------------------- /Marlin/src/gcode/sdcard/M23.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | #include "../../inc/MarlinConfig.h" 24 | 25 | #if ENABLED(SDSUPPORT) 26 | 27 | #include "../gcode.h" 28 | #include "../../sd/cardreader.h" 29 | 30 | /** 31 | * M23: Open a file 32 | * 33 | * The path is relative to the root directory 34 | */ 35 | void GcodeSuite::M23() { 36 | // Simplify3D includes the size, so zero out all spaces (#7227) 37 | for (char *fn = parser.string_arg; *fn; ++fn) if (*fn == ' ') *fn = '\0'; 38 | card.openFile(parser.string_arg, true); 39 | } 40 | 41 | #endif // SDSUPPORT 42 | -------------------------------------------------------------------------------- /Marlin/src/HAL/HAL_STM32F7/HAL_Servo_STM32F7.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * Copyright (C) 2017 Victor Perez 8 | * 9 | * This program is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as published by 11 | * the Free Software Foundation, either version 3 of the License, or 12 | * (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program. If not, see . 21 | * 22 | */ 23 | #pragma once 24 | 25 | #include <../../libraries/Servo/src/Servo.h> 26 | 27 | // Inherit and expand on the official library 28 | class libServo : public Servo { 29 | public: 30 | int8_t attach(const int pin); 31 | int8_t attach(const int pin, const int min, const int max); 32 | void move(const int value); 33 | private: 34 | uint16_t min_ticks; 35 | uint16_t max_ticks; 36 | uint8_t servoIndex; // index into the channel data for this servo 37 | }; 38 | -------------------------------------------------------------------------------- /Marlin/src/gcode/stats/M31.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | #include "../gcode.h" 24 | #include "../../core/serial.h" 25 | #include "../../module/printcounter.h" 26 | #include "../../libs/duration_t.h" 27 | #include "../../lcd/ultralcd.h" 28 | 29 | /** 30 | * M31: Get the time since the start of SD Print (or last M109) 31 | */ 32 | void GcodeSuite::M31() { 33 | char buffer[21]; 34 | duration_t elapsed = print_job_timer.duration(); 35 | elapsed.toString(buffer); 36 | ui.set_status(buffer); 37 | 38 | SERIAL_ECHO_START(); 39 | SERIAL_ECHOLNPAIR("Print time: ", buffer); 40 | } 41 | -------------------------------------------------------------------------------- /Marlin/src/module/planner_bezier.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | #pragma once 23 | 24 | /** 25 | * planner_bezier.h 26 | * 27 | * Compute and buffer movement commands for Bézier curves 28 | * 29 | */ 30 | 31 | #include 32 | #include "../core/macros.h" 33 | 34 | void cubic_b_spline( 35 | const float position[NUM_AXIS], // current position 36 | const float target[NUM_AXIS], // target position 37 | const float offset[4], // a pair of offsets 38 | float fr_mm_s, 39 | uint8_t extruder 40 | ); 41 | -------------------------------------------------------------------------------- /Marlin/src/pins/pins_GT2560_V3_MC2.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | /***************************************************************** 24 | * GT2560 V3.0 pin assignment (for Mecreator 2) 25 | *****************************************************************/ 26 | 27 | #define BOARD_NAME "GT2560 V3.0 (MC2)" 28 | 29 | #include "pins_GT2560_V3.h" 30 | 31 | #undef X_MIN_PIN 32 | #define X_MIN_PIN 22 33 | 34 | #undef X_MAX_PIN 35 | #define X_MAX_PIN 24 36 | 37 | #undef Y_MIN_PIN 38 | #define Y_MIN_PIN 26 39 | 40 | #undef Y_MAX_PIN 41 | #define Y_MAX_PIN 28 42 | -------------------------------------------------------------------------------- /Marlin/src/HAL/HAL_LINUX/watchdog.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | #ifdef __PLAT_LINUX__ 24 | 25 | #include "../../inc/MarlinConfig.h" 26 | 27 | #if ENABLED(USE_WATCHDOG) 28 | 29 | #include "watchdog.h" 30 | 31 | void watchdog_init(void) {} 32 | 33 | void HAL_clear_reset_source(void) {} 34 | 35 | uint8_t HAL_get_reset_source(void) { 36 | return RST_POWER_ON; 37 | } 38 | 39 | void watchdog_reset() {} 40 | 41 | #else 42 | void HAL_clear_reset_source(void) {} 43 | uint8_t HAL_get_reset_source(void) { return RST_POWER_ON; } 44 | #endif // USE_WATCHDOG 45 | 46 | #endif // __PLAT_LINUX__ 47 | -------------------------------------------------------------------------------- /Marlin/src/HAL/HAL_LPC1768/fast_pwm.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | #ifdef TARGET_LPC1768 24 | 25 | #include "../../inc/MarlinConfigPre.h" 26 | 27 | #if ENABLED(FAST_PWM_FAN) 28 | 29 | #include 30 | 31 | void set_pwm_frequency(const pin_t pin, int f_desired) { 32 | pwm_set_frequency(pin, f_desired); 33 | } 34 | 35 | void set_pwm_duty(const pin_t pin, const uint16_t v, const uint16_t v_size/*=255*/, const bool invert/*=false*/) { 36 | pwm_write_ratio(pin, invert ? 1.0f - (float)v / v_size : (float)v / v_size); 37 | } 38 | 39 | #endif // FAST_PWM_FAN 40 | #endif // TARGET_LPC1768 41 | -------------------------------------------------------------------------------- /Marlin/src/pins/pins_GT2560_V3_A20.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | /** 24 | * Geeetech A20M pin assignment 25 | */ 26 | 27 | #include "pins_GT2560_V3.h" 28 | 29 | #undef LCD_PINS_RS 30 | #undef LCD_PINS_ENABLE 31 | #undef LCD_PINS_D4 32 | #undef LCD_PINS_D7 33 | #define LCD_PINS_RS 5 34 | #define LCD_PINS_ENABLE 36 35 | #define LCD_PINS_D4 21 36 | #define LCD_PINS_D7 6 37 | 38 | #if ENABLED(NEWPANEL) 39 | #undef BTN_EN1 40 | #undef BTN_EN2 41 | #undef BTN_ENC 42 | #define BTN_EN1 16 43 | #define BTN_EN2 17 44 | #define BTN_ENC 19 45 | #endif 46 | -------------------------------------------------------------------------------- /Marlin/src/pins/pins_SAINSMART_2IN1.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | /** 24 | * Sainsmart 2-in-1 pin assignments 25 | */ 26 | 27 | #if HOTENDS > 2 || E_STEPPERS > 2 28 | #error "Sainsmart 2-in-1 supports up to 2 hotends / E-steppers. Comment out this line to continue." 29 | #endif 30 | 31 | #define BOARD_NAME "Sainsmart" 32 | 33 | // 34 | // Heaters / Fans 35 | // 36 | #define RAMPS_D10_PIN 9 // E 37 | #define RAMPS_D9_PIN 7 // F PART FAN in front of board next to Extruder heat 38 | // RAMPS_D8_PIN 8 // B 39 | #define MOSFET_D_PIN 10 // F / E 40 | 41 | #include "pins_RAMPS.h" 42 | -------------------------------------------------------------------------------- /Marlin/src/HAL/HAL_STM32/watchdog_STM32.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | #if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) 24 | 25 | #include "../../inc/MarlinConfig.h" 26 | 27 | #if ENABLED(USE_WATCHDOG) 28 | 29 | #include "watchdog_STM32.h" 30 | #include 31 | 32 | void watchdog_init() { IWatchdog.begin(4000000); } // 4 sec timeout 33 | 34 | void watchdog_reset() { 35 | IWatchdog.reload(); 36 | #if PIN_EXISTS(LED) 37 | TOGGLE(LED_PIN); // heartbeat indicator 38 | #endif 39 | } 40 | 41 | #endif // USE_WATCHDOG 42 | #endif // ARDUINO_ARCH_STM32 43 | -------------------------------------------------------------------------------- /Marlin/src/pins/pins_RAMPS_CREALITY.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | #if HOTENDS > 2 || E_STEPPERS > 2 24 | #error "Creality3D RAMPS supports only 2 hotends / E-steppers. Comment out this line to continue." 25 | #endif 26 | 27 | #define BOARD_NAME "Creality3D RAMPS" 28 | 29 | // 30 | // Heaters / Fans 31 | // 32 | 33 | // Power outputs EFBF or EFBE 34 | #define MOSFET_D_PIN 7 35 | 36 | #define FIL_RUNOUT_PIN 2 37 | 38 | #include "pins_RAMPS.h" 39 | 40 | #define EXP1_PIN 65 // A11 41 | #define EXP2_PIN 66 // A12 42 | #define EXP3_PIN 11 // SERVO0_PIN 43 | #define EXP4_PIN 12 // PS_ON_PIN 44 | -------------------------------------------------------------------------------- /Marlin/src/gcode/temperature/M105.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | #include "../gcode.h" 24 | #include "../../module/temperature.h" 25 | 26 | /** 27 | * M105: Read hot end and bed temperature 28 | */ 29 | void GcodeSuite::M105() { 30 | 31 | const int8_t target_extruder = get_target_extruder_from_command(); 32 | if (target_extruder < 0) return; 33 | 34 | #if HAS_TEMP_SENSOR 35 | SERIAL_ECHOPGM(MSG_OK); 36 | thermalManager.print_heater_states(target_extruder); 37 | #else // !HAS_TEMP_SENSOR 38 | SERIAL_ERROR_MSG(MSG_ERR_NO_THERMISTORS); 39 | #endif 40 | 41 | SERIAL_EOL(); 42 | } 43 | -------------------------------------------------------------------------------- /Marlin/src/feature/emergency_parser.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | /** 24 | * emergency_parser.cpp - Intercept special commands directly in the serial stream 25 | */ 26 | 27 | #include "../inc/MarlinConfigPre.h" 28 | 29 | #if ENABLED(EMERGENCY_PARSER) 30 | 31 | #include "emergency_parser.h" 32 | 33 | // Static data members 34 | bool EmergencyParser::killed_by_M112, // = false 35 | EmergencyParser::enabled; 36 | 37 | #if ENABLED(HOST_PROMPT_SUPPORT) 38 | uint8_t EmergencyParser::M876_reason; // = 0 39 | #endif 40 | 41 | // Global instance 42 | EmergencyParser emergency_parser; 43 | 44 | #endif // EMERGENCY_PARSER 45 | -------------------------------------------------------------------------------- /Marlin/src/HAL/HAL_LINUX/hardware/LinearAxis.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | #pragma once 23 | 24 | #include 25 | #include "Gpio.h" 26 | 27 | class LinearAxis: public Peripheral { 28 | public: 29 | LinearAxis(pin_type enable, pin_type dir, pin_type step, pin_type end_min, pin_type end_max); 30 | virtual ~LinearAxis(); 31 | void update(); 32 | void interrupt(GpioEvent ev); 33 | 34 | pin_type enable_pin; 35 | pin_type dir_pin; 36 | pin_type step_pin; 37 | pin_type min_pin; 38 | pin_type max_pin; 39 | 40 | int32_t position; 41 | int32_t min_position; 42 | int32_t max_position; 43 | uint64_t last_update; 44 | 45 | }; 46 | -------------------------------------------------------------------------------- /Marlin/src/gcode/sdcard/M34.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | #include "../../inc/MarlinConfig.h" 24 | 25 | #if BOTH(SDCARD_SORT_ALPHA, SDSORT_GCODE) 26 | 27 | #include "../gcode.h" 28 | #include "../../sd/cardreader.h" 29 | 30 | /** 31 | * M34: Set SD Card Sorting Options 32 | */ 33 | void GcodeSuite::M34() { 34 | if (parser.seen('S')) card.setSortOn(parser.value_bool()); 35 | if (parser.seenval('F')) { 36 | const int v = parser.value_long(); 37 | card.setSortFolders(v < 0 ? -1 : v > 0 ? 1 : 0); 38 | } 39 | //if (parser.seen('R')) card.setSortReverse(parser.value_bool()); 40 | } 41 | 42 | #endif // SDCARD_SORT_ALPHA && SDSORT_GCODE 43 | -------------------------------------------------------------------------------- /Marlin/src/sd/Sd2Card_sdio.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | #pragma once 23 | 24 | #include "../inc/MarlinConfig.h" 25 | 26 | #if ENABLED(SDIO_SUPPORT) 27 | 28 | bool SDIO_Init(void); 29 | bool SDIO_ReadBlock(uint32_t block, uint8_t *dst); 30 | bool SDIO_WriteBlock(uint32_t block, const uint8_t *src); 31 | 32 | class Sd2Card { 33 | public: 34 | bool init(uint8_t sckRateID = 0, uint8_t chipSelectPin = 0) { return SDIO_Init(); } 35 | bool readBlock(uint32_t block, uint8_t *dst) { return SDIO_ReadBlock(block, dst); } 36 | bool writeBlock(uint32_t block, const uint8_t *src) { return SDIO_WriteBlock(block, src); } 37 | }; 38 | 39 | #endif // SDIO_SUPPORT 40 | -------------------------------------------------------------------------------- /Marlin/src/gcode/lcd/M300.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | #include "../../inc/MarlinConfig.h" 24 | 25 | #if HAS_BUZZER 26 | 27 | #include "../gcode.h" 28 | 29 | #include "../../lcd/ultralcd.h" // i2c-based BUZZ 30 | #include "../../libs/buzzer.h" // Buzzer, if possible 31 | 32 | /** 33 | * M300: Play beep sound S P 34 | */ 35 | void GcodeSuite::M300() { 36 | uint16_t const frequency = parser.ushortval('S', 260); 37 | uint16_t duration = parser.ushortval('P', 1000); 38 | 39 | // Limits the tone duration to 0-5 seconds. 40 | NOMORE(duration, 5000U); 41 | 42 | BUZZ(duration, frequency); 43 | } 44 | 45 | #endif // HAS_BUZZER 46 | -------------------------------------------------------------------------------- /Marlin/src/gcode/probe/M401_M402.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | #include "../../inc/MarlinConfig.h" 24 | 25 | #if HAS_BED_PROBE 26 | 27 | #include "../gcode.h" 28 | #include "../../module/motion.h" 29 | #include "../../module/probe.h" 30 | 31 | /** 32 | * M401: Deploy and activate the Z probe 33 | */ 34 | void GcodeSuite::M401() { 35 | DEPLOY_PROBE(); 36 | report_current_position(); 37 | } 38 | 39 | /** 40 | * M402: Deactivate and stow the Z probe 41 | */ 42 | void GcodeSuite::M402() { 43 | STOW_PROBE(); 44 | #ifdef Z_AFTER_PROBING 45 | move_z_after_probing(); 46 | #endif 47 | report_current_position(); 48 | } 49 | 50 | #endif // HAS_BED_PROBE 51 | -------------------------------------------------------------------------------- /Marlin/src/feature/leds/blinkm.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | /** 24 | * blinkm.cpp - Control a BlinkM over i2c 25 | */ 26 | 27 | #include "../../inc/MarlinConfig.h" 28 | 29 | #if ENABLED(BLINKM) 30 | 31 | #include "blinkm.h" 32 | #include "leds.h" 33 | #include 34 | 35 | void blinkm_set_led_color(const LEDColor &color) { 36 | Wire.begin(); 37 | Wire.beginTransmission(I2C_ADDRESS(0x09)); 38 | Wire.write('o'); //to disable ongoing script, only needs to be used once 39 | Wire.write('n'); 40 | Wire.write(color.r); 41 | Wire.write(color.g); 42 | Wire.write(color.b); 43 | Wire.endTransmission(); 44 | } 45 | 46 | #endif // BLINKM 47 | -------------------------------------------------------------------------------- /Marlin/src/gcode/sdcard/M33.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | #include "../../inc/MarlinConfig.h" 24 | 25 | #if ENABLED(LONG_FILENAME_HOST_SUPPORT) 26 | 27 | #include "../gcode.h" 28 | #include "../../sd/cardreader.h" 29 | 30 | /** 31 | * M33: Get the long full path of a file or folder 32 | * 33 | * Parameters: 34 | * Case-insensitive DOS-style path to a file or folder 35 | * 36 | * Example: 37 | * M33 miscel~1/armchair/armcha~1.gco 38 | * 39 | * Output: 40 | * /Miscellaneous/Armchair/Armchair.gcode 41 | */ 42 | void GcodeSuite::M33() { 43 | 44 | card.printLongPath(parser.string_arg); 45 | 46 | } 47 | 48 | #endif // LONG_FILENAME_HOST_SUPPORT 49 | -------------------------------------------------------------------------------- /Marlin/src/HAL/HAL_ESP32/web.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | #ifdef ARDUINO_ARCH_ESP32 24 | 25 | #include "../../inc/MarlinConfigPre.h" 26 | 27 | #if ENABLED(WEBSUPPORT) 28 | 29 | #include "SPIFFS.h" 30 | #include "wifi.h" 31 | 32 | AsyncEventSource events("/events"); // event source (Server-Sent events) 33 | 34 | void onNotFound(AsyncWebServerRequest *request){ 35 | request->send(404); 36 | } 37 | 38 | void web_init() { 39 | server.addHandler(&events); // attach AsyncEventSource 40 | server.serveStatic("/", SPIFFS, "/www").setDefaultFile("index.html"); 41 | server.onNotFound(onNotFound); 42 | } 43 | 44 | #endif // WEBSUPPORT 45 | #endif // ARDUINO_ARCH_ESP32 46 | -------------------------------------------------------------------------------- /Marlin/src/gcode/host/M113.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | #include "../../inc/MarlinConfig.h" 24 | 25 | #if ENABLED(HOST_KEEPALIVE_FEATURE) 26 | 27 | #include "../gcode.h" 28 | 29 | /** 30 | * M113: Get or set Host Keepalive interval (0 to disable) 31 | * 32 | * S Optional. Set the keepalive interval. 33 | */ 34 | void GcodeSuite::M113() { 35 | if (parser.seenval('S')) { 36 | host_keepalive_interval = parser.value_byte(); 37 | NOMORE(host_keepalive_interval, 60); 38 | } 39 | else { 40 | SERIAL_ECHO_START(); 41 | SERIAL_ECHOLNPAIR("M113 S", (unsigned long)host_keepalive_interval); 42 | } 43 | } 44 | 45 | #endif // HOST_KEEPALIVE_FEATURE 46 | -------------------------------------------------------------------------------- /Marlin/src/lcd/dogm/fontdata/langdata_tr.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Generated automatically by buildroot/share/fonts/uxggenpages.sh 3 | * Contents will be REPLACED by future processing! 4 | * Use genallfont.sh to generate font data for updated languages. 5 | */ 6 | #include 7 | 8 | const u8g_fntpgm_uint8_t fontpage_2_159_159[33] U8G_FONT_SECTION("fontpage_2_159_159") = { 9 | 0x00,0x06,0x0c,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0x9f,0x9f,0x00,0x08,0xfe,0x00, 10 | 0x00,0x05,0x0a,0x0a,0x06,0x00,0xfe,0x88,0x70,0x00,0x70,0x88,0x88,0x88,0x78,0x08, 11 | 0x70}; 12 | const u8g_fntpgm_uint8_t fontpage_2_176_177[43] U8G_FONT_SECTION("fontpage_2_176_177") = { 13 | 0x00,0x06,0x0c,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xb0,0xb1,0x00,0x09,0x00,0x00, 14 | 0x00,0x03,0x09,0x09,0x06,0x01,0x00,0x40,0x00,0xe0,0x40,0x40,0x40,0x40,0x40,0xe0, 15 | 0x03,0x05,0x05,0x06,0x01,0x00,0xc0,0x40,0x40,0x40,0xe0}; 16 | const u8g_fntpgm_uint8_t fontpage_2_222_223[45] U8G_FONT_SECTION("fontpage_2_222_223") = { 17 | 0x00,0x06,0x0c,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xde,0xdf,0x00,0x07,0xfe,0x00, 18 | 0x00,0x05,0x09,0x09,0x06,0x00,0xfe,0x70,0x88,0x80,0x70,0x08,0x88,0x70,0x10,0x60, 19 | 0x05,0x07,0x07,0x06,0x00,0xfe,0x78,0x80,0x70,0x08,0xf0,0x10,0x60}; 20 | 21 | #define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } 22 | static const uxg_fontinfo_t g_fontinfo[] PROGMEM = { 23 | FONTDATA_ITEM(2, 159, 159, fontpage_2_159_159), // 'ğ' -- 'ğ' 24 | FONTDATA_ITEM(2, 176, 177, fontpage_2_176_177), // 'İ' -- 'ı' 25 | FONTDATA_ITEM(2, 222, 223, fontpage_2_222_223), // 'Ş' -- 'ş' 26 | }; 27 | -------------------------------------------------------------------------------- /Marlin/src/pins/pins_RAMPS_ENDER_4.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | #if HOTENDS > 1 || E_STEPPERS > 1 24 | #error "Ender-4 supports only 1 hotend / E-stepper. Comment out this line to continue." 25 | #endif 26 | 27 | #define BOARD_NAME "Ender-4" 28 | 29 | #include "pins_RAMPS.h" 30 | 31 | // The board only has one PWM fan connector. The others are 12V always-on. 32 | // The default config uses this pin to control the brightness of the LED 33 | // band (case light). Thus the hotend and controller fans are always-on. 34 | 35 | #if ENABLED(CASE_LIGHT_ENABLE) 36 | #undef FAN_PIN 37 | #ifndef CASE_LIGHT_PIN 38 | #define CASE_LIGHT_PIN RAMPS_D9_PIN 39 | #endif 40 | #endif 41 | -------------------------------------------------------------------------------- /Marlin/src/HAL/HAL_LINUX/hardware/Heater.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | #pragma once 23 | 24 | #include "Gpio.h" 25 | 26 | struct LowpassFilter { 27 | uint64_t data_delay = 0; 28 | uint16_t update(uint16_t value) { 29 | data_delay = data_delay - (data_delay >> 6) + value; 30 | return (uint16_t)(data_delay >> 6); 31 | } 32 | }; 33 | 34 | class Heater: public Peripheral { 35 | public: 36 | Heater(pin_t heater, pin_t adc); 37 | virtual ~Heater(); 38 | void interrupt(GpioEvent ev); 39 | void update(); 40 | 41 | pin_t heater_pin, adc_pin; 42 | uint16_t room_temp_raw; 43 | uint16_t heater_state; 44 | LowpassFilter pwmcap; 45 | double heat; 46 | uint64_t last; 47 | }; 48 | -------------------------------------------------------------------------------- /Marlin/src/HAL/HAL_LPC1768/include/SPI.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | #pragma once 24 | 25 | #include "../../shared/HAL_SPI.h" 26 | 27 | #include 28 | 29 | #define MSBFIRST 1 30 | #define SPI_MODE3 0 31 | 32 | class SPISettings { 33 | public: 34 | SPISettings(uint32_t speed, int, int) : spi_speed(speed) {}; 35 | uint32_t spiRate() { return spi_speed; } 36 | private: 37 | uint32_t spi_speed; 38 | }; 39 | 40 | class SPIClass { 41 | public: 42 | void begin(); 43 | void beginTransaction(SPISettings); 44 | void endTransaction() {}; 45 | uint8_t transfer(uint8_t data); 46 | uint16_t transfer16(uint16_t data); 47 | }; 48 | 49 | extern SPIClass SPI; 50 | -------------------------------------------------------------------------------- /Marlin/src/feature/closedloop.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | #include "../inc/MarlinConfig.h" 23 | 24 | #if ENABLED(EXTERNAL_CLOSED_LOOP_CONTROLLER) 25 | 26 | #if !PIN_EXISTS(CLOSED_LOOP_ENABLE) || !PIN_EXISTS(CLOSED_LOOP_MOVE_COMPLETE) 27 | #error "CLOSED_LOOP_ENABLE_PIN and CLOSED_LOOP_MOVE_COMPLETE_PIN are required for EXTERNAL_CLOSED_LOOP_CONTROLLER." 28 | #endif 29 | 30 | #include "closedloop.h" 31 | 32 | void init_closedloop() { 33 | OUT_WRITE(CLOSED_LOOP_ENABLE_PIN, LOW); 34 | SET_INPUT_PULLUP(CLOSED_LOOP_MOVE_COMPLETE_PIN); 35 | } 36 | 37 | void set_closedloop(const byte val) { 38 | OUT_WRITE(CLOSED_LOOP_ENABLE_PIN, val); 39 | } 40 | 41 | #endif // EXTERNAL_CLOSED_LOOP_CONTROLLER 42 | -------------------------------------------------------------------------------- /Marlin/src/gcode/motion/G4.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | #include "../gcode.h" 24 | #include "../../module/stepper.h" 25 | #include "../../lcd/ultralcd.h" 26 | 27 | /** 28 | * G4: Dwell S or P 29 | */ 30 | void GcodeSuite::G4() { 31 | millis_t dwell_ms = 0; 32 | 33 | if (parser.seenval('P')) dwell_ms = parser.value_millis(); // milliseconds to wait 34 | if (parser.seenval('S')) dwell_ms = parser.value_millis_from_seconds(); // seconds to wait 35 | 36 | planner.synchronize(); 37 | #if ENABLED(NANODLP_Z_SYNC) 38 | SERIAL_ECHOLNPGM(MSG_Z_MOVE_COMP); 39 | #endif 40 | 41 | if (!ui.has_status()) LCD_MESSAGEPGM(MSG_DWELL); 42 | 43 | dwell(dwell_ms); 44 | } 45 | -------------------------------------------------------------------------------- /Marlin/src/HAL/HAL_STM32F1/STM32F1_flag_script.py: -------------------------------------------------------------------------------- 1 | from __future__ import print_function 2 | import sys 3 | 4 | #dynamic build flags for generic compile options 5 | if __name__ == "__main__": 6 | args = " ".join([ "-std=gnu11", 7 | "-std=gnu++11", 8 | "-Os", 9 | "-mcpu=cortex-m3", 10 | "-mthumb", 11 | 12 | "-ffreestanding", 13 | "-fsigned-char", 14 | "-fno-move-loop-invariants", 15 | "-fno-strict-aliasing", 16 | 17 | "--specs=nano.specs", 18 | "--specs=nosys.specs", 19 | 20 | "-IMarlin/src/HAL/HAL_STM32F1", 21 | 22 | "-MMD", 23 | "-MP", 24 | "-DTARGET_STM32F1" 25 | ]) 26 | 27 | for i in range(1, len(sys.argv)): 28 | args += " " + sys.argv[i] 29 | 30 | print(args) 31 | 32 | # extra script for linker options 33 | else: 34 | from SCons.Script import DefaultEnvironment 35 | env = DefaultEnvironment() 36 | env.Append( 37 | ARFLAGS=["rcs"], 38 | 39 | ASFLAGS=["-x", "assembler-with-cpp"], 40 | 41 | CXXFLAGS=[ 42 | "-fabi-version=0", 43 | "-fno-use-cxa-atexit", 44 | "-fno-threadsafe-statics" 45 | ], 46 | LINKFLAGS=[ 47 | "-Os", 48 | "-mcpu=cortex-m3", 49 | "-ffreestanding", 50 | "-mthumb", 51 | "--specs=nano.specs", 52 | "--specs=nosys.specs", 53 | "-u_printf_float", 54 | ], 55 | ) 56 | -------------------------------------------------------------------------------- /Marlin/src/module/thermistor/thermistor_8.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Marlin 3D Printer Firmware 3 | * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] 4 | * 5 | * Based on Sprinter and grbl. 6 | * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | // R25 = 100 kOhm, beta25 = 3950 K, 10 kOhm pull-up, NTCS0603E3104FHT 24 | const short temptable_8[][2] PROGMEM = { 25 | { OV( 1), 704 }, 26 | { OV( 54), 216 }, 27 | { OV( 107), 175 }, 28 | { OV( 160), 152 }, 29 | { OV( 213), 137 }, 30 | { OV( 266), 125 }, 31 | { OV( 319), 115 }, 32 | { OV( 372), 106 }, 33 | { OV( 425), 99 }, 34 | { OV( 478), 91 }, 35 | { OV( 531), 85 }, 36 | { OV( 584), 78 }, 37 | { OV( 637), 71 }, 38 | { OV( 690), 65 }, 39 | { OV( 743), 58 }, 40 | { OV( 796), 50 }, 41 | { OV( 849), 42 }, 42 | { OV( 902), 31 }, 43 | { OV( 955), 17 }, 44 | { OV(1008), 0 } 45 | }; 46 | --------------------------------------------------------------------------------