Bump to head with endstop fixes
This commit is contained in:
+2
-2
@@ -17,8 +17,8 @@ cache:
|
||||
|
||||
env:
|
||||
- TEST_PLATFORM="megaatmega2560"
|
||||
- TEST_PLATFORM="LPC1768"
|
||||
- TEST_PLATFORM="DUE"
|
||||
- TEST_PLATFORM="LPC1768"
|
||||
- TEST_PLATFORM="STM32F1"
|
||||
- TEST_PLATFORM="teensy35"
|
||||
|
||||
@@ -49,4 +49,4 @@ before_script:
|
||||
- cat ${TRAVIS_BUILD_DIR}/Marlin/src/inc/_Version.h
|
||||
#
|
||||
script:
|
||||
- start_tests ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM}
|
||||
- run_tests ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM}
|
||||
|
||||
+44
-19
@@ -19,14 +19,15 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
// If you have a trex 3, stock is this option plus 2208 on all axis. None in spreadcycle.
|
||||
//#define TREX3
|
||||
|
||||
//#define X_2208
|
||||
//#define X_Spreadcycle
|
||||
//#define Y_2208 // Highly recommended as large prints with high mass can cause layer shifts with stealthchop at high speed
|
||||
//#define Y_Spreadcycle
|
||||
#define Y_2208 // Highly recommended as large prints with high mass can cause layer shifts with stealthchop at high speed
|
||||
#define Y_Spreadcycle
|
||||
//#define Z_2208 // NOT Recommended! Dual stepper current draw is above the recommended limit for this driver
|
||||
//#define Y_Spreadcycle
|
||||
//#define E_2208 // Not Recommended! Stealthchop mode faults with linear advance
|
||||
@@ -39,7 +40,7 @@
|
||||
/*
|
||||
* Enables a filament sensor plugged into the laser pin. Disables the laser
|
||||
*/
|
||||
//#define FilamentSensor // Standard older TM3D runout sensor
|
||||
#define FilamentSensor // Standard older TM3D runout sensor
|
||||
//#define lerdgeFilSensor // Newer inverted logic TM3D Runout Sensor
|
||||
|
||||
|
||||
@@ -70,8 +71,6 @@
|
||||
* Advanced settings can be found in Configuration_adv.h
|
||||
*
|
||||
*/
|
||||
#ifndef CONFIGURATION_H
|
||||
#define CONFIGURATION_H
|
||||
#define CONFIGURATION_H_VERSION 020000
|
||||
|
||||
//===========================================================================
|
||||
@@ -229,7 +228,6 @@
|
||||
#if ENABLED(SWITCHING_NOZZLE)
|
||||
#define SWITCHING_NOZZLE_SERVO_NR 0
|
||||
#define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
|
||||
//#define HOTEND_OFFSET_Z { 0.0, 0.0 }
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -243,7 +241,7 @@
|
||||
#define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
|
||||
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
|
||||
#define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
|
||||
#define PARKING_EXTRUDER_SECURITY_RAISE 5 // Z-raise before parking
|
||||
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -260,7 +258,6 @@
|
||||
#define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis
|
||||
#define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis
|
||||
#define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders
|
||||
#define SWITCHING_TOOLHEAD_SECURITY_RAISE 5 // (mm) Z-raise before parking
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -928,6 +925,7 @@
|
||||
//#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
|
||||
#endif
|
||||
//#define PROBING_FANS_OFF // Turn fans off when probing
|
||||
//#define PROBING_STEPPERS_OFF // Turn steppers off (unless needed to hold position) when probing
|
||||
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
|
||||
|
||||
// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
|
||||
@@ -948,8 +946,8 @@
|
||||
|
||||
// @section extruder
|
||||
|
||||
#define DISABLE_E false // For all extruders
|
||||
#define DISABLE_INACTIVE_EXTRUDER true // Keep only the active extruder enabled.
|
||||
#define DISABLE_E false // For all extruders
|
||||
#define DISABLE_INACTIVE_EXTRUDER // Keep only the active extruder enabled
|
||||
|
||||
// @section machine
|
||||
|
||||
@@ -1072,6 +1070,18 @@
|
||||
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
|
||||
#define FIL_RUNOUT_PIN 4
|
||||
#define FILAMENT_RUNOUT_SCRIPT "M600"
|
||||
|
||||
// After a runout is detected, continue printing this length of filament
|
||||
// before executing the runout script. Useful for a sensor at the end of
|
||||
// a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead.
|
||||
#define FILAMENT_RUNOUT_DISTANCE_MM 5
|
||||
|
||||
#ifdef FILAMENT_RUNOUT_DISTANCE_MM
|
||||
// Enable this option to use an encoder disc that toggles the runout pin
|
||||
// as the filament moves. (Be sure to set FILAMENT_RUNOUT_DISTANCE_MM
|
||||
// large enough to avoid false positives.)
|
||||
//#define FILAMENT_MOTION_SENSOR
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//===========================================================================
|
||||
@@ -1241,16 +1251,17 @@
|
||||
//#define LCD_BED_LEVELING
|
||||
|
||||
#if ENABLED(LCD_BED_LEVELING)
|
||||
#define MBL_Z_STEP 0.025 // Step size while manually probing Z axis.
|
||||
#define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
|
||||
#define MESH_EDIT_Z_STEP 0.025 // (mm) Step size while manually probing Z axis.
|
||||
#define LCD_PROBE_Z_RANGE 4 // (mm) Z Range centered on Z_MIN_POS for LCD Z adjustment
|
||||
//#define MESH_EDIT_MENU // Add a menu to edit mesh points
|
||||
#endif
|
||||
|
||||
// Add a menu item to move between bed corners for manual bed adjustment
|
||||
//#define LEVEL_BED_CORNERS
|
||||
#define LEVEL_BED_CORNERS
|
||||
|
||||
#if ENABLED(LEVEL_BED_CORNERS)
|
||||
#define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
|
||||
//#define LEVEL_CENTER_TOO // Move to the center after the last corner
|
||||
#define LEVEL_CENTER_TOO // Move to the center after the last corner
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -1529,10 +1540,10 @@
|
||||
*
|
||||
* Select the language to display on the LCD. These languages are available:
|
||||
*
|
||||
* en, an, bg, ca, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
|
||||
* jp-kana, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
|
||||
* en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
|
||||
* jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
|
||||
*
|
||||
* :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
|
||||
* :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
|
||||
*/
|
||||
#define LCD_LANGUAGE en
|
||||
|
||||
@@ -1560,6 +1571,13 @@
|
||||
*/
|
||||
#define DISPLAY_CHARSET_HD44780 JAPANESE
|
||||
|
||||
/**
|
||||
* Info Screen Style (0:Classic, 1:Prusa)
|
||||
*
|
||||
* :[0:'Classic', 1:'Prusa']
|
||||
*/
|
||||
#define LCD_INFO_SCREEN_STYLE 0
|
||||
|
||||
/**
|
||||
* SD CARD
|
||||
*
|
||||
@@ -1924,6 +1942,15 @@
|
||||
//
|
||||
//#define SILVER_GATE_GLCD_CONTROLLER
|
||||
|
||||
//
|
||||
// Extensible UI
|
||||
//
|
||||
// Enable third-party or vendor customized user interfaces that aren't
|
||||
// packaged with Marlin. Source code for the user interface will need to
|
||||
// be placed in "src/lcd/extensible_ui/lib"
|
||||
//
|
||||
//#define EXTENSIBLE_UI
|
||||
|
||||
//=============================================================================
|
||||
//============================ Other Controllers ============================
|
||||
//=============================================================================
|
||||
@@ -2080,5 +2107,3 @@
|
||||
|
||||
// Allow servo angle to be edited and saved to EEPROM
|
||||
//#define EDITABLE_SERVO_ANGLES
|
||||
|
||||
#endif // CONFIGURATION_H
|
||||
|
||||
+137
-30
@@ -19,6 +19,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* Configuration_adv.h
|
||||
@@ -30,8 +31,6 @@
|
||||
* Basic settings can be found in Configuration.h
|
||||
*
|
||||
*/
|
||||
#ifndef CONFIGURATION_ADV_H
|
||||
#define CONFIGURATION_ADV_H
|
||||
#define CONFIGURATION_ADV_H_VERSION 020000
|
||||
|
||||
// @section temperature
|
||||
@@ -176,8 +175,8 @@
|
||||
#if ENABLED(EXTRUDER_RUNOUT_PREVENT)
|
||||
#define EXTRUDER_RUNOUT_MINTEMP 190
|
||||
#define EXTRUDER_RUNOUT_SECONDS 30
|
||||
#define EXTRUDER_RUNOUT_SPEED 1500 // mm/m
|
||||
#define EXTRUDER_RUNOUT_EXTRUDE 5 // mm
|
||||
#define EXTRUDER_RUNOUT_SPEED 1500 // (mm/m)
|
||||
#define EXTRUDER_RUNOUT_EXTRUDE 5 // (mm)
|
||||
#endif
|
||||
|
||||
// @section temperature
|
||||
@@ -245,7 +244,7 @@
|
||||
#define E5_AUTO_FAN_PIN -1
|
||||
#define CHAMBER_AUTO_FAN_PIN -1
|
||||
#define EXTRUDER_AUTO_FAN_TEMPERATURE 50
|
||||
#define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed
|
||||
#define EXTRUDER_AUTO_FAN_SPEED 255 // 255 == full speed
|
||||
|
||||
/**
|
||||
* Part-Cooling Fan Multiplexer
|
||||
@@ -409,6 +408,27 @@
|
||||
// Enable this if X or Y can't home without homing the other axis first.
|
||||
//#define CODEPENDENT_XY_HOMING
|
||||
|
||||
/**
|
||||
* Z Steppers Auto-Alignment
|
||||
* Add the G34 command to align multiple Z steppers using a bed probe.
|
||||
*/
|
||||
//#define Z_STEPPER_AUTO_ALIGN
|
||||
#if ENABLED(Z_STEPPER_AUTO_ALIGN)
|
||||
// Define probe X and Y positions for Z1, Z2 [, Z3]
|
||||
#define Z_STEPPER_ALIGN_X { 10, 150, 290 }
|
||||
#define Z_STEPPER_ALIGN_Y { 290, 10, 290 }
|
||||
// Set number of iterations to align
|
||||
#define Z_STEPPER_ALIGN_ITERATIONS 3
|
||||
// Enable to restore leveling setup after operation
|
||||
#define RESTORE_LEVELING_AFTER_G34
|
||||
// Use the amplification factor to de-/increase correction step.
|
||||
// In case the stepper (spindle) position is further out than the test point
|
||||
// Use a value > 1. NOTE: This may cause instability
|
||||
#define Z_STEPPER_ALIGN_AMP 1.0
|
||||
// Stop criterion. If the accuracy is better than this stop iterating early
|
||||
#define Z_STEPPER_ALIGN_ACC 0.02
|
||||
#endif
|
||||
|
||||
// @section machine
|
||||
|
||||
#define AXIS_RELATIVE_MODES {false, false, false, false}
|
||||
@@ -460,7 +480,7 @@
|
||||
// Minimum planner junction speed. Sets the default minimum speed the planner plans for at the end
|
||||
// of the buffer and all stops. This should not be much greater than zero and should only be changed
|
||||
// if unwanted behavior is observed on a user's machine when running at very slow speeds.
|
||||
#define MINIMUM_PLANNER_SPEED 0.05 // (mm/sec)
|
||||
#define MINIMUM_PLANNER_SPEED 0.05 // (mm/s)
|
||||
|
||||
//
|
||||
// Use Junction Deviation instead of traditional Jerk Limiting
|
||||
@@ -478,6 +498,17 @@
|
||||
*/
|
||||
//#define ADAPTIVE_STEP_SMOOTHING
|
||||
|
||||
/**
|
||||
* Custom Microstepping
|
||||
* Override as-needed for your setup. Up to 3 MS pins are supported.
|
||||
*/
|
||||
//#define MICROSTEP1 LOW,LOW,LOW
|
||||
//#define MICROSTEP2 HIGH,LOW,LOW
|
||||
//#define MICROSTEP4 LOW,HIGH,LOW
|
||||
//#define MICROSTEP8 HIGH,HIGH,LOW
|
||||
//#define MICROSTEP16 LOW,LOW,HIGH
|
||||
//#define MICROSTEP32 HIGH,LOW,HIGH
|
||||
|
||||
// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
|
||||
#define MICROSTEP_MODES { 16, 16, 16, 16, 16, 16 } // [1,2,4,8,16]
|
||||
|
||||
@@ -531,15 +562,15 @@
|
||||
//=============================Additional Features===========================
|
||||
//===========================================================================
|
||||
|
||||
#define ENCODER_RATE_MULTIPLIER // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
|
||||
#define ENCODER_10X_STEPS_PER_SEC 75 // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value
|
||||
#define ENCODER_100X_STEPS_PER_SEC 160 // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value
|
||||
|
||||
//#define CHDK 4 //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
|
||||
#define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
|
||||
|
||||
// @section lcd
|
||||
|
||||
// Change values more rapidly when the encoder is rotated faster
|
||||
#define ENCODER_RATE_MULTIPLIER
|
||||
#if ENABLED(ENCODER_RATE_MULTIPLIER)
|
||||
#define ENCODER_10X_STEPS_PER_SEC 30 // (steps/s) Encoder rate for 10x speed
|
||||
#define ENCODER_100X_STEPS_PER_SEC 80 // (steps/s) Encoder rate for 100x speed
|
||||
#endif
|
||||
|
||||
// Include a page of printer information in the LCD Main Menu
|
||||
#define LCD_INFO_MENU
|
||||
|
||||
@@ -679,6 +710,43 @@
|
||||
*/
|
||||
#define AUTO_REPORT_SD_STATUS
|
||||
|
||||
/**
|
||||
* Support for USB thumb drives using an Arduino USB Host Shield or
|
||||
* equivalent MAX3421E breakout board. The USB thumb drive will appear
|
||||
* to Marlin as an SD card.
|
||||
*
|
||||
* The MAX3421E must be assigned the same pins as the SD card reader, with
|
||||
* the following pin mapping:
|
||||
*
|
||||
* SCLK, MOSI, MISO --> SCLK, MOSI, MISO
|
||||
* INT --> SD_DETECT_PIN
|
||||
* SS --> SDSS
|
||||
*/
|
||||
//#define USB_FLASH_DRIVE_SUPPORT
|
||||
#if ENABLED(USB_FLASH_DRIVE_SUPPORT)
|
||||
#define USB_CS_PIN SDSS
|
||||
#define USB_INTR_PIN SD_DETECT_PIN
|
||||
#endif
|
||||
|
||||
/**
|
||||
* When using a bootloader that supports SD-Firmware-Flashing,
|
||||
* add a menu item to activate SD-FW-Update on the next reboot.
|
||||
*
|
||||
* Requires ATMEGA2560 (Arduino Mega)
|
||||
*
|
||||
* Tested with this bootloader:
|
||||
* https://github.com/FleetProbe/MicroBridge-Arduino-ATMega2560
|
||||
*/
|
||||
//#define SD_FIRMWARE_UPDATE
|
||||
#if ENABLED(SD_FIRMWARE_UPDATE)
|
||||
#define SD_FIRMWARE_UPDATE_EEPROM_ADDR 0x1FF
|
||||
#define SD_FIRMWARE_UPDATE_ACTIVE_VALUE 0xF0
|
||||
#define SD_FIRMWARE_UPDATE_INACTIVE_VALUE 0xFF
|
||||
#endif
|
||||
|
||||
// Add an optimized binary file transfer mode, initiated with 'M28 B1'
|
||||
//#define FAST_FILE_TRANSFER
|
||||
|
||||
#endif // SDSUPPORT
|
||||
|
||||
/**
|
||||
@@ -693,7 +761,7 @@
|
||||
* controller events, as there is a trade-off between reliable
|
||||
* printing performance versus fast display updates.
|
||||
*/
|
||||
#if ENABLED(DOGLCD)
|
||||
#if HAS_GRAPHICAL_LCD
|
||||
// Show SD percentage next to the progress bar
|
||||
//#define DOGM_SD_PERCENT
|
||||
|
||||
@@ -985,6 +1053,15 @@
|
||||
|
||||
// @section extras
|
||||
|
||||
/**
|
||||
* Extra Fan Speed
|
||||
* Adds a secondary fan speed for each print-cooling fan.
|
||||
* 'M106 P<fan> T3-255' : Set a secondary speed for <fan>
|
||||
* 'M106 P<fan> T2' : Use the set secondary speed
|
||||
* 'M106 P<fan> T1' : Restore the previous fan speed
|
||||
*/
|
||||
//#define EXTRA_FAN_SPEED
|
||||
|
||||
/**
|
||||
* Firmware-based and LCD-controlled retract
|
||||
*
|
||||
@@ -1000,7 +1077,7 @@
|
||||
* Note that M207 / M208 / M209 settings are saved to EEPROM.
|
||||
*
|
||||
*/
|
||||
#define FWRETRACT // ONLY PARTIALLY TESTED
|
||||
#define FWRETRACT
|
||||
#if ENABLED(FWRETRACT)
|
||||
#define FWRETRACT_AUTORETRACT // costs ~500 bytes of PROGMEM
|
||||
#if ENABLED(FWRETRACT_AUTORETRACT)
|
||||
@@ -1015,16 +1092,11 @@
|
||||
#define RETRACT_RECOVER_LENGTH_SWAP 0 // Default additional swap recover length (mm, added to retract length when recovering from extruder change)
|
||||
#define RETRACT_RECOVER_FEEDRATE 8 // Default feedrate for recovering from retraction (mm/s)
|
||||
#define RETRACT_RECOVER_FEEDRATE_SWAP 8 // Default feedrate for recovering from swap retraction (mm/s)
|
||||
#if ENABLED(MIXING_EXTRUDER)
|
||||
//#define RETRACT_SYNC_MIXING // Retract and restore all mixing steppers simultaneously
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Extra Fan Speed
|
||||
* Adds a secondary fan speed for each print-cooling fan.
|
||||
* 'M106 P<fan> T3-255' : Set a secondary speed for <fan>
|
||||
* 'M106 P<fan> T2' : Use the set secondary speed
|
||||
* 'M106 P<fan> T1' : Restore the previous fan speed
|
||||
*/
|
||||
//#define EXTRA_FAN_SPEED
|
||||
/**
|
||||
* Universal tool change settings.
|
||||
* Applies to all types of extruders except where explicitly noted.
|
||||
@@ -1032,14 +1104,16 @@
|
||||
#if EXTRUDERS > 1
|
||||
// Z raise distance for tool-change, as needed for some extruders
|
||||
#define TOOLCHANGE_ZRAISE 1 // (mm)
|
||||
// Retract and prime filament on tool-change
|
||||
|
||||
// Retract and prime filament on tool-change
|
||||
#define TOOLCHANGE_FILAMENT_SWAP
|
||||
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
|
||||
#define TOOLCHANGE_FIL_SWAP_LENGTH 4 // (mm)
|
||||
#define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3000 // (mm/m)
|
||||
#define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3000 // (mm/m)
|
||||
#endif
|
||||
/**
|
||||
|
||||
/**
|
||||
* Position to park head during tool change.
|
||||
* Doesn't apply to SWITCHING_TOOLHEAD, DUAL_X_CARRIAGE, or PARKING_EXTRUDER
|
||||
*/
|
||||
@@ -1050,7 +1124,6 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* Advanced Pause
|
||||
* Experimental feature for filament change support and for parking the nozzle when paused.
|
||||
@@ -1077,7 +1150,7 @@
|
||||
// 0 to disable start loading and skip to fast load only
|
||||
#define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 30 // (mm/s) Load filament feedrate. This can be pretty fast.
|
||||
#define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
|
||||
#define FILAMENT_CHANGE_FAST_LOAD_LENGTH 50 // (mm) Load length of filament, from extruder gear to nozzle.
|
||||
#define FILAMENT_CHANGE_FAST_LOAD_LENGTH 50 // (mm) Load length of filament, from extruder gear to nozzle.
|
||||
// For Bowden, the full length of the tube and nozzle.
|
||||
// For direct drive, the full length of the nozzle.
|
||||
//#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
|
||||
@@ -1453,6 +1526,15 @@
|
||||
|
||||
// @section extras
|
||||
|
||||
/**
|
||||
* Canon Hack Development Kit
|
||||
* http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
|
||||
*/
|
||||
//#define CHDK_PIN 4 // Set and enable a pin for triggering CHDK to take a picture
|
||||
#if PIN_EXISTS(CHDK)
|
||||
#define CHDK_DELAY 50 // (ms) How long the pin should remain HIGH
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Spindle & Laser control
|
||||
*
|
||||
@@ -1563,7 +1645,7 @@
|
||||
/**
|
||||
* Include capabilities in M115 output
|
||||
*/
|
||||
//#define EXTENDED_CAPABILITIES_REPORT
|
||||
#define EXTENDED_CAPABILITIES_REPORT
|
||||
|
||||
/**
|
||||
* Disable all Volumetric extrusion options
|
||||
@@ -1604,6 +1686,33 @@
|
||||
*/
|
||||
#define FASTER_GCODE_PARSER
|
||||
|
||||
/**
|
||||
* CNC G-code options
|
||||
* Support CNC-style G-code dialects used by laser cutters, drawing machine cams, etc.
|
||||
* Note that G0 feedrates should be used with care for 3D printing (if used at all).
|
||||
* High feedrates may cause ringing and harm print quality.
|
||||
*/
|
||||
//#define PAREN_COMMENTS // Support for parentheses-delimited comments
|
||||
//#define GCODE_MOTION_MODES // Remember the motion mode (G0 G1 G2 G3 G5 G38.X) and apply for X Y Z E F, etc.
|
||||
|
||||
// Enable and set a (default) feedrate for all G0 moves
|
||||
//#define G0_FEEDRATE 3000 // (mm/m)
|
||||
#ifdef G0_FEEDRATE
|
||||
//#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode
|
||||
#endif
|
||||
|
||||
/**
|
||||
* G-code Macros
|
||||
*
|
||||
* Add G-codes M810-M819 to define and run G-code macros.
|
||||
* Macros are not saved to EEPROM.
|
||||
*/
|
||||
//#define GCODE_MACROS
|
||||
#if ENABLED(GCODE_MACROS)
|
||||
#define GCODE_MACROS_SLOTS 5 // Up to 10 may be used
|
||||
#define GCODE_MACROS_SLOT_SIZE 50 // Maximum length of a single macro
|
||||
#endif
|
||||
|
||||
/**
|
||||
* User-defined menu items that execute custom GCode
|
||||
*/
|
||||
@@ -1785,5 +1894,3 @@
|
||||
|
||||
// Enable Marlin dev mode which adds some special commands
|
||||
//#define MARLIN_DEV_MODE
|
||||
|
||||
#endif // CONFIGURATION_ADV_H
|
||||
|
||||
@@ -16,9 +16,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef _HAL_AVR_H_
|
||||
#define _HAL_AVR_H_
|
||||
#pragma once
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// Includes
|
||||
@@ -374,5 +372,3 @@ inline void HAL_adc_init(void) {
|
||||
|
||||
// AVR compatibility
|
||||
#define strtof strtod
|
||||
|
||||
#endif // _HAL_AVR_H_
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* MarlinSerial.h - Hardware serial library for Wiring
|
||||
@@ -30,9 +31,6 @@
|
||||
* Templatized 01 October 2018 by Eduardo José Tagle to allow multiple instances
|
||||
*/
|
||||
|
||||
#ifndef _MARLINSERIAL_H_
|
||||
#define _MARLINSERIAL_H_
|
||||
|
||||
#include "../shared/MarlinSerial.h"
|
||||
|
||||
#include <WString.h>
|
||||
@@ -281,5 +279,3 @@
|
||||
#if defined(USBCON) && ENABLED(BLUETOOTH)
|
||||
extern HardwareSerial bluetoothSerial;
|
||||
#endif
|
||||
|
||||
#endif // _MARLINSERIAL_H_
|
||||
|
||||
@@ -19,9 +19,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SANITYCHECK_AVR_8_BIT_H_
|
||||
#define _SANITYCHECK_AVR_8_BIT_H_
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* Test AVR specific configuration values for errors at compile-time.
|
||||
@@ -116,5 +114,3 @@
|
||||
|| defined(E4_HARDWARE_SERIAL) )
|
||||
#error "Select hardware UART for TMC2208 to use both TMC2208 and ENDSTOP_INTERRUPTS_FEATURE."
|
||||
#endif
|
||||
|
||||
#endif // _SANITYCHECK_AVR_8_BIT_H_
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* ServoTimers.h - Interrupt driven Servo library for Arduino using 16 bit timers- Version 2
|
||||
@@ -39,9 +40,6 @@
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef _SERVOTIMERS_H_
|
||||
#define _SERVOTIMERS_H_
|
||||
|
||||
/**
|
||||
* Defines for 16 bit timers used with Servo library
|
||||
*
|
||||
@@ -91,5 +89,3 @@ typedef enum {
|
||||
#endif
|
||||
_Nbr_16timers
|
||||
} timer16_Sequence_t;
|
||||
|
||||
#endif // _SERVOTIMERS_H_
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* Endstop Interrupts
|
||||
@@ -35,9 +36,6 @@
|
||||
* (Located in Marlin/buildroot/share/pin_interrupt_test/pin_interrupt_test.ino)
|
||||
*/
|
||||
|
||||
#ifndef _ENDSTOP_INTERRUPTS_H_
|
||||
#define _ENDSTOP_INTERRUPTS_H_
|
||||
|
||||
#include "../../core/macros.h"
|
||||
#include <stdint.h>
|
||||
#include "../../module/endstops.h"
|
||||
@@ -256,5 +254,3 @@ void setup_endstop_interrupts( void ) {
|
||||
|
||||
// If we arrive here without raising an assertion, each pin has either an EXT-interrupt or a PCI.
|
||||
}
|
||||
|
||||
#endif // _ENDSTOP_INTERRUPTS_H_
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* Pin mapping for the 1280 and 2560
|
||||
@@ -28,9 +29,6 @@
|
||||
* Logical Pin : 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx
|
||||
*/
|
||||
|
||||
#ifndef _FASTIO_1280_H_
|
||||
#define _FASTIO_1280_H_
|
||||
|
||||
#include "fastio_AVR.h"
|
||||
|
||||
// change for your board
|
||||
@@ -1111,5 +1109,3 @@
|
||||
#define PL7_WPORT PORTL
|
||||
#define PL7_DDR DDRL
|
||||
#define PL7_PWM NULL
|
||||
|
||||
#endif // _FASTIO_1280_H_
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* Pin mapping for the 1281 and 2561
|
||||
@@ -27,9 +28,6 @@
|
||||
* Port: A0 A1 A2 A3 A4 A5 A6 A7 B0 B1 B2 B3 B4 B5 B6 B7 C0 C1 C2 C3 C4 C5 C6 C7 D0 D1 D2 D3 D4 D5 D6 D7 E0 E1 E2 E3 E4 E5 E6 E7 F0 F1 F2 F3 F4 F5 F6 F7 G0 G1 G2 G3 G4 G5
|
||||
*/
|
||||
|
||||
#ifndef _FASTIO_1281_H_
|
||||
#define _FASTIO_1281_H_
|
||||
|
||||
#include "fastio_AVR.h"
|
||||
|
||||
// change for your board
|
||||
@@ -715,5 +713,3 @@
|
||||
#define PG5_WPORT PORTG
|
||||
#define PG5_DDR DDRG
|
||||
#define PG5_PWM &OCR0B
|
||||
|
||||
#endif // _FASTIO_1281_H_
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* Pin mapping for the 168, 328, and 328P
|
||||
@@ -27,9 +28,6 @@
|
||||
* Port: B0 B1 B2 B3 B4 B5 C0 C1 C2 C3 C4 C5 C6 C7 D0 D1 D2 D3 D4 D5 D6 D7
|
||||
*/
|
||||
|
||||
#ifndef _FASTIO_168_H_
|
||||
#define _FASTIO_168_H_
|
||||
|
||||
#include "fastio_AVR.h"
|
||||
|
||||
#define DEBUG_LED AIO5
|
||||
@@ -357,5 +355,3 @@
|
||||
#define PD7_WPORT PORTD
|
||||
#define PD7_DDR DDRD
|
||||
#define PD7_PWM NULL
|
||||
|
||||
#endif // _FASTIO_168_H_
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* Pin mapping for the 644, 644p, 644pa, and 1284p
|
||||
@@ -53,9 +54,6 @@
|
||||
* +--------+
|
||||
*/
|
||||
|
||||
#ifndef _FASTIO_644_H_
|
||||
#define _FASTIO_644_H_
|
||||
|
||||
#include "fastio_AVR.h"
|
||||
|
||||
#define DEBUG_LED DIO0
|
||||
@@ -552,5 +550,3 @@
|
||||
#define PD7_WPORT PORTD
|
||||
#define PD7_DDR DDRD
|
||||
#define PD7_PWM OCR2A
|
||||
|
||||
#endif // _FASTIO_644_H_
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* Pin mapping (Teensy) for AT90USB646, 647, 1286, and 1287
|
||||
@@ -28,9 +29,6 @@
|
||||
* The logical pins 46 and 47 are not supported by Teensyduino, but are supported below as E2 and E3
|
||||
*/
|
||||
|
||||
#ifndef _FASTIO_AT90USB_H_
|
||||
#define _FASTIO_AT90USB_H_
|
||||
|
||||
#include "fastio_AVR.h"
|
||||
|
||||
// change for your board
|
||||
@@ -697,5 +695,3 @@
|
||||
#define TIMER3A 5
|
||||
#define TIMER3B 4
|
||||
#define TIMER3C 3
|
||||
|
||||
#endif // _FASTIO_AT90USB_H_
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* Fast I/O Routines for AVR
|
||||
@@ -26,9 +27,6 @@
|
||||
* Contributed by Triffid_Hunter and modified by Kliment, thinkyhead, Bob-the-Kuhn, et.al.
|
||||
*/
|
||||
|
||||
#ifndef _FASTIO_ARDUINO_H_
|
||||
#define _FASTIO_ARDUINO_H_
|
||||
|
||||
#include <avr/io.h>
|
||||
#include "../../core/macros.h"
|
||||
|
||||
@@ -312,5 +310,3 @@ enum ClockSource2 : char {
|
||||
|
||||
// finally - the macro that tells us if a pin is an available hardware PWM
|
||||
#define USEABLE_HARDWARE_PWM(p) (PWM_PINS(p) && !PWM_CHK(p))
|
||||
|
||||
#endif // _FASTIO_ARDUINO_H_
|
||||
|
||||
@@ -19,9 +19,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _MATH_AVR_H_
|
||||
#define _MATH_AVR_H_
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* Optimized math functions for AVR
|
||||
@@ -38,9 +36,9 @@
|
||||
// D C B A is longIn2
|
||||
//
|
||||
static FORCE_INLINE uint16_t MultiU24X32toH16(uint32_t longIn1, uint32_t longIn2) {
|
||||
register uint8_t tmp1;
|
||||
register uint8_t tmp2;
|
||||
register uint16_t intRes;
|
||||
uint8_t tmp1;
|
||||
uint8_t tmp2;
|
||||
uint16_t intRes;
|
||||
__asm__ __volatile__(
|
||||
A("clr %[tmp1]")
|
||||
A("mul %A[longIn1], %B[longIn2]")
|
||||
@@ -92,8 +90,8 @@ static FORCE_INLINE uint16_t MultiU24X32toH16(uint32_t longIn1, uint32_t longIn2
|
||||
// r26 to store 0
|
||||
// r27 to store the byte 1 of the 24 bit result
|
||||
static FORCE_INLINE uint16_t MultiU16X8toH16(uint8_t charIn1, uint16_t intIn2) {
|
||||
register uint8_t tmp;
|
||||
register uint16_t intRes;
|
||||
uint8_t tmp;
|
||||
uint16_t intRes;
|
||||
__asm__ __volatile__ (
|
||||
A("clr %[tmp]")
|
||||
A("mul %[charIn1], %B[intIn2]")
|
||||
@@ -113,5 +111,3 @@ static FORCE_INLINE uint16_t MultiU16X8toH16(uint8_t charIn1, uint16_t intIn2) {
|
||||
);
|
||||
return intRes;
|
||||
}
|
||||
|
||||
#endif // _MATH_AVR_H_
|
||||
|
||||
@@ -19,14 +19,12 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* PWM print routines for Atmel 8 bit AVR CPUs
|
||||
*/
|
||||
|
||||
#ifndef _PINSDEBUG_AVR_8_BIT_
|
||||
#define _PINSDEBUG_AVR_8_BIT_
|
||||
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
|
||||
#define NUMBER_PINS_TOTAL NUM_DIGITAL_PINS
|
||||
@@ -406,5 +404,3 @@ static void pwm_details(uint8_t pin) {
|
||||
#endif
|
||||
|
||||
#define PRINT_PIN(p) do {sprintf_P(buffer, PSTR("%3d "), p); SERIAL_ECHO(buffer);} while (0)
|
||||
|
||||
#endif // _PINSDEBUG_AVR_8_BIT_
|
||||
|
||||
@@ -19,9 +19,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _PINSDEBUG_TEENSYSUINO_H_
|
||||
#define _PINSDEBUG_TEENSYSUINO_H_
|
||||
#pragma once
|
||||
|
||||
//
|
||||
// some of the pin mapping functions of the Teensduino extension to the Arduino IDE
|
||||
@@ -111,5 +109,3 @@ const uint8_t PROGMEM digital_pin_to_port_PGM[] = {
|
||||
// disable the PWMs so we can use it as is
|
||||
|
||||
// portModeRegister(pin) is OK
|
||||
|
||||
#endif // _PINSDEBUG_TEENSYSUINO_H_
|
||||
|
||||
@@ -20,14 +20,12 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* Structures for 2560 family boards that use more than 70 pins
|
||||
*/
|
||||
|
||||
#ifndef _PINSDEBUG_PLUS_70_H_
|
||||
#define _PINSDEBUG_PLUS_70_H_
|
||||
|
||||
#undef NUM_DIGITAL_PINS
|
||||
#if MB(BQ_ZUM_MEGA_3D)
|
||||
#define NUM_DIGITAL_PINS 85
|
||||
@@ -336,6 +334,3 @@ const uint8_t PROGMEM digital_pin_to_timer_PGM_plus_70[] = {
|
||||
* PCINT14 J5 76
|
||||
* PCINT15 J6 77
|
||||
*/
|
||||
|
||||
|
||||
#endif // _PINSDEBUG_PLUS_70_H_
|
||||
|
||||
@@ -19,9 +19,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SPI_PINS_H_
|
||||
#define _SPI_PINS_H_
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* Define SPI Pins: SCK, MISO, MOSI, SS
|
||||
@@ -65,6 +63,3 @@
|
||||
#ifndef SS_PIN
|
||||
#define SS_PIN AVR_SS_PIN
|
||||
#endif
|
||||
|
||||
|
||||
#endif // _SPI_PINS_H_
|
||||
|
||||
@@ -19,9 +19,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _WATCHDOG_AVR_H_
|
||||
#define _WATCHDOG_AVR_H_
|
||||
#pragma once
|
||||
|
||||
#include <avr/wdt.h>
|
||||
|
||||
@@ -31,5 +29,3 @@ void watchdog_init();
|
||||
// Reset watchdog. MUST be called at least every 4 seconds after the
|
||||
// first watchdog_init or AVR will go into emergency procedures.
|
||||
inline void watchdog_reset() { wdt_reset(); }
|
||||
|
||||
#endif // _WATCHDOG_AVR_H_
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* Description: HAL for Arduino Due and compatible (SAM3X8E)
|
||||
@@ -26,9 +27,6 @@
|
||||
* For ARDUINO_ARCH_SAM
|
||||
*/
|
||||
|
||||
#ifndef _HAL_DUE_H
|
||||
#define _HAL_DUE_H
|
||||
|
||||
#define CPU_32_BIT
|
||||
|
||||
#include <stdint.h>
|
||||
@@ -189,5 +187,3 @@ char *dtostrf (double __val, signed char __width, unsigned char __prec, char *__
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // _HAL_DUE_H
|
||||
|
||||
@@ -78,11 +78,11 @@
|
||||
|
||||
// run at ~8 .. ~10Mhz - Tx version (Rx data discarded)
|
||||
static uint8_t spiTransferTx0(uint8_t bout) { // using Mode 0
|
||||
register uint32_t MOSI_PORT_PLUS30 = ((uint32_t) PORT(MOSI_PIN)) + 0x30; /* SODR of port */
|
||||
register uint32_t MOSI_MASK = PIN_MASK(MOSI_PIN);
|
||||
register uint32_t SCK_PORT_PLUS30 = ((uint32_t) PORT(SCK_PIN)) + 0x30; /* SODR of port */
|
||||
register uint32_t SCK_MASK = PIN_MASK(SCK_PIN);
|
||||
register uint32_t idx = 0;
|
||||
uint32_t MOSI_PORT_PLUS30 = ((uint32_t) PORT(MOSI_PIN)) + 0x30; /* SODR of port */
|
||||
uint32_t MOSI_MASK = PIN_MASK(MOSI_PIN);
|
||||
uint32_t SCK_PORT_PLUS30 = ((uint32_t) PORT(SCK_PIN)) + 0x30; /* SODR of port */
|
||||
uint32_t SCK_MASK = PIN_MASK(SCK_PIN);
|
||||
uint32_t idx = 0;
|
||||
|
||||
/* Negate bout, as the assembler requires a negated value */
|
||||
bout = ~bout;
|
||||
@@ -161,11 +161,11 @@
|
||||
|
||||
// run at ~8 .. ~10Mhz - Rx version (Tx line not altered)
|
||||
static uint8_t spiTransferRx0(uint8_t bout) { // using Mode 0
|
||||
register uint32_t bin = 0;
|
||||
register uint32_t work = 0;
|
||||
register uint32_t BITBAND_MISO_PORT = BITBAND_ADDRESS( ((uint32_t)PORT(MISO_PIN))+0x3C, PIN_SHIFT(MISO_PIN)); /* PDSR of port in bitband area */
|
||||
register uint32_t SCK_PORT_PLUS30 = ((uint32_t) PORT(SCK_PIN)) + 0x30; /* SODR of port */
|
||||
register uint32_t SCK_MASK = PIN_MASK(SCK_PIN);
|
||||
uint32_t bin = 0;
|
||||
uint32_t work = 0;
|
||||
uint32_t BITBAND_MISO_PORT = BITBAND_ADDRESS( ((uint32_t)PORT(MISO_PIN))+0x3C, PIN_SHIFT(MISO_PIN)); /* PDSR of port in bitband area */
|
||||
uint32_t SCK_PORT_PLUS30 = ((uint32_t) PORT(SCK_PIN)) + 0x30; /* SODR of port */
|
||||
uint32_t SCK_MASK = PIN_MASK(SCK_PIN);
|
||||
UNUSED(bout);
|
||||
|
||||
/* The software SPI routine */
|
||||
@@ -281,12 +281,12 @@
|
||||
|
||||
// Block transfers run at ~8 .. ~10Mhz - Tx version (Rx data discarded)
|
||||
static void spiTxBlock0(const uint8_t* ptr, uint32_t todo) {
|
||||
register uint32_t MOSI_PORT_PLUS30 = ((uint32_t) PORT(MOSI_PIN)) + 0x30; /* SODR of port */
|
||||
register uint32_t MOSI_MASK = PIN_MASK(MOSI_PIN);
|
||||
register uint32_t SCK_PORT_PLUS30 = ((uint32_t) PORT(SCK_PIN)) + 0x30; /* SODR of port */
|
||||
register uint32_t SCK_MASK = PIN_MASK(SCK_PIN);
|
||||
register uint32_t work = 0;
|
||||
register uint32_t txval = 0;
|
||||
uint32_t MOSI_PORT_PLUS30 = ((uint32_t) PORT(MOSI_PIN)) + 0x30; /* SODR of port */
|
||||
uint32_t MOSI_MASK = PIN_MASK(MOSI_PIN);
|
||||
uint32_t SCK_PORT_PLUS30 = ((uint32_t) PORT(SCK_PIN)) + 0x30; /* SODR of port */
|
||||
uint32_t SCK_MASK = PIN_MASK(SCK_PIN);
|
||||
uint32_t work = 0;
|
||||
uint32_t txval = 0;
|
||||
|
||||
/* The software SPI routine */
|
||||
__asm__ __volatile__(
|
||||
@@ -360,11 +360,11 @@
|
||||
}
|
||||
|
||||
static void spiRxBlock0(uint8_t* ptr, uint32_t todo) {
|
||||
register uint32_t bin = 0;
|
||||
register uint32_t work = 0;
|
||||
register uint32_t BITBAND_MISO_PORT = BITBAND_ADDRESS( ((uint32_t)PORT(MISO_PIN))+0x3C, PIN_SHIFT(MISO_PIN)); /* PDSR of port in bitband area */
|
||||
register uint32_t SCK_PORT_PLUS30 = ((uint32_t) PORT(SCK_PIN)) + 0x30; /* SODR of port */
|
||||
register uint32_t SCK_MASK = PIN_MASK(SCK_PIN);
|
||||
uint32_t bin = 0;
|
||||
uint32_t work = 0;
|
||||
uint32_t BITBAND_MISO_PORT = BITBAND_ADDRESS( ((uint32_t)PORT(MISO_PIN))+0x3C, PIN_SHIFT(MISO_PIN)); /* PDSR of port in bitband area */
|
||||
uint32_t SCK_PORT_PLUS30 = ((uint32_t) PORT(SCK_PIN)) + 0x30; /* SODR of port */
|
||||
uint32_t SCK_MASK = PIN_MASK(SCK_PIN);
|
||||
|
||||
/* The software SPI routine */
|
||||
__asm__ __volatile__(
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* HAL for Arduino Due and compatible (SAM3X8E)
|
||||
@@ -25,9 +26,6 @@
|
||||
* For ARDUINO_ARCH_SAM
|
||||
*/
|
||||
|
||||
#ifndef _HAL_TIMERS_DUE_H
|
||||
#define _HAL_TIMERS_DUE_H
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// Includes
|
||||
// --------------------------------------------------------------------------
|
||||
@@ -120,5 +118,3 @@ FORCE_INLINE static void HAL_timer_isr_prologue(const uint8_t timer_num) {
|
||||
}
|
||||
|
||||
#define HAL_timer_isr_epilogue(TIMER_NUM)
|
||||
|
||||
#endif // _HAL_TIMERS_DUE_H
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* InterruptVectors_Due.h
|
||||
@@ -35,11 +36,6 @@
|
||||
* Copyright (c) 2017 Eduardo José Tagle. All right reserved
|
||||
*/
|
||||
|
||||
#ifndef INTERRUPTVECTORS_DUE_H
|
||||
#define INTERRUPTVECTORS_DUE_H
|
||||
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
|
||||
#ifdef ARDUINO_ARCH_SAM
|
||||
|
||||
// ISR handler type
|
||||
@@ -49,4 +45,3 @@ typedef void (*pfnISR_Handler)(void);
|
||||
pfnISR_Handler install_isr(IRQn_Type irq, pfnISR_Handler newHandler);
|
||||
|
||||
#endif // ARDUINO_ARCH_SAM
|
||||
#endif // INTERRUPTVECTORS_DUE_H
|
||||
|
||||
@@ -19,15 +19,13 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* MarlinSerialUSB_Due.h - Hardware Serial over USB (CDC) library for Arduino DUE
|
||||
* Copyright (c) 2017 Eduardo José Tagle. All right reserved
|
||||
*/
|
||||
|
||||
#ifndef MARLINSERIALUSB_DUE_H
|
||||
#define MARLINSERIALUSB_DUE_H
|
||||
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
|
||||
#if SERIAL_PORT == -1
|
||||
@@ -92,4 +90,3 @@ private:
|
||||
extern MarlinSerialUSB customizedSerial1;
|
||||
|
||||
#endif // SERIAL_PORT == -1
|
||||
#endif // MARLINSERIAL_DUE_H
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* Endstop Interrupts
|
||||
@@ -34,9 +35,6 @@
|
||||
* (Located in Marlin/buildroot/share/pin_interrupt_test/pin_interrupt_test.ino)
|
||||
*/
|
||||
|
||||
#ifndef _ENDSTOP_INTERRUPTS_H_
|
||||
#define _ENDSTOP_INTERRUPTS_H_
|
||||
|
||||
#include "../../module/endstops.h"
|
||||
|
||||
// One ISR for all EXT-Interrupts
|
||||
@@ -82,5 +80,3 @@ void setup_endstop_interrupts(void) {
|
||||
attachInterrupt(digitalPinToInterrupt(Z_MIN_PROBE_PIN), endstop_ISR, CHANGE);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif //_ENDSTOP_INTERRUPTS_H_
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* Fast I/O Routines for SAM3X8E
|
||||
@@ -36,9 +37,6 @@
|
||||
* leads to less efficient compiled code!!
|
||||
*/
|
||||
|
||||
#ifndef _FASTIO_DUE_H
|
||||
#define _FASTIO_DUE_H
|
||||
|
||||
#include <pins_arduino.h>
|
||||
|
||||
/**
|
||||
@@ -495,5 +493,3 @@
|
||||
#define DIO100_PIN 11
|
||||
#define DIO100_WPORT PIOC
|
||||
#endif
|
||||
|
||||
#endif // _FASTIO_DUE_H
|
||||
|
||||
@@ -19,9 +19,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef SPI_PINS_H_
|
||||
#define SPI_PINS_H_
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* Define SPI Pins: SCK, MISO, MOSI, SS
|
||||
@@ -61,5 +59,3 @@
|
||||
|
||||
/* A.28, A.29, B.21, C.26, C.29 */
|
||||
#define SS_PIN SDSS
|
||||
|
||||
#endif /* SPI_PINS_H_ */
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
|
||||
#include "../../inc/MarlinConfigPre.h"
|
||||
|
||||
#if ENABLED(DOGLCD)
|
||||
#if HAS_GRAPHICAL_LCD
|
||||
|
||||
#include <U8glib.h>
|
||||
|
||||
@@ -156,6 +156,6 @@ uint8_t u8g_com_HAL_DUE_shared_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_va
|
||||
return 1;
|
||||
}
|
||||
|
||||
#endif // DOGLCD
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
#endif //__SAM3X8E__
|
||||
#endif //__SAM3X8E__
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
|
||||
#include "../../inc/MarlinConfigPre.h"
|
||||
|
||||
#if ENABLED(DOGLCD)
|
||||
#if HAS_GRAPHICAL_LCD
|
||||
|
||||
#include <U8glib.h>
|
||||
#include <Arduino.h>
|
||||
@@ -180,6 +180,6 @@ uint8_t u8g_com_HAL_DUE_ST7920_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_va
|
||||
return 1;
|
||||
}
|
||||
|
||||
#endif // DOGLCD
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
#endif // ARDUINO_ARCH_SAM
|
||||
|
||||
@@ -40,15 +40,12 @@
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
/*
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
|
||||
*/
|
||||
|
||||
#ifndef ARDUINO_DUE_X_H_INCLUDED
|
||||
#define ARDUINO_DUE_X_H_INCLUDED
|
||||
|
||||
/* ------------------------------------------------------------------------ */
|
||||
|
||||
/**
|
||||
* \page arduino_due_x_opfreq "Arduino Due/X - Operating frequencies"
|
||||
* This page lists several definition related to the board operating frequency
|
||||
@@ -98,6 +95,3 @@
|
||||
/*! Active level of the USB_VBOF output pin. */
|
||||
#define USB_VBOF_ACTIVE_LEVEL LOW
|
||||
/* ------------------------------------------------------------------------ */
|
||||
|
||||
|
||||
#endif /* ARDUINO_DUE_X_H_INCLUDED */
|
||||
|
||||
@@ -19,9 +19,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef WATCHDOG_DUE_H
|
||||
#define WATCHDOG_DUE_H
|
||||
#pragma once
|
||||
|
||||
// Arduino Due core now has watchdog support
|
||||
|
||||
@@ -33,5 +31,3 @@ void watchdog_init();
|
||||
// Reset watchdog. MUST be called at least every 4 seconds after the
|
||||
// first watchdog_init or AVR will go into emergency procedures.
|
||||
inline void watchdog_reset() { watchdogReset(); }
|
||||
|
||||
#endif // WATCHDOG_DUE_H
|
||||
|
||||
@@ -16,14 +16,12 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* Description: HAL for Espressif ESP32 WiFi
|
||||
*/
|
||||
|
||||
#ifndef _HAL_ESP32_H
|
||||
#define _HAL_ESP32_H
|
||||
|
||||
#define CPU_32_BIT
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
@@ -123,5 +121,3 @@ void HAL_adc_start_conversion (uint8_t adc_pin);
|
||||
#define HAL_INIT 1
|
||||
void HAL_idletask(void);
|
||||
void HAL_init(void);
|
||||
|
||||
#endif // _HAL_ESP32_H
|
||||
|
||||
@@ -19,9 +19,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _HAL_TIMERS_ESP32_H
|
||||
#define _HAL_TIMERS_ESP32_H
|
||||
#pragma once
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// Includes
|
||||
@@ -104,5 +102,3 @@ bool HAL_timer_interrupt_enabled(const uint8_t timer_num);
|
||||
|
||||
#define HAL_timer_isr_prologue(TIMER_NUM)
|
||||
#define HAL_timer_isr_epilogue(TIMER_NUM)
|
||||
|
||||
#endif // _HAL_TIMERS_ESP32_H
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* Endstop Interrupts
|
||||
@@ -34,9 +35,6 @@
|
||||
* (Located in Marlin/buildroot/share/pin_interrupt_test/pin_interrupt_test.ino)
|
||||
*/
|
||||
|
||||
#ifndef _ENDSTOP_INTERRUPTS_H_
|
||||
#define _ENDSTOP_INTERRUPTS_H_
|
||||
|
||||
#include "../../module/endstops.h"
|
||||
|
||||
// One ISR for all EXT-Interrupts
|
||||
@@ -77,5 +75,3 @@ void setup_endstop_interrupts(void) {
|
||||
attachInterrupt(digitalPinToInterrupt(Z_MIN_PROBE_PIN), endstop_ISR, CHANGE);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif //_ENDSTOP_INTERRUPTS_H_
|
||||
|
||||
@@ -19,9 +19,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _FASTIO_ESP32_H
|
||||
#define _FASTIO_ESP32_H
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* Utility functions
|
||||
@@ -64,9 +62,3 @@
|
||||
// TWI (I2C)
|
||||
#define SCL 5
|
||||
#define SDA 4
|
||||
|
||||
//
|
||||
// pins
|
||||
//
|
||||
|
||||
#endif // _FASTIO_ESP32_H
|
||||
|
||||
@@ -16,11 +16,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef _HAL_OTA_H
|
||||
#define _HAL_OTA_H
|
||||
#pragma once
|
||||
|
||||
void OTA_init();
|
||||
void OTA_handle();
|
||||
|
||||
#endif
|
||||
|
||||
@@ -16,13 +16,9 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef SPI_PINS_H_
|
||||
#define SPI_PINS_H_
|
||||
#pragma once
|
||||
|
||||
#define SS_PIN 5
|
||||
#define SCK_PIN 18
|
||||
#define MISO_PIN 19
|
||||
#define MOSI_PIN 23
|
||||
|
||||
#endif // SPI_PINS_H_
|
||||
|
||||
@@ -19,14 +19,10 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef WATCHDOG_ESP32_H
|
||||
#define WATCHDOG_ESP32_H
|
||||
#pragma once
|
||||
|
||||
// Initialize watchdog with a 4 second interrupt time
|
||||
void watchdog_init();
|
||||
|
||||
// Reset watchdog.
|
||||
inline void watchdog_reset() {};
|
||||
|
||||
#endif // WATCHDOG_ESP32_H
|
||||
inline void watchdog_reset() { }
|
||||
|
||||
@@ -19,15 +19,13 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* HAL_LPC1768/HAL.h
|
||||
* Hardware Abstraction Layer for NXP LPC1768
|
||||
*/
|
||||
|
||||
#ifndef _HAL_LPC1768_H_
|
||||
#define _HAL_LPC1768_H_
|
||||
|
||||
#define CPU_32_BIT
|
||||
#define HAL_INIT
|
||||
|
||||
@@ -156,5 +154,3 @@ int16_t PARSED_PIN_INDEX(const char code, const int16_t dval);
|
||||
|
||||
#define HAL_IDLETASK 1
|
||||
void HAL_idletask(void);
|
||||
|
||||
#endif // _HAL_LPC1768_H_
|
||||
|
||||
@@ -18,15 +18,13 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
*
|
||||
* HAL For LPC1768
|
||||
*/
|
||||
|
||||
#ifndef _HAL_TIMERS_H
|
||||
#define _HAL_TIMERS_H
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// Includes
|
||||
// --------------------------------------------------------------------------
|
||||
@@ -166,5 +164,3 @@ FORCE_INLINE static void HAL_timer_isr_prologue(const uint8_t timer_num) {
|
||||
}
|
||||
|
||||
#define HAL_timer_isr_epilogue(TIMER_NUM)
|
||||
|
||||
#endif // _HAL_TIMERS_H
|
||||
|
||||
@@ -19,9 +19,8 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#ifndef MARLINSERIAL_H
|
||||
#define MARLINSERIAL_H
|
||||
#include <HardwareSerial.h>
|
||||
#include <WString.h>
|
||||
|
||||
@@ -33,7 +32,6 @@
|
||||
#ifndef SERIAL_PORT
|
||||
#define SERIAL_PORT 0
|
||||
#endif
|
||||
|
||||
#ifndef RX_BUFFER_SIZE
|
||||
#define RX_BUFFER_SIZE 128
|
||||
#endif
|
||||
@@ -67,5 +65,3 @@ extern MarlinSerial MSerial;
|
||||
extern MarlinSerial MSerial1;
|
||||
extern MarlinSerial MSerial2;
|
||||
extern MarlinSerial MSerial3;
|
||||
|
||||
#endif // MARLINSERIAL_H
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* Based on "servo.h - Interrupt driven Servo library for Arduino using 16 bit timers -
|
||||
@@ -47,12 +48,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef SERVO_PRIVATE_H
|
||||
#define SERVO_PRIVATE_H
|
||||
|
||||
#include <Servo.h>
|
||||
|
||||
class MarlinServo: public Servo {
|
||||
class MarlinServo: public Servo {
|
||||
public:
|
||||
void move(const int value) {
|
||||
constexpr uint16_t servo_delay[] = SERVO_DELAY;
|
||||
@@ -70,5 +68,3 @@ class MarlinServo: public Servo {
|
||||
};
|
||||
|
||||
#define HAL_SERVO_LIB MarlinServo
|
||||
|
||||
#endif // SERVO_PRIVATE_H
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* Endstop Interrupts
|
||||
@@ -34,9 +35,6 @@
|
||||
* (Located in Marlin/buildroot/share/pin_interrupt_test/pin_interrupt_test.ino)
|
||||
*/
|
||||
|
||||
#ifndef _ENDSTOP_INTERRUPTS_H_
|
||||
#define _ENDSTOP_INTERRUPTS_H_
|
||||
|
||||
#include "../../module/endstops.h"
|
||||
|
||||
// One ISR for all EXT-Interrupts
|
||||
@@ -92,9 +90,15 @@ void setup_endstop_interrupts(void) {
|
||||
attachInterrupt(digitalPinToInterrupt(Z2_MIN_PIN), endstop_ISR, CHANGE);
|
||||
#endif
|
||||
#if HAS_Z3_MAX
|
||||
#if !LPC1768_PIN_INTERRUPT_M(Z3_MIN_PIN)
|
||||
#error "Z3_MIN_PIN is not an INTERRUPT capable pin."
|
||||
#endif
|
||||
attachInterrupt(digitalPinToInterrupt(Z3_MAX_PIN), endstop_ISR, CHANGE);
|
||||
#endif
|
||||
#if HAS_Z3_MIN
|
||||
#if !LPC1768_PIN_INTERRUPT_M(Z3_MIN_PIN)
|
||||
#error "Z3_MIN_PIN is not an INTERRUPT capable pin."
|
||||
#endif
|
||||
attachInterrupt(digitalPinToInterrupt(Z3_MIN_PIN), endstop_ISR, CHANGE);
|
||||
#endif
|
||||
#if HAS_Z_MIN_PROBE_PIN
|
||||
@@ -104,5 +108,3 @@ void setup_endstop_interrupts(void) {
|
||||
attachInterrupt(digitalPinToInterrupt(Z_MIN_PROBE_PIN), endstop_ISR, CHANGE);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif //_ENDSTOP_INTERRUPTS_H_
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* Fast I/O Routines for LPC1768/9
|
||||
@@ -32,9 +33,6 @@
|
||||
* For TARGET LPC1768
|
||||
*/
|
||||
|
||||
#ifndef _FASTIO_LPC1768_H
|
||||
#define _FASTIO_LPC1768_H
|
||||
|
||||
#include <Arduino.h>
|
||||
|
||||
#define USEABLE_HARDWARE_PWM(pin) TRUE // all pins are PWM capable
|
||||
@@ -123,5 +121,3 @@
|
||||
|
||||
// Shorthand
|
||||
#define OUT_WRITE(IO,V) do{ SET_OUTPUT(IO); WRITE(IO,V); }while(0)
|
||||
|
||||
#endif // _FASTIO_LPC1768_H
|
||||
|
||||
@@ -19,13 +19,11 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
// adapted from I2C/master/master.c example
|
||||
// https://www-users.cs.york.ac.uk/~pcc/MCP/HAPR-Course-web/CMSIS/examples/html/master_8c_source.html
|
||||
|
||||
#ifndef _DIGIPOT_MCP4451_I2C_ROUTINES_H_
|
||||
#define _DIGIPOT_MCP4451_I2C_ROUTINES_H_
|
||||
|
||||
#define USEDI2CDEV_M 1 // use I2C1 controller
|
||||
|
||||
#if USEDI2CDEV_M == 0
|
||||
@@ -53,5 +51,3 @@ uint8_t digipot_mcp4451_send_byte(uint8_t data);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // _DIGIPOT_MCP4451_I2C_ROUTINES_H_
|
||||
|
||||
@@ -19,13 +19,11 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef SPI_PINS_LPC1768_H
|
||||
#define SPI_PINS_LPC1768_H
|
||||
#pragma once
|
||||
|
||||
#include "src/core/macros.h"
|
||||
|
||||
#if ENABLED(SDSUPPORT) && ENABLED(DOGLCD) && (LCD_PINS_D4 == SCK_PIN || LCD_PINS_ENABLE == MOSI_PIN || DOGLCD_SCK == SCK_PIN || DOGLCD_MOSI == MOSI_PIN)
|
||||
#if ENABLED(SDSUPPORT) && HAS_GRAPHICAL_LCD && (LCD_PINS_D4 == SCK_PIN || LCD_PINS_ENABLE == MOSI_PIN || DOGLCD_SCK == SCK_PIN || DOGLCD_MOSI == MOSI_PIN)
|
||||
#define LPC_SOFTWARE_SPI // If the SD card and LCD adapter share the same SPI pins, then software SPI is currently
|
||||
// needed due to the speed and mode requred for communicating with each device being different.
|
||||
// This requirement can be removed if the SPI access to these devices is updated to use
|
||||
@@ -54,5 +52,3 @@
|
||||
#undef SDSS
|
||||
#define SDSS SS_PIN
|
||||
#endif
|
||||
|
||||
#endif // SPI_PINS_LPC1768_H
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
|
||||
#include "../../../inc/MarlinConfigPre.h"
|
||||
|
||||
#if ENABLED(DOGLCD)
|
||||
#if HAS_GRAPHICAL_LCD
|
||||
|
||||
//#include <inttypes.h>
|
||||
#include <U8glib.h>
|
||||
@@ -132,6 +132,6 @@ uint8_t u8g_com_HAL_LPC1768_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val,
|
||||
return 1;
|
||||
}
|
||||
|
||||
#endif // DOGLCD
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
#endif // TARGET_LPC1768
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
|
||||
#include "../../../inc/MarlinConfigPre.h"
|
||||
|
||||
#if ENABLED(DOGLCD)
|
||||
#if HAS_GRAPHICAL_LCD
|
||||
|
||||
#include <U8glib.h>
|
||||
|
||||
@@ -156,7 +156,7 @@ uint8_t u8g_com_HAL_LPC1768_ssd_hw_i2c_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_v
|
||||
return 0;
|
||||
}
|
||||
|
||||
register uint8_t *ptr = (uint8_t *)arg_ptr;
|
||||
uint8_t *ptr = (uint8_t *)arg_ptr;
|
||||
while (arg_val > 0) {
|
||||
if (u8g_i2c_send_byte(*ptr++) == 0) {
|
||||
u8g_i2c_stop();
|
||||
@@ -175,7 +175,7 @@ uint8_t u8g_com_HAL_LPC1768_ssd_hw_i2c_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_v
|
||||
return 0;
|
||||
}
|
||||
|
||||
register uint8_t *ptr = (uint8_t *)arg_ptr;
|
||||
uint8_t *ptr = (uint8_t *)arg_ptr;
|
||||
while (arg_val > 0) {
|
||||
if (u8g_i2c_send_byte(u8g_pgm_read(ptr)) == 0)
|
||||
return 0;
|
||||
@@ -198,6 +198,6 @@ uint8_t u8g_com_HAL_LPC1768_ssd_hw_i2c_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_v
|
||||
return 1;
|
||||
}
|
||||
|
||||
#endif // DOGLCD
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
#endif // TARGET_LPC1768
|
||||
|
||||
+4
-4
@@ -63,7 +63,7 @@
|
||||
|
||||
#include "../../inc/MarlinConfigPre.h"
|
||||
|
||||
#if ENABLED(DOGLCD)
|
||||
#if HAS_GRAPHICAL_LCD
|
||||
|
||||
#include <U8glib.h>
|
||||
|
||||
@@ -214,7 +214,7 @@ uint8_t u8g_com_HAL_LPC1768_ssd_sw_i2c_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_v
|
||||
if (u8g_com_ssd_I2C_start_sequence_sw(u8g) == 0)
|
||||
return u8g_i2c_stop_sw(), 0;
|
||||
|
||||
register uint8_t *ptr = (uint8_t *)arg_ptr;
|
||||
uint8_t *ptr = (uint8_t *)arg_ptr;
|
||||
while (arg_val > 0) {
|
||||
if (u8g_i2c_send_byte_sw(*ptr++) == 0)
|
||||
return u8g_i2c_stop_sw(), 0;
|
||||
@@ -229,7 +229,7 @@ uint8_t u8g_com_HAL_LPC1768_ssd_sw_i2c_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_v
|
||||
if (u8g_com_ssd_I2C_start_sequence_sw(u8g) == 0)
|
||||
return u8g_i2c_stop_sw(), 0;
|
||||
|
||||
register uint8_t *ptr = (uint8_t *)arg_ptr;
|
||||
uint8_t *ptr = (uint8_t *)arg_ptr;
|
||||
while (arg_val > 0) {
|
||||
if (u8g_i2c_send_byte_sw(u8g_pgm_read(ptr)) == 0) return 0;
|
||||
ptr++;
|
||||
@@ -249,6 +249,6 @@ uint8_t u8g_com_HAL_LPC1768_ssd_sw_i2c_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_v
|
||||
return 1;
|
||||
}
|
||||
|
||||
#endif // DOGLCD
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
#endif // TARGET_LPC1768
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
|
||||
#include "../../../inc/MarlinConfigPre.h"
|
||||
|
||||
#if ENABLED(DOGLCD)
|
||||
#if HAS_GRAPHICAL_LCD
|
||||
|
||||
//#include <inttypes.h>
|
||||
#include <U8glib.h>
|
||||
@@ -148,6 +148,6 @@ uint8_t u8g_com_HAL_LPC1768_ST7920_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t ar
|
||||
return 1;
|
||||
}
|
||||
|
||||
#endif // DOGLCD
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
#endif // TARGET_LPC1768
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
|
||||
#include "../../../inc/MarlinConfigPre.h"
|
||||
|
||||
#if ENABLED(DOGLCD)
|
||||
#if HAS_GRAPHICAL_LCD
|
||||
|
||||
#include <U8glib.h>
|
||||
#include "SoftwareSPI.h"
|
||||
@@ -151,6 +151,6 @@ uint8_t u8g_com_HAL_LPC1768_ST7920_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t ar
|
||||
return 1;
|
||||
}
|
||||
|
||||
#endif // DOGLCD
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
#endif // TARGET_LPC1768
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
|
||||
#include "../../../inc/MarlinConfigPre.h"
|
||||
|
||||
#if ENABLED(DOGLCD)
|
||||
#if HAS_GRAPHICAL_LCD
|
||||
|
||||
#include <U8glib.h>
|
||||
#include "SoftwareSPI.h"
|
||||
@@ -125,6 +125,6 @@ uint8_t u8g_com_HAL_LPC1768_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val,
|
||||
return 1;
|
||||
}
|
||||
|
||||
#endif // DOGLCD
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
#endif // TARGET_LPC1768
|
||||
|
||||
@@ -19,9 +19,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef WATCHDOG_LPC1768_H
|
||||
#define WATCHDOG_LPC1768_H
|
||||
#pragma once
|
||||
|
||||
#define RST_POWER_ON 1
|
||||
#define RST_EXTERNAL 2
|
||||
@@ -34,5 +32,3 @@ void watchdog_init(void);
|
||||
void watchdog_reset(void);
|
||||
void HAL_clear_reset_source(void);
|
||||
uint8_t HAL_get_reset_source(void);
|
||||
|
||||
#endif /* WATCHDOG_H */
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include "HAL.h"
|
||||
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
#include "../shared/Delay.h"
|
||||
|
||||
#if ENABLED(EEPROM_EMULATED_WITH_SRAM)
|
||||
#if STM32F7xx
|
||||
@@ -80,10 +81,21 @@ uint16_t HAL_adc_result;
|
||||
// HAL initialization task
|
||||
void HAL_init(void) {
|
||||
|
||||
// Needed for DELAY_NS() / DELAY_US() on CORTEX-M7
|
||||
#if (defined(__arm__) || defined(__thumb__)) && __CORTEX_M == 7
|
||||
enableCycleCounter();
|
||||
#endif
|
||||
|
||||
FastIO_init();
|
||||
|
||||
#if ENABLED(SDSUPPORT)
|
||||
OUT_WRITE(SDSS, HIGH); // Try to set SDSS inactive before any other SPI users start up
|
||||
#endif
|
||||
|
||||
#if PIN_EXISTS(LED)
|
||||
OUT_WRITE(LED_PIN, LOW);
|
||||
#endif
|
||||
|
||||
#if ENABLED(EEPROM_EMULATED_WITH_SRAM)
|
||||
// Enable access to backup SRAM
|
||||
__HAL_RCC_PWR_CLK_ENABLE();
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
#pragma once
|
||||
|
||||
#define CPU_32_BIT
|
||||
#undef DEBUG_NONE
|
||||
|
||||
#ifndef vsnprintf_P
|
||||
#define vsnprintf_P vsnprintf
|
||||
|
||||
@@ -26,11 +26,7 @@
|
||||
// Includes
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
#include "HAL.h"
|
||||
#include "../shared/HAL_SPI.h"
|
||||
#include "pins_arduino.h"
|
||||
#include "spi_pins.h"
|
||||
#include "../../core/macros.h"
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
|
||||
#include <SPI.h>
|
||||
|
||||
|
||||
@@ -66,11 +66,11 @@ stm32f4_timer_t TimerHandle[NUM_HARDWARE_TIMERS];
|
||||
// Public functions
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
bool timers_initialised[NUM_HARDWARE_TIMERS] = {false};
|
||||
bool timers_initialized[NUM_HARDWARE_TIMERS] = { false };
|
||||
|
||||
void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency) {
|
||||
|
||||
if (!timers_initialised[timer_num]) {
|
||||
if (!timers_initialized[timer_num]) {
|
||||
uint32_t step_prescaler = STEPPER_TIMER_PRESCALE - 1,
|
||||
temp_prescaler = TEMP_TIMER_PRESCALE - 1;
|
||||
switch (timer_num) {
|
||||
@@ -90,7 +90,7 @@ void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency) {
|
||||
HAL_NVIC_SetPriority(TEMP_TIMER_IRQ_NAME, TEMP_TIMER_IRQ_PRIO, 0);
|
||||
break;
|
||||
}
|
||||
timers_initialised[timer_num] = true;
|
||||
timers_initialized[timer_num] = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
* Copyright (C) 2017 Victor Perez
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#ifdef ARDUINO_ARCH_STM32
|
||||
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
|
||||
GPIO_TypeDef* FastIOPortMap[LastPort + 1];
|
||||
|
||||
void FastIO_init() {
|
||||
for (uint8_t i = 0; i < NUM_DIGITAL_PINS; i++)
|
||||
FastIOPortMap[STM_PORT(digitalPin[i])] = get_GPIO_Port(STM_PORT(digitalPin[i]));
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -24,19 +24,49 @@
|
||||
|
||||
/**
|
||||
* Fast I/O interfaces for STM32
|
||||
* These use GPIO functions instead of Direct Port Manipulation, as on AVR.
|
||||
* These use GPIO register access for fast port manipulation.
|
||||
*/
|
||||
|
||||
#define _BV(b) (1 << (b))
|
||||
// --------------------------------------------------------------------------
|
||||
// Public Variables
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
#define READ(IO) digitalRead(IO)
|
||||
#define WRITE(IO,V) digitalWrite(IO,V)
|
||||
#define WRITE_VAR(IO,V) WRITE(IO,V)
|
||||
extern GPIO_TypeDef * FastIOPortMap[];
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// Public functions
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
void FastIO_init(); // Must be called before using fast io macros
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// Defines
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
#define _BV(b) (1 << (b))
|
||||
#define _BV32(b) (1UL << (b))
|
||||
|
||||
#if defined(STM32F0xx) || defined(STM32F1xx) || defined(STM32F3xx) || defined(STM32L0xx) || defined(STM32L4xx)
|
||||
#define _WRITE(IO, V) do { \
|
||||
if (V) FastIOPortMap[STM_PORT(digitalPin[IO])]->BSRR = _BV32(STM_PIN(digitalPin[IO])) ; \
|
||||
else FastIOPortMap[STM_PORT(digitalPin[IO])]->BRR = _BV32(STM_PIN(digitalPin[IO])) ; \
|
||||
} while(0)
|
||||
#else
|
||||
#define _WRITE(IO, V) (FastIOPortMap[STM_PORT(digitalPin[IO])]->BSRR = _BV32(STM_PIN(digitalPin[IO]) + (V ? 0 : 16)))
|
||||
#endif
|
||||
|
||||
#define _READ(IO) bool(READ_BIT(FastIOPortMap[STM_PORT(digitalPin[IO])]->IDR, _BV32(STM_PIN(digitalPin[IO]))))
|
||||
#define _TOGGLE(IO) (FastIOPortMap[STM_PORT(digitalPin[IO])]->ODR ^= _BV32(STM_PIN(digitalPin[IO])))
|
||||
|
||||
#define _GET_MODE(IO)
|
||||
#define _SET_MODE(IO,M) pinMode(IO, M)
|
||||
#define _SET_OUTPUT(IO) pinMode(IO, OUTPUT) /*!< Output Push Pull Mode & GPIO_NOPULL */
|
||||
|
||||
#define WRITE_VAR(IO,V) _WRITE(IO,V)
|
||||
#define WRITE(IO,V) _WRITE(IO,V)
|
||||
#define READ(IO) _READ(IO)
|
||||
#define TOGGLE(IO) _TOGGLE(IO)
|
||||
|
||||
#define OUT_WRITE(IO,V) do{ _SET_OUTPUT(IO); WRITE(IO,V); }while(0)
|
||||
|
||||
#define SET_INPUT(IO) _SET_MODE(IO, INPUT) /*!< Input Floating Mode */
|
||||
@@ -44,8 +74,6 @@
|
||||
#define SET_INPUT_PULLDOWN(IO) _SET_MODE(IO, INPUT_PULLDOWN) /*!< Input with Pull-down activation */
|
||||
#define SET_OUTPUT(IO) OUT_WRITE(IO, LOW)
|
||||
|
||||
#define TOGGLE(IO) OUT_WRITE(IO, !READ(IO))
|
||||
|
||||
#define GET_INPUT(IO)
|
||||
#define GET_OUTPUT(IO)
|
||||
#define GET_TIMER(IO)
|
||||
|
||||
@@ -22,14 +22,14 @@
|
||||
* Define SPI Pins: SCK, MISO, MOSI, SS
|
||||
*/
|
||||
#ifndef SCK_PIN
|
||||
#define SCK_PIN 13
|
||||
#define SCK_PIN PIN_SPI_SCK
|
||||
#endif
|
||||
#ifndef MISO_PIN
|
||||
#define MISO_PIN 12
|
||||
#define MISO_PIN PIN_SPI_MISO
|
||||
#endif
|
||||
#ifndef MOSI_PIN
|
||||
#define MOSI_PIN 11
|
||||
#define MOSI_PIN PIN_SPI_MOSI
|
||||
#endif
|
||||
#ifndef SS_PIN
|
||||
#define SS_PIN 14
|
||||
#define SS_PIN PIN_SPI_SS
|
||||
#endif
|
||||
|
||||
@@ -20,16 +20,13 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* HAL for stm32duino.com based on Libmaple and compatible (STM32F1)
|
||||
*/
|
||||
|
||||
#ifndef _HAL_STM32F1_H
|
||||
#define _HAL_STM32F1_H
|
||||
|
||||
#define CPU_32_BIT
|
||||
#undef DEBUG_NONE
|
||||
|
||||
#ifndef vsnprintf_P
|
||||
#define vsnprintf_P vsnprintf
|
||||
@@ -43,15 +40,6 @@
|
||||
#include <util/atomic.h>
|
||||
#include <Arduino.h>
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// Undefine DEBUG_ settings
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
|
||||
#undef DEBUG_NONE
|
||||
#undef DEBUG_FAULT
|
||||
#undef DEBUG_ALL
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// Includes
|
||||
// --------------------------------------------------------------------------
|
||||
@@ -251,5 +239,3 @@ void HAL_enable_AdcFreerun(void);
|
||||
|
||||
#define JTAG_DISABLE() afio_cfg_debug_ports(AFIO_DEBUG_SW_ONLY)
|
||||
#define JTAGSWD_DISABLE() afio_cfg_debug_ports(AFIO_DEBUG_NONE)
|
||||
|
||||
#endif // _HAL_STM32F1_H
|
||||
|
||||
@@ -20,9 +20,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef HAL_SERVO_STM32F1_H
|
||||
#define HAL_SERVO_STM32F1_H
|
||||
#pragma once
|
||||
|
||||
// Pin number of unattached pins
|
||||
#define NOT_ATTACHED (-1)
|
||||
@@ -53,5 +51,3 @@ class libServo {
|
||||
int32_t minAngle;
|
||||
int32_t maxAngle;
|
||||
};
|
||||
|
||||
#endif // HAL_SERVO_STM32F1_H
|
||||
|
||||
@@ -19,14 +19,12 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* HAL for stm32duino.com based on Libmaple and compatible (STM32F1)
|
||||
*/
|
||||
|
||||
#ifndef _HAL_TIMERS_STM32F1_H
|
||||
#define _HAL_TIMERS_STM32F1_H
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// Includes
|
||||
// --------------------------------------------------------------------------
|
||||
@@ -167,5 +165,3 @@ FORCE_INLINE static void HAL_timer_isr_prologue(const uint8_t timer_num) {
|
||||
}
|
||||
|
||||
#define HAL_timer_isr_epilogue(TIMER_NUM)
|
||||
|
||||
#endif // _HAL_TIMERS_STM32F1_H
|
||||
|
||||
@@ -13,13 +13,6 @@ After these lines:
|
||||
#endif
|
||||
<>
|
||||
|
||||
Add the following 3 lines:
|
||||
<>
|
||||
#undef DEBUG_NONE
|
||||
#undef DEBUG_FAULT
|
||||
#undef DEBUG_ALL
|
||||
<>
|
||||
|
||||
### Main developers:
|
||||
Victorpv
|
||||
xC000005
|
||||
@@ -30,5 +23,3 @@ https://github.com/victorpv/Marlin/tree/bugfix-2.0.x
|
||||
|
||||
PRs should only be sent to Marlin bugfix-2.0.x branch once tested in printing so not to introduce new bugs.
|
||||
For testing/dev, you can submit to the above branch
|
||||
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* Endstop interrupts for Libmaple STM32F1 based targets.
|
||||
@@ -46,9 +47,6 @@
|
||||
* (Located in Marlin/buildroot/share/pin_interrupt_test/pin_interrupt_test.ino)
|
||||
*/
|
||||
|
||||
#ifndef _ENDSTOP_INTERRUPTS_H_
|
||||
#define _ENDSTOP_INTERRUPTS_H_
|
||||
|
||||
#include "../../module/endstops.h"
|
||||
|
||||
// One ISR for all EXT-Interrupts
|
||||
@@ -89,5 +87,3 @@ void setup_endstop_interrupts(void) {
|
||||
attachInterrupt(Z_MIN_PROBE_PIN, endstop_ISR, CHANGE);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif //_ENDSTOP_INTERRUPTS_H_
|
||||
|
||||
@@ -20,15 +20,13 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* Fast I/O interfaces for STM32F1
|
||||
* These use GPIO functions instead of Direct Port Manipulation, as on AVR.
|
||||
*/
|
||||
|
||||
#ifndef _FASTIO_STM32F1_H
|
||||
#define _FASTIO_STM32F1_H
|
||||
|
||||
#include <libmaple/gpio.h>
|
||||
|
||||
#define READ(IO) (PIN_MAP[IO].gpio_device->regs->IDR & (1U << PIN_MAP[IO].gpio_bit) ? HIGH : LOW)
|
||||
@@ -52,5 +50,3 @@
|
||||
|
||||
#define PWM_PIN(p) true
|
||||
#define USEABLE_HARDWARE_PWM(p) PWM_PIN(p)
|
||||
|
||||
#endif // _FASTIO_STM32F1_H
|
||||
|
||||
@@ -16,14 +16,12 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* HAL for stm32duino.com based on Libmaple and compatible (STM32F1)
|
||||
*/
|
||||
|
||||
#ifndef SPI_PINS_H_
|
||||
#define SPI_PINS_H_
|
||||
|
||||
/**
|
||||
* Define SPI Pins: SCK, MISO, MOSI, SS
|
||||
*
|
||||
@@ -33,5 +31,3 @@
|
||||
#define MISO_PIN PA6
|
||||
#define MOSI_PIN PA7
|
||||
#define SS_PIN PA4
|
||||
|
||||
#endif // SPI_PINS_H_
|
||||
|
||||
@@ -19,14 +19,12 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* HAL for stm32duino.com based on Libmaple and compatible (STM32F1)
|
||||
*/
|
||||
|
||||
#ifndef WATCHDOG_STM32F1_H
|
||||
#define WATCHDOG_STM32F1_H
|
||||
|
||||
#include <libmaple/iwdg.h>
|
||||
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
@@ -51,5 +49,3 @@ inline void watchdog_reset() {
|
||||
#endif
|
||||
iwdg_feed();
|
||||
}
|
||||
|
||||
#endif // WATCHDOG_STM32F1_H
|
||||
|
||||
@@ -45,10 +45,7 @@
|
||||
*
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||
#ifndef __EEEPROM_EMUL_H
|
||||
#define __EEEPROM_EMUL_H
|
||||
#pragma once
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// Includes
|
||||
@@ -112,6 +109,4 @@ uint16_t EE_Initialize(void);
|
||||
uint16_t EE_ReadVariable(uint16_t VirtAddress, uint16_t* Data);
|
||||
uint16_t EE_WriteVariable(uint16_t VirtAddress, uint16_t Data);
|
||||
|
||||
#endif /* __EEEPROM_H */
|
||||
|
||||
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|
||||
|
||||
@@ -140,4 +140,3 @@ void eeprom_update_block(const void *__src, void *__dst, size_t __n) {
|
||||
|
||||
#endif // ENABLED(EEPROM_SETTINGS) && DISABLED(I2C_EEPROM) && DISABLED(SPI_EEPROM)
|
||||
#endif // STM32F4 || STM32F4xx
|
||||
|
||||
|
||||
@@ -20,12 +20,9 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _HAL_STM32F4_H
|
||||
#define _HAL_STM32F4_H
|
||||
#pragma once
|
||||
|
||||
#define CPU_32_BIT
|
||||
#undef DEBUG_NONE
|
||||
|
||||
#ifndef vsnprintf_P
|
||||
#define vsnprintf_P vsnprintf
|
||||
@@ -251,5 +248,3 @@ void HAL_enable_AdcFreerun(void);
|
||||
|
||||
#define JTAG_DISABLE() afio_cfg_debug_ports(AFIO_DEBUG_SW_ONLY)
|
||||
#define JTAGSWD_DISABLE() afio_cfg_debug_ports(AFIO_DEBUG_NONE)
|
||||
|
||||
#endif // _HAL_STM32F4_H
|
||||
|
||||
@@ -20,22 +20,18 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef HAL_SERVO_STM32F4_H
|
||||
#define HAL_SERVO_STM32F4_H
|
||||
#pragma once
|
||||
|
||||
#include <Servo.h>
|
||||
|
||||
// Inherit and expand on the official library
|
||||
class libServo : public Servo {
|
||||
public:
|
||||
public:
|
||||
int8_t attach(const int pin);
|
||||
int8_t attach(const int pin, const int min, const int max);
|
||||
void move(const int value);
|
||||
private:
|
||||
private:
|
||||
uint16_t min_ticks;
|
||||
uint16_t max_ticks;
|
||||
uint8_t servoIndex; // index into the channel data for this servo
|
||||
};
|
||||
|
||||
#endif // HAL_SERVO_STM32F4_H
|
||||
|
||||
@@ -19,9 +19,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _HAL_TIMERS_STM32F4_H
|
||||
#define _HAL_TIMERS_STM32F4_H
|
||||
#pragma once
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// Includes
|
||||
@@ -130,5 +128,3 @@ FORCE_INLINE static hal_timer_t HAL_timer_get_compare(const uint8_t timer_num) {
|
||||
#endif
|
||||
|
||||
#define HAL_timer_isr_epilogue(TIMER_NUM)
|
||||
|
||||
#endif // _HAL_TIMERS_STM32F4_H
|
||||
|
||||
@@ -20,9 +20,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _ENDSTOP_INTERRUPTS_H_
|
||||
#define _ENDSTOP_INTERRUPTS_H_
|
||||
#pragma once
|
||||
|
||||
#include "../../module/endstops.h"
|
||||
|
||||
@@ -64,5 +62,3 @@ void setup_endstop_interrupts(void) {
|
||||
attachInterrupt(Z_MIN_PROBE_PIN, endstop_ISR, CHANGE);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif //_ENDSTOP_INTERRUPTS_H_
|
||||
|
||||
@@ -20,15 +20,13 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* Fast I/O interfaces for STM32F4
|
||||
* These use GPIO functions instead of Direct Port Manipulation, as on AVR.
|
||||
*/
|
||||
|
||||
#ifndef _FASTIO_STM32F4_H
|
||||
#define _FASTIO_STM32F4_H
|
||||
|
||||
#undef _BV
|
||||
#define _BV(b) (1 << (b))
|
||||
|
||||
@@ -151,5 +149,3 @@
|
||||
#define PE13 _STM32_PIN(E, 13)
|
||||
#define PE14 _STM32_PIN(E, 14)
|
||||
#define PE15 _STM32_PIN(E, 15)
|
||||
|
||||
#endif // _FASTIO_STM32F4_H
|
||||
|
||||
@@ -19,15 +19,9 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef WATCHDOG_STM32F4_H
|
||||
#define WATCHDOG_STM32F4_H
|
||||
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
#pragma once
|
||||
|
||||
extern IWDG_HandleTypeDef hiwdg;
|
||||
|
||||
void watchdog_init();
|
||||
void watchdog_reset();
|
||||
|
||||
#endif // WATCHDOG_STM32F1_H
|
||||
|
||||
@@ -45,10 +45,7 @@
|
||||
*
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||
#ifndef __EEEPROM_EMUL_H
|
||||
#define __EEEPROM_EMUL_H
|
||||
#pragma once
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// Includes
|
||||
@@ -113,6 +110,4 @@ uint16_t EE_Initialize(void);
|
||||
uint16_t EE_ReadVariable(uint16_t VirtAddress, uint16_t* Data);
|
||||
uint16_t EE_WriteVariable(uint16_t VirtAddress, uint16_t Data);
|
||||
|
||||
#endif /* __EEEPROM_H */
|
||||
|
||||
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|
||||
|
||||
@@ -137,4 +137,3 @@ void eeprom_update_block(const void *__src, void *__dst, size_t __n) {
|
||||
}
|
||||
|
||||
#endif // STM32F7
|
||||
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#ifdef STM32F7
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
@@ -20,12 +20,9 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _HAL_STM32F7_H
|
||||
#define _HAL_STM32F7_H
|
||||
#pragma once
|
||||
|
||||
#define CPU_32_BIT
|
||||
#undef DEBUG_NONE
|
||||
|
||||
#ifndef vsnprintf_P
|
||||
#define vsnprintf_P vsnprintf
|
||||
@@ -153,8 +150,6 @@ extern uint16_t HAL_adc_result;
|
||||
// Public functions
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
// Memory related
|
||||
#define __bss_end __bss_end__
|
||||
|
||||
@@ -236,5 +231,3 @@ void HAL_enable_AdcFreerun(void);
|
||||
#define GET_PIN_MAP_PIN(index) index
|
||||
#define GET_PIN_MAP_INDEX(pin) pin
|
||||
#define PARSED_PIN_INDEX(code, dval) parser.intval(code, dval)
|
||||
|
||||
#endif // _HAL_STM32F7_H
|
||||
|
||||
@@ -20,9 +20,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef HAL_SERVO_STM32F7_H
|
||||
#define HAL_SERVO_STM32F7_H
|
||||
#pragma once
|
||||
|
||||
#include <../../libraries/Servo/src/Servo.h>
|
||||
|
||||
@@ -37,5 +35,3 @@ private:
|
||||
uint16_t max_ticks;
|
||||
uint8_t servoIndex; // index into the channel data for this servo
|
||||
};
|
||||
|
||||
#endif // HAL_SERVO_STM32F7_H
|
||||
|
||||
@@ -19,9 +19,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _HAL_TIMERS_STM32F7_H
|
||||
#define _HAL_TIMERS_STM32F7_H
|
||||
#pragma once
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// Includes
|
||||
@@ -101,5 +99,3 @@ hal_timer_t HAL_timer_get_compare(const uint8_t timer_num);
|
||||
uint32_t HAL_timer_get_count(const uint8_t timer_num);
|
||||
void HAL_timer_isr_prologue(const uint8_t timer_num);
|
||||
#define HAL_timer_isr_epilogue(TIMER_NUM)
|
||||
|
||||
#endif // _HAL_TIMERS_STM32F7_H
|
||||
|
||||
@@ -24,12 +24,9 @@
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
|
||||
// ensure this library description is only included once
|
||||
#ifndef _TMC26XSTEPPER_H_
|
||||
#define _TMC26XSTEPPER_H_
|
||||
#include <stdint.h>
|
||||
|
||||
//! return value for TMC26XStepper.getOverTemperature() if there is a overtemperature situation in the TMC chip
|
||||
/*!
|
||||
@@ -601,5 +598,3 @@ class TMC26XStepper {
|
||||
// SPI sender
|
||||
inline void send262(uint32_t datagram);
|
||||
};
|
||||
|
||||
#endif // _TMC26XSTEPPER_H_
|
||||
|
||||
@@ -20,11 +20,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#ifndef _ENDSTOP_INTERRUPTS_H_
|
||||
#define _ENDSTOP_INTERRUPTS_H_
|
||||
#pragma once
|
||||
|
||||
#include "../../module/endstops.h"
|
||||
|
||||
@@ -66,5 +62,3 @@ void setup_endstop_interrupts(void) {
|
||||
attachInterrupt(Z_MIN_PROBE_PIN, endstop_ISR, CHANGE);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif //_ENDSTOP_INTERRUPTS_H_
|
||||
|
||||
@@ -20,15 +20,13 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* Fast I/O interfaces for STM32F7
|
||||
* These use GPIO functions instead of Direct Port Manipulation, as on AVR.
|
||||
*/
|
||||
|
||||
#ifndef _FASTIO_STM32F7_H
|
||||
#define _FASTIO_STM32F7_H
|
||||
|
||||
#define _BV(b) (1 << (b))
|
||||
|
||||
#define READ(IO) digitalRead(IO)
|
||||
@@ -186,5 +184,3 @@
|
||||
#define PG13 _STM32_PIN(G, 13)
|
||||
#define PG14 _STM32_PIN(G, 14)
|
||||
#define PG15 _STM32_PIN(G, 15)
|
||||
|
||||
#endif // _FASTIO_STM32F7_H
|
||||
|
||||
@@ -19,15 +19,9 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef WATCHDOG_STM32F7_H
|
||||
#define WATCHDOG_STM32F7_H
|
||||
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
#pragma once
|
||||
|
||||
extern IWDG_HandleTypeDef hiwdg;
|
||||
|
||||
void watchdog_init();
|
||||
void watchdog_reset();
|
||||
|
||||
#endif // WATCHDOG_STM32F1_H
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#ifdef __MK20DX256__
|
||||
|
||||
#include "HAL.h"
|
||||
#include "../Delay.h"
|
||||
#include "../shared/Delay.h"
|
||||
|
||||
#include <Wire.h>
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ static SPISettings spiConfig;
|
||||
* Standard SPI functions
|
||||
*/
|
||||
|
||||
// Initialise SPI bus
|
||||
// Initialize SPI bus
|
||||
void spiBegin(void) {
|
||||
#if !PIN_EXISTS(SS)
|
||||
#error "SS_PIN not defined!"
|
||||
|
||||
@@ -19,14 +19,12 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* Description: HAL for Teensy 3.5 and Teensy 3.6
|
||||
*/
|
||||
|
||||
#ifndef _HAL_TEENSY_H
|
||||
#define _HAL_TEENSY_H
|
||||
|
||||
#define CPU_32_BIT
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
@@ -167,9 +165,3 @@ uint16_t HAL_adc_get_result(void);
|
||||
#define GET_PIN_MAP_PIN(index) index
|
||||
#define GET_PIN_MAP_INDEX(pin) pin
|
||||
#define PARSED_PIN_INDEX(code, dval) parser.intval(code, dval)
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
//
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
#endif // _HAL_TEENSY_H
|
||||
|
||||
@@ -1,5 +1,25 @@
|
||||
#ifndef _HAL_SERVO_TEENSY_H_
|
||||
#define _HAL_SERVO_TEENSY_H_
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <Servo.h>
|
||||
|
||||
@@ -14,5 +34,3 @@ class libServo : public Servo {
|
||||
uint16_t max_ticks;
|
||||
uint8_t servoIndex; // index into the channel data for this servo
|
||||
};
|
||||
|
||||
#endif // _HAL_SERVO_TEENSY_H_
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
/* **************************************************************************
|
||||
|
||||
Marlin 3D Printer Firmware
|
||||
Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
|
||||
Copyright (c) 2015-2016 Nico Tonnhofer wurstnase.reprap@gmail.com
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
****************************************************************************/
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
|
||||
* Copyright (c) 2015-2016 Nico Tonnhofer wurstnase.reprap@gmail.com
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* Description: HAL for
|
||||
@@ -25,9 +25,6 @@
|
||||
* Teensy3.6 (__MK66FX1M0__)
|
||||
*/
|
||||
|
||||
#ifndef _HAL_TIMERS_TEENSY_H
|
||||
#define _HAL_TIMERS_TEENSY_H
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// Includes
|
||||
// --------------------------------------------------------------------------
|
||||
@@ -108,5 +105,3 @@ bool HAL_timer_interrupt_enabled(const uint8_t timer_num);
|
||||
|
||||
void HAL_timer_isr_prologue(const uint8_t timer_num);
|
||||
#define HAL_timer_isr_epilogue(TIMER_NUM)
|
||||
|
||||
#endif // _HAL_TIMERS_TEENSY_H
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* Endstop Interrupts
|
||||
@@ -34,9 +35,6 @@
|
||||
* (Located in Marlin/buildroot/share/pin_interrupt_test/pin_interrupt_test.ino)
|
||||
*/
|
||||
|
||||
#ifndef _ENDSTOP_INTERRUPTS_H_
|
||||
#define _ENDSTOP_INTERRUPTS_H_
|
||||
|
||||
#include "../../module/endstops.h"
|
||||
|
||||
// One ISR for all EXT-Interrupts
|
||||
@@ -81,5 +79,3 @@ void setup_endstop_interrupts( void ) {
|
||||
attachInterrupt(digitalPinToInterrupt(Z_MIN_PROBE_PIN), endstop_ISR, CHANGE);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif //_ENDSTOP_INTERRUPTS_H_
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* Fast I/O Routines for Teensy 3.5 and Teensy 3.6
|
||||
@@ -26,9 +27,6 @@
|
||||
* Contributed by Triffid_Hunter and modified by Kliment, thinkyhead, Bob-the-Kuhn, et.al.
|
||||
*/
|
||||
|
||||
#ifndef _FASTIO_TEENSY_H
|
||||
#define _FASTIO_TEENSY_H
|
||||
|
||||
#ifndef MASK
|
||||
#define MASK(PIN) (1 << PIN)
|
||||
#endif
|
||||
@@ -91,5 +89,3 @@
|
||||
*/
|
||||
|
||||
#define DIO0_PIN 8
|
||||
|
||||
#endif /* _FASTIO_TEENSY_H */
|
||||
|
||||
@@ -19,13 +19,9 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef SPI_PINS_H_
|
||||
#define SPI_PINS_H_
|
||||
#pragma once
|
||||
|
||||
#define SCK_PIN 13
|
||||
#define MISO_PIN 12
|
||||
#define MOSI_PIN 11
|
||||
#define SS_PIN 20 //SDSS // A.28, A.29, B.21, C.26, C.29
|
||||
|
||||
#endif /* SPI_PINS_H_ */
|
||||
#define SS_PIN 20 // SDSS // A.28, A.29, B.21, C.26, C.29
|
||||
|
||||
@@ -19,13 +19,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef WATCHDOG_TEENSY_H
|
||||
#define WATCHDOG_TEENSY_H
|
||||
|
||||
#include "HAL.h"
|
||||
|
||||
// Arduino Due core now has watchdog support
|
||||
#pragma once
|
||||
|
||||
void watchdog_init();
|
||||
|
||||
@@ -34,5 +28,3 @@ inline void watchdog_reset() {
|
||||
WDOG_REFRESH = 0xA602;
|
||||
WDOG_REFRESH = 0xB480;
|
||||
}
|
||||
|
||||
#endif // WATCHDOG_TEENSY_H
|
||||
|
||||
@@ -1,7 +1,25 @@
|
||||
#ifndef _HAL_PLATFORMS_H_
|
||||
#define _HAL_PLATFORMS_H_
|
||||
|
||||
#ifndef HAL_PLATFORM
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#ifdef __AVR__
|
||||
#define HAL_PLATFORM HAL_AVR
|
||||
@@ -27,10 +45,6 @@
|
||||
#error "Unsupported Platform!"
|
||||
#endif
|
||||
|
||||
#endif // HAL_PLATFORM
|
||||
|
||||
#define XSTR_(M) #M
|
||||
#define XSTR(M) XSTR_(M)
|
||||
#define HAL_PATH(PATH, NAME) XSTR(PATH/HAL_PLATFORM/NAME)
|
||||
|
||||
#endif // _HAL_PLATFORMS_H_
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* Busy wait delay cycles routines:
|
||||
@@ -28,57 +29,81 @@
|
||||
* DELAY_US(count): Delay execution in microseconds
|
||||
*/
|
||||
|
||||
#ifndef MARLIN_DELAY_H
|
||||
#define MARLIN_DELAY_H
|
||||
|
||||
#include "../../core/macros.h"
|
||||
#include "../../core/millis_t.h"
|
||||
|
||||
#if defined(__arm__) || defined(__thumb__)
|
||||
|
||||
// https://blueprints.launchpad.net/gcc-arm-embedded/+spec/delay-cycles
|
||||
#if __CORTEX_M == 7
|
||||
|
||||
#define nop() __asm__ __volatile__("nop;\n\t":::)
|
||||
// Cortex-M7 can use the cycle counter of the DWT unit
|
||||
// http://www.anthonyvh.com/2017/05/18/cortex_m-cycle_counter/
|
||||
|
||||
FORCE_INLINE static void __delay_4cycles(uint32_t cy) { // +1 cycle
|
||||
#if ARCH_PIPELINE_RELOAD_CYCLES < 2
|
||||
#define EXTRA_NOP_CYCLES A("nop")
|
||||
#else
|
||||
#define EXTRA_NOP_CYCLES ""
|
||||
#endif
|
||||
FORCE_INLINE static void enableCycleCounter() {
|
||||
CoreDebug->DEMCR |= CoreDebug_DEMCR_TRCENA_Msk;
|
||||
|
||||
__asm__ __volatile__(
|
||||
A(".syntax unified") // is to prevent CM0,CM1 non-unified syntax
|
||||
L("1")
|
||||
A("subs %[cnt],#1")
|
||||
EXTRA_NOP_CYCLES
|
||||
A("bne 1b")
|
||||
: [cnt]"+r"(cy) // output: +r means input+output
|
||||
: // input:
|
||||
: "cc" // clobbers:
|
||||
);
|
||||
}
|
||||
// Unlock DWT.
|
||||
DWT->LAR = 0xC5ACCE55;
|
||||
|
||||
// Delay in cycles
|
||||
FORCE_INLINE static void DELAY_CYCLES(uint32_t x) {
|
||||
|
||||
if (__builtin_constant_p(x)) {
|
||||
#define MAXNOPS 4
|
||||
|
||||
if (x <= (MAXNOPS)) {
|
||||
switch (x) { case 4: nop(); case 3: nop(); case 2: nop(); case 1: nop(); }
|
||||
}
|
||||
else { // because of +1 cycle inside delay_4cycles
|
||||
const uint32_t rem = (x - 1) % (MAXNOPS);
|
||||
switch (rem) { case 3: nop(); case 2: nop(); case 1: nop(); }
|
||||
if ((x = (x - 1) / (MAXNOPS)))
|
||||
__delay_4cycles(x); // if need more then 4 nop loop is more optimal
|
||||
}
|
||||
#undef MAXNOPS
|
||||
DWT->CYCCNT = 0;
|
||||
DWT->CTRL |= DWT_CTRL_CYCCNTENA_Msk;
|
||||
}
|
||||
else if ((x >>= 2))
|
||||
__delay_4cycles(x);
|
||||
}
|
||||
#undef nop
|
||||
|
||||
FORCE_INLINE volatile uint32_t getCycleCount() { return DWT->CYCCNT; }
|
||||
|
||||
FORCE_INLINE static void DELAY_CYCLES(const uint32_t x) {
|
||||
const uint32_t endCycles = getCycleCount() + x;
|
||||
while (PENDING(getCycleCount(), endCycles)) { }
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
// https://blueprints.launchpad.net/gcc-arm-embedded/+spec/delay-cycles
|
||||
|
||||
#define nop() __asm__ __volatile__("nop;\n\t":::)
|
||||
|
||||
FORCE_INLINE static void __delay_4cycles(uint32_t cy) { // +1 cycle
|
||||
#if ARCH_PIPELINE_RELOAD_CYCLES < 2
|
||||
#define EXTRA_NOP_CYCLES A("nop")
|
||||
#else
|
||||
#define EXTRA_NOP_CYCLES ""
|
||||
#endif
|
||||
|
||||
__asm__ __volatile__(
|
||||
A(".syntax unified") // is to prevent CM0,CM1 non-unified syntax
|
||||
L("1")
|
||||
A("subs %[cnt],#1")
|
||||
EXTRA_NOP_CYCLES
|
||||
A("bne 1b")
|
||||
: [cnt]"+r"(cy) // output: +r means input+output
|
||||
: // input:
|
||||
: "cc" // clobbers:
|
||||
);
|
||||
}
|
||||
|
||||
// Delay in cycles
|
||||
FORCE_INLINE static void DELAY_CYCLES(uint32_t x) {
|
||||
|
||||
if (__builtin_constant_p(x)) {
|
||||
#define MAXNOPS 4
|
||||
|
||||
if (x <= (MAXNOPS)) {
|
||||
switch (x) { case 4: nop(); case 3: nop(); case 2: nop(); case 1: nop(); }
|
||||
}
|
||||
else { // because of +1 cycle inside delay_4cycles
|
||||
const uint32_t rem = (x - 1) % (MAXNOPS);
|
||||
switch (rem) { case 3: nop(); case 2: nop(); case 1: nop(); }
|
||||
if ((x = (x - 1) / (MAXNOPS)))
|
||||
__delay_4cycles(x); // if need more then 4 nop loop is more optimal
|
||||
}
|
||||
#undef MAXNOPS
|
||||
}
|
||||
else if ((x >>= 2))
|
||||
__delay_4cycles(x);
|
||||
}
|
||||
#undef nop
|
||||
|
||||
#endif
|
||||
|
||||
#elif defined(__AVR__)
|
||||
|
||||
@@ -144,5 +169,3 @@
|
||||
|
||||
// Delay in microseconds
|
||||
#define DELAY_US(x) DELAY_CYCLES( (x) * (F_CPU / 1000000UL) )
|
||||
|
||||
#endif // MARLIN_DELAY_H
|
||||
|
||||
@@ -19,15 +19,13 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* HAL/HAL_SPI.h
|
||||
* Core Marlin definitions for SPI, implemented in the HALs
|
||||
*/
|
||||
|
||||
#ifndef _HAL_SPI_H_
|
||||
#define _HAL_SPI_H_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
/**
|
||||
@@ -78,5 +76,3 @@ void spiRead(uint8_t* buf, uint16_t nbyte);
|
||||
void spiSendBlock(uint8_t token, const uint8_t* buf);
|
||||
/** Begin SPI transaction, set clock, bit order, data mode */
|
||||
void spiBeginTransaction(uint32_t spiClock, uint8_t bitOrder, uint8_t dataMode);
|
||||
|
||||
#endif // _HAL_SPI_H_
|
||||
|
||||
@@ -155,5 +155,4 @@ void eeprom_read_block(void* pos, const void* eeprom_address, size_t n) {
|
||||
if (Wire.available()) *((uint8_t*)pos + c) = Wire.read();
|
||||
}
|
||||
|
||||
|
||||
#endif // ENABLED(I2C_EEPROM)
|
||||
#endif // I2C_EEPROM
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user