summaryrefslogtreecommitdiff
path: root/Sprinter/store_eeprom.h
diff options
context:
space:
mode:
authormidopple <mdoppler@gmx.at>2012-02-17 22:33:02 +0100
committermidopple <mdoppler@gmx.at>2012-02-17 22:33:02 +0100
commit4b1b0f1d96d2be2ed3941095f40a5c2d2bbb943d (patch)
tree6216bc6d1d0fb9f2133c2e18a7f5f93fd7c68a6d /Sprinter/store_eeprom.h
parentee764635a3882722ef0834742c8baf342a3b2ee3 (diff)
The microcontroller can store settings to EEPROM
to use the fuction set in configuration.h #define USE_EEPROM_SETTINGS --> Save and recall Settings aktive #define PRINT_EEPROM_SETTING --> Print settings to UART Commands: M500 - stores paramters in EEPROM M501 - reads parameters from EEPROM M502 - reverts to the default M503 - Print Settings
Diffstat (limited to 'Sprinter/store_eeprom.h')
-rw-r--r--Sprinter/store_eeprom.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/Sprinter/store_eeprom.h b/Sprinter/store_eeprom.h
new file mode 100644
index 0000000..cff25d3
--- /dev/null
+++ b/Sprinter/store_eeprom.h
@@ -0,0 +1,49 @@
+/*
+ EEPROM routines to save Sprinter Settings
+
+ 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/>.
+*/
+
+
+#ifndef __EEPROMH
+#define __EEPROMH
+
+#define EEPROM_OFFSET 100
+
+
+// IMPORTANT: Whenever there are changes made to the variables stored in EEPROM
+// in the functions below, also increment the version number. This makes sure that
+// the default values are used whenever there is a change to the data, to prevent
+// wrong data being written to the variables.
+// ALSO: always make sure the variables in the Store and retrieve sections are in the same order.
+#define EEPROM_VERSION "S01"
+
+
+extern float axis_steps_per_unit[4];
+extern float max_feedrate[4];
+extern long max_acceleration_units_per_sq_second[4];
+extern float move_acceleration;
+extern float retract_acceleration;
+extern float mintravelfeedrate;
+extern float minimumfeedrate;
+extern float max_xy_jerk;
+extern float max_z_jerk;
+
+
+extern void EEPROM_RetrieveSettings(bool def, bool printout );
+extern void EEPROM_printSettings();
+extern void EEPROM_StoreSettings();
+
+
+#endif