Teacup_Firmware/attic/eeconfig/0002-documentation.patch

85 lines
3.9 KiB
Diff

From 36497dde3047fb7a08a29b473fa2408c61f9e7bb Mon Sep 17 00:00:00 2001
From: Michael Moon <triffid.hunter@gmail.com>
Date: Mon, 28 Mar 2011 20:57:30 +1100
Subject: documentation
---
eeconfig.h | 44 ++++++++++++++++++++++++--------------------
1 file changed, 24 insertions(+), 20 deletions(-)
diff --git a/eeconfig.h b/eeconfig.h
index 2b489c0..e9a8a70 100644
--- a/eeconfig.h
+++ b/eeconfig.h
@@ -3,43 +3,47 @@
#include <stdint.h>
+/// this doubles as both an in-eeprom and in-memory storage struct for configuration settings
typedef struct {
- uint32_t steps_per_mm_x;
- uint32_t steps_per_mm_y;
- uint32_t steps_per_mm_z;
- uint32_t steps_per_mm_e;
+ uint32_t steps_per_mm_x; ///< steps per mm. critically important for accurate prints
+ uint32_t steps_per_mm_y; ///< steps per mm. critically important for accurate prints
+ uint32_t steps_per_mm_z; ///< steps per mm. critically important for accurate prints
+ uint32_t steps_per_mm_e; ///< steps per mm. critically important for accurate prints
- uint32_t size_x;
- uint32_t size_y;
- uint32_t size_z;
+ uint32_t size_x; ///< build volume. don't allow axes to move outside an area of this size
+ uint32_t size_y; ///< build volume. don't allow axes to move outside an area of this size
+ uint32_t size_z; ///< build volume. don't allow axes to move outside an area of this size
- uint32_t max_speed_x;
- uint32_t max_speed_y;
- uint32_t max_speed_z;
- uint32_t max_speed_e;
+ uint32_t max_speed_x; ///< axis speed limit. Any move which requires this axis to go above this speed will have its specified speed reduced, preserving geometry.
+ uint32_t max_speed_y; ///< axis speed limit. Any move which requires this axis to go above this speed will have its specified speed reduced, preserving geometry.
+ uint32_t max_speed_z; ///< axis speed limit. Any move which requires this axis to go above this speed will have its specified speed reduced, preserving geometry.
+ uint32_t max_speed_e; ///< axis speed limit. Any move which requires this axis to go above this speed will have its specified speed reduced, preserving geometry.
- uint16_t max_temp_e;
- uint16_t max_temp_b;
- uint16_t max_temp_r;
+ uint16_t max_temp_e; ///< do not allow temperature to go above this amount even if host software requests it, assume host software has gone crazy.
+ uint16_t max_temp_b; ///< do not allow temperature to go above this amount even if host software requests it, assume host software has gone crazy.
+ uint16_t max_temp_r; ///< do not allow temperature to go above this amount even if host software requests it, assume host software has gone crazy.
- uint32_t min_endstop_pos_z;
+ uint32_t min_endstop_pos_z; ///< this is the Z position where the endstop is encountered. This helps prevent the head crashing into the bed while homing. To use, set this value to 3mm or so, then adjust your Z endstop flag so that it trips when your extruder nozzle is 3mm from your bed.
- uint16_t temp_hysteresis;
- uint16_t temp_residency;
+ uint16_t temp_hysteresis; ///< temperature has to be within target +/- this amount for M109 and friends to continue
+ uint16_t temp_residency; ///< temperature has to be near target for this long for M109 and friends to continue
- uint32_t baud;
+ uint32_t baud; ///< serial baud rate to communicate at. If changed, does not take effect until reset. \warning if a bad value is progammed, the only way to recover is to re-flash your eeprom from the host.
struct {
uint16_t adc_value;
uint16_t temperature;
- } temptable[20];
+ } temptable[20]; ///< the temperature lookup table for linear interpolation of ADC readings -> temperatures
- uint16_t crc;
+ uint16_t crc; ///< data integrity check. If crc doesn't match data, use defaults instead.
} eeconfig_struct;
extern eeconfig_struct eeconfig;
+/// read settings from eeprom
void eeconfig_init(void);
+
+/// save current settings to eeprom
void eeconfig_save(void);
#endif /* _EECONFIG_H */
--
2.1.0