Browse Source

Merge pull request #1554 from 2PrintBeta/Development

Macro indirection for stepper drivers + Support for TMC26X and L6470 Stepper Drivers
Scott Lahteine 9 years ago
parent
commit
e4d77a6313
64 changed files with 35166 additions and 190 deletions
  1. 2
    0
      .travis.yml
  2. 723
    0
      ArduinoAddons/Arduino_1.x.x/libraries/L6470/L6470.cpp
  3. 286
    0
      ArduinoAddons/Arduino_1.x.x/libraries/L6470/L6470.h
  4. 53
    0
      ArduinoAddons/Arduino_1.x.x/libraries/L6470/keywords.txt
  5. 17
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/.gitignore
  6. 1813
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/Doxyfile
  7. 10
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/LICENSE
  8. 71
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/README.rst
  9. 999
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/TMC26XStepper.cpp
  10. 607
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/TMC26XStepper.h
  11. 848
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/_t_m_c26_x_stepper_8cpp.html
  12. 1067
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/_t_m_c26_x_stepper_8cpp_source.html
  13. 212
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/_t_m_c26_x_stepper_8h.html
  14. 256
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/_t_m_c26_x_stepper_8h_source.html
  15. 72
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/annotated.html
  16. BIN
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/bc_s.png
  17. 117
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/class_t_m_c26_x_stepper-members.html
  18. 1463
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/class_t_m_c26_x_stepper.html
  19. 78
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/classes.html
  20. BIN
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/closed.png
  21. 949
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/doxygen.css
  22. BIN
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/doxygen.png
  23. 72
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/files.html
  24. 261
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/functions.html
  25. 261
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/functions_func.html
  26. 289
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/globals.html
  27. 289
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/globals_defs.html
  28. 72
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/index.html
  29. 64
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/jquery.js
  30. 68
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/mainpage_8dox.html
  31. BIN
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/nav_f.png
  32. BIN
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/nav_h.png
  33. BIN
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/open.png
  34. BIN
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/tab_a.png
  35. BIN
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/tab_b.png
  36. BIN
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/tab_h.png
  37. BIN
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/tab_s.png
  38. 59
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/tabs.css
  39. 82
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/examples/TMC26XExample/TMC26XExample.ino
  40. 176
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/examples/TMC26XMotorTester/Motor.ino
  41. 369
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/examples/TMC26XMotorTester/Serial.ino
  42. 61
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/examples/TMC26XMotorTester/TMC26XMotorTester.ino
  43. 306
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/examples/TMC26XMotorTester/processing/TMC26XMotorTest/Arduino.pde
  44. 175
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/examples/TMC26XMotorTester/processing/TMC26XMotorTest/ChopperConfiguration.pde
  45. 327
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/examples/TMC26XMotorTester/processing/TMC26XMotorTest/DataRendering.pde
  46. 49
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/examples/TMC26XMotorTester/processing/TMC26XMotorTest/DataTable.pde
  47. 335
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/examples/TMC26XMotorTester/processing/TMC26XMotorTest/RunConfiguration.pde
  48. 156
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/examples/TMC26XMotorTester/processing/TMC26XMotorTest/TMC26XMotorTest.pde
  49. BIN
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/examples/TMC26XMotorTester/processing/TMC26XMotorTest/data/mc_logo.jpg
  50. BIN
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/examples/TMC26XMotorTester/processing/TMC26XMotorTest/data/tmc_logo.jpg
  51. BIN
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/examples/TMC26XMotorTester/processing/TMC26XMotorTest/hysteresis.png
  52. 2
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/examples/TMC26XMotorTester/processing/TMC26XMotorTest/sketch.properties
  53. 75
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/keywords.txt
  54. 30
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/mainpage.dox
  55. 9797
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/schematics/tmc-260-shield.brd
  56. 11079
    0
      ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/schematics/tmc-260-shield.sch
  57. 135
    0
      Marlin/Configuration_adv.h
  58. 20
    20
      Marlin/Marlin.h
  59. 10
    0
      Marlin/Marlin.ino
  60. 7
    7
      Marlin/Marlin_main.cpp
  61. 165
    146
      Marlin/stepper.cpp
  62. 16
    17
      Marlin/stepper.h
  63. 224
    0
      Marlin/stepper_indirection.cpp
  64. 492
    0
      Marlin/stepper_indirection.h

+ 2
- 0
.travis.yml View File

@@ -13,6 +13,8 @@ install:
13 13
   - sudo apt-get update -q 
14 14
   - sudo apt-get install arduino
15 15
 before_script:
16
+  # copy TMC and L6470 libraries to arduino dir, as conditional includes do not work in .ino files
17
+  - sudo cp -r ArduinoAddons/Arduino_1.x.x/libraries/ /usr/share/arduino
16 18
  # add U8glib, LiquidCrystal_I2C & LiquidTWI2 libraries 
17 19
   - sudo unzip u8glib_arduino_v1.17.zip -d /usr/share/arduino/libraries/
18 20
   - cd /usr/share/arduino/libraries/

+ 723
- 0
ArduinoAddons/Arduino_1.x.x/libraries/L6470/L6470.cpp View File

@@ -0,0 +1,723 @@
1
+////////////////////////////////////////////////////////////
2
+//ORIGINAL CODE 12/12/2011- Mike Hord, SparkFun Electronics
3
+//LIBRARY Created by Adam Meyer of bildr Aug 18th 2012
4
+//Released as MIT license
5
+////////////////////////////////////////////////////////////
6
+
7
+#include <Arduino.h>
8
+#include "L6470.h"
9
+#include <SPI.h>
10
+
11
+#define ENABLE_RESET_PIN	0
12
+#define K_VALUE			100
13
+
14
+L6470::L6470(int SSPin){
15
+  _SSPin = SSPin;
16
+  // Serial.begin(9600);
17
+}
18
+
19
+void L6470::init(int k_value){
20
+  // This is the generic initialization function to set up the Arduino to
21
+  // communicate with the dSPIN chip.
22
+  
23
+  // set up the input/output pins for the application.
24
+  pinMode(SLAVE_SELECT_PIN, OUTPUT); // The SPI peripheral REQUIRES the hardware SS pin-
25
+  // pin 10- to be an output. This is in here just
26
+  // in case some future user makes something other
27
+  // than pin 10 the SS pin.
28
+  
29
+  pinMode(_SSPin, OUTPUT);
30
+  digitalWrite(_SSPin, HIGH);
31
+  pinMode(MOSI, OUTPUT);
32
+  pinMode(MISO, INPUT);
33
+  pinMode(SCK, OUTPUT);
34
+  pinMode(BUSYN, INPUT);
35
+#if (ENABLE_RESET_PIN == 1)
36
+  pinMode(RESET, OUTPUT);
37
+  // reset the dSPIN chip. This could also be accomplished by
38
+  // calling the "L6470::ResetDev()" function after SPI is initialized.
39
+  digitalWrite(RESET, HIGH);
40
+  delay(10);
41
+  digitalWrite(RESET, LOW);
42
+  delay(10);
43
+  digitalWrite(RESET, HIGH);
44
+  delay(10);
45
+#endif
46
+  
47
+  
48
+  // initialize SPI for the dSPIN chip's needs:
49
+  // most significant bit first,
50
+  // SPI clock not to exceed 5MHz,
51
+  // SPI_MODE3 (clock idle high, latch data on rising edge of clock)
52
+  SPI.begin();
53
+  SPI.setBitOrder(MSBFIRST);
54
+  SPI.setClockDivider(SPI_CLOCK_DIV16); // or 2, 8, 16, 32, 64
55
+  SPI.setDataMode(SPI_MODE3);
56
+  
57
+  // First things first: let's check communications. The CONFIG register should
58
+  // power up to 0x2E88, so we can use that to check the communications.
59
+  if (GetParam(CONFIG) == 0x2E88){
60
+    //Serial.println('good to go');
61
+  }
62
+  else{
63
+    //Serial.println('Comm issue');
64
+  }
65
+
66
+#if  (ENABLE_RESET_PIN == 0) 
67
+  resetDev();
68
+#endif
69
+  // First, let's set the step mode register:
70
+  // - SYNC_EN controls whether the BUSY/SYNC pin reflects the step
71
+  // frequency or the BUSY status of the chip. We want it to be the BUSY
72
+  // status.
73
+  // - STEP_SEL_x is the microstepping rate- we'll go full step.
74
+  // - SYNC_SEL_x is the ratio of (micro)steps to toggles on the
75
+  // BUSY/SYNC pin (when that pin is used for SYNC). Make it 1:1, despite
76
+  // not using that pin.
77
+  //SetParam(STEP_MODE, !SYNC_EN | STEP_SEL_1 | SYNC_SEL_1);
78
+  
79
+  
80
+  SetParam(KVAL_RUN, k_value);
81
+  SetParam(KVAL_ACC, k_value);
82
+  SetParam(KVAL_DEC, k_value);
83
+  SetParam(KVAL_HOLD, k_value);
84
+  
85
+  // Set up the CONFIG register as follows:
86
+  // PWM frequency divisor = 1
87
+  // PWM frequency multiplier = 2 (62.5kHz PWM frequency)
88
+  // Slew rate is 290V/us
89
+  // Do NOT shut down bridges on overcurrent
90
+  // Disable motor voltage compensation
91
+  // Hard stop on switch low
92
+  // 16MHz internal oscillator, nothing on output
93
+  SetParam(CONFIG, CONFIG_PWM_DIV_1 | CONFIG_PWM_MUL_2 | CONFIG_SR_290V_us| CONFIG_OC_SD_DISABLE | CONFIG_VS_COMP_DISABLE | CONFIG_SW_HARD_STOP | CONFIG_INT_16MHZ);
94
+  // Configure the RUN KVAL. This defines the duty cycle of the PWM of the bridges
95
+  // during running. 0xFF means that they are essentially NOT PWMed during run; this
96
+  // MAY result in more power being dissipated than you actually need for the task.
97
+  // Setting this value too low may result in failure to turn.
98
+  // There are ACC, DEC, and HOLD KVAL registers as well; you may need to play with
99
+  // those values to get acceptable performance for a given application.
100
+  //SetParam(KVAL_RUN, 0xFF);
101
+  // Calling GetStatus() clears the UVLO bit in the status register, which is set by
102
+  // default on power-up. The driver may not run without that bit cleared by this
103
+  // read operation.
104
+  getStatus();
105
+  
106
+  hardStop(); //engage motors
107
+}
108
+
109
+boolean L6470::isBusy(){
110
+  int status = getStatus();
111
+  return !((status >> 1) & 0b1);
112
+}
113
+
114
+void L6470::setMicroSteps(int microSteps){
115
+  byte stepVal = 0;
116
+  
117
+  for(stepVal = 0; stepVal < 8; stepVal++){
118
+    if(microSteps == 1) break;
119
+    microSteps = microSteps >> 1;
120
+  }
121
+
122
+  SetParam(STEP_MODE, !SYNC_EN | stepVal | SYNC_SEL_1);
123
+}
124
+
125
+void L6470::setThresholdSpeed(float thresholdSpeed){
126
+  // Configure the FS_SPD register- this is the speed at which the driver ceases
127
+  // microstepping and goes to full stepping. FSCalc() converts a value in steps/s
128
+  // to a value suitable for this register; to disable full-step switching, you
129
+  // can pass 0x3FF to this register.
130
+  
131
+  if(thresholdSpeed == 0.0){
132
+    SetParam(FS_SPD, 0x3FF);
133
+  }
134
+  else{
135
+    SetParam(FS_SPD, FSCalc(thresholdSpeed));	
136
+  }
137
+}
138
+
139
+
140
+void L6470::setCurrent(int current){}
141
+
142
+
143
+
144
+void L6470::setMaxSpeed(int speed){
145
+  // Configure the MAX_SPEED register- this is the maximum number of (micro)steps per
146
+  // second allowed. You'll want to mess around with your desired application to see
147
+  // how far you can push it before the motor starts to slip. The ACTUAL parameter
148
+  // passed to this function is in steps/tick; MaxSpdCalc() will convert a number of
149
+  // steps/s into an appropriate value for this function. Note that for any move or
150
+  // goto type function where no speed is specified, this value will be used.
151
+  SetParam(MAX_SPEED, MaxSpdCalc(speed));
152
+}
153
+
154
+
155
+void L6470::setMinSpeed(int speed){
156
+  // Configure the MAX_SPEED register- this is the maximum number of (micro)steps per
157
+  // second allowed. You'll want to mess around with your desired application to see
158
+  // how far you can push it before the motor starts to slip. The ACTUAL parameter
159
+  // passed to this function is in steps/tick; MaxSpdCalc() will convert a number of
160
+  // steps/s into an appropriate value for this function. Note that for any move or
161
+  // goto type function where no speed is specified, this value will be used.
162
+  SetParam(MIN_SPEED, MinSpdCalc(speed));
163
+}
164
+
165
+
166
+
167
+
168
+void L6470::setAcc(float acceleration){
169
+  // Configure the acceleration rate, in steps/tick/tick. There is also a DEC register;
170
+  // both of them have a function (AccCalc() and DecCalc() respectively) that convert
171
+  // from steps/s/s into the appropriate value for the register. Writing ACC to 0xfff
172
+  // sets the acceleration and deceleration to 'infinite' (or as near as the driver can
173
+  // manage). If ACC is set to 0xfff, DEC is ignored. To get infinite deceleration
174
+  // without infinite acceleration, only hard stop will work.
175
+  unsigned long accelerationBYTES = AccCalc(acceleration);
176
+  SetParam(ACC, accelerationBYTES);
177
+}
178
+
179
+
180
+void L6470::setDec(float deceleration){
181
+  unsigned long decelerationBYTES = DecCalc(deceleration);
182
+  SetParam(DEC, decelerationBYTES);
183
+}
184
+
185
+
186
+long L6470::getPos(){
187
+  unsigned long position = GetParam(ABS_POS);
188
+  return convert(position);
189
+}
190
+
191
+float L6470::getSpeed(){
192
+  /*
193
+  SPEED
194
+  The SPEED register contains the current motor speed, expressed in step/tick (format unsigned fixed point 0.28).
195
+  In order to convert the SPEED value in step/s the following formula can be used:
196
+  Equation 4
197
+  where SPEED is the integer number stored into the register and tick is 250 ns.
198
+  The available range is from 0 to 15625 step/s with a resolution of 0.015 step/s.
199
+  Note: The range effectively available to the user is limited by the MAX_SPEED parameter.
200
+  */
201
+  
202
+  return (float) GetParam(SPEED);
203
+  //return (float) speed * pow(8, -22);
204
+  //return FSCalc(speed); NEEDS FIX
205
+}
206
+
207
+
208
+void L6470::setOverCurrent(unsigned int ma_current){
209
+  // Configure the overcurrent detection threshold.
210
+  byte OCValue = floor(ma_current / 375);
211
+  if(OCValue > 0x0F)OCValue = 0x0F;
212
+  SetParam(OCD_TH, OCValue);
213
+}
214
+
215
+void L6470::setStallCurrent(float ma_current){
216
+  byte STHValue = (byte)floor(ma_current / 31.25);
217
+  if(STHValue > 0x80)STHValue = 0x80;
218
+  if(STHValue < 0)STHValue = 0;
219
+  SetParam(STALL_TH, STHValue);
220
+}
221
+
222
+void L6470::SetLowSpeedOpt(boolean enable){
223
+  // Enable or disable the low-speed optimization option. If enabling,
224
+  // the other 12 bits of the register will be automatically zero.
225
+  // When disabling, the value will have to be explicitly written by
226
+  // the user with a SetParam() call. See the datasheet for further
227
+  // information about low-speed optimization.
228
+  Xfer(SET_PARAM | MIN_SPEED);
229
+  if (enable) Param(0x1000, 13);
230
+  else Param(0, 13);
231
+}
232
+
233
+
234
+void L6470::run(byte dir, float spd){
235
+  // RUN sets the motor spinning in a direction (defined by the constants
236
+  // FWD and REV). Maximum speed and minimum speed are defined
237
+  // by the MAX_SPEED and MIN_SPEED registers; exceeding the FS_SPD value
238
+  // will switch the device into full-step mode.
239
+  // The SpdCalc() function is provided to convert steps/s values into
240
+  // appropriate integer values for this function.
241
+  unsigned long speedVal = SpdCalc(spd);
242
+  
243
+  Xfer(RUN | dir);
244
+  if (speedVal > 0xFFFFF) speedVal = 0xFFFFF;
245
+  Xfer((byte)(speedVal >> 16));
246
+  Xfer((byte)(speedVal >> 8));
247
+  Xfer((byte)(speedVal));
248
+}
249
+
250
+
251
+void L6470::Step_Clock(byte dir){
252
+  // STEP_CLOCK puts the device in external step clocking mode. When active,
253
+  // pin 25, STCK, becomes the step clock for the device, and steps it in
254
+  // the direction (set by the FWD and REV constants) imposed by the call
255
+  // of this function. Motion commands (RUN, MOVE, etc) will cause the device
256
+  // to exit step clocking mode.
257
+  Xfer(STEP_CLOCK | dir);
258
+}
259
+
260
+void L6470::move(long n_step){
261
+  // MOVE will send the motor n_step steps (size based on step mode) in the
262
+  // direction imposed by dir (FWD or REV constants may be used). The motor
263
+  // will accelerate according the acceleration and deceleration curves, and
264
+  // will run at MAX_SPEED. Stepping mode will adhere to FS_SPD value, as well.
265
+  
266
+  byte dir;
267
+  
268
+  if(n_step >= 0){
269
+    dir = FWD;
270
+  }
271
+  else{
272
+    dir = REV;
273
+  }
274
+
275
+  long n_stepABS = abs(n_step);
276
+  
277
+  Xfer(MOVE | dir); //set direction
278
+  if (n_stepABS > 0x3FFFFF) n_step = 0x3FFFFF;
279
+  Xfer((byte)(n_stepABS >> 16));
280
+  Xfer((byte)(n_stepABS >> 8));
281
+  Xfer((byte)(n_stepABS));
282
+}
283
+
284
+void L6470::goTo(long pos){
285
+  // GOTO operates much like MOVE, except it produces absolute motion instead
286
+  // of relative motion. The motor will be moved to the indicated position
287
+  // in the shortest possible fashion.
288
+  
289
+  Xfer(GOTO);
290
+  if (pos > 0x3FFFFF) pos = 0x3FFFFF;
291
+  Xfer((byte)(pos >> 16));
292
+  Xfer((byte)(pos >> 8));
293
+  Xfer((byte)(pos));
294
+}
295
+
296
+
297
+void L6470::goTo_DIR(byte dir, long pos){
298
+  // Same as GOTO, but with user constrained rotational direction.
299
+  
300
+  Xfer(GOTO_DIR);
301
+  if (pos > 0x3FFFFF) pos = 0x3FFFFF;
302
+  Xfer((byte)(pos >> 16));
303
+  Xfer((byte)(pos >> 8));
304
+  Xfer((byte)(pos));
305
+}
306
+
307
+void L6470::goUntil(byte act, byte dir, unsigned long spd){
308
+  // GoUntil will set the motor running with direction dir (REV or
309
+  // FWD) until a falling edge is detected on the SW pin. Depending
310
+  // on bit SW_MODE in CONFIG, either a hard stop or a soft stop is
311
+  // performed at the falling edge, and depending on the value of
312
+  // act (either RESET or COPY) the value in the ABS_POS register is
313
+  // either RESET to 0 or COPY-ed into the MARK register.
314
+  Xfer(GO_UNTIL | act | dir);
315
+  if (spd > 0x3FFFFF) spd = 0x3FFFFF;
316
+  Xfer((byte)(spd >> 16));
317
+  Xfer((byte)(spd >> 8));
318
+  Xfer((byte)(spd));
319
+}
320
+
321
+void L6470::releaseSW(byte act, byte dir){
322
+  // Similar in nature to GoUntil, ReleaseSW produces motion at the
323
+  // higher of two speeds: the value in MIN_SPEED or 5 steps/s.
324
+  // The motor continues to run at this speed until a rising edge
325
+  // is detected on the switch input, then a hard stop is performed
326
+  // and the ABS_POS register is either COPY-ed into MARK or RESET to
327
+  // 0, depending on whether RESET or COPY was passed to the function
328
+  // for act.
329
+  Xfer(RELEASE_SW | act | dir);
330
+}
331
+
332
+void L6470::goHome(){
333
+  // GoHome is equivalent to GoTo(0), but requires less time to send.
334
+  // Note that no direction is provided; motion occurs through shortest
335
+  // path. If a direction is required, use GoTo_DIR().
336
+  Xfer(GO_HOME);
337
+}
338
+
339
+void L6470::goMark(){
340
+  // GoMark is equivalent to GoTo(MARK), but requires less time to send.
341
+  // Note that no direction is provided; motion occurs through shortest
342
+  // path. If a direction is required, use GoTo_DIR().
343
+  Xfer(GO_MARK);
344
+}
345
+
346
+
347
+void L6470::setMark(long value){
348
+
349
+  Xfer(MARK);
350
+  if (value > 0x3FFFFF) value = 0x3FFFFF;
351
+  if (value < -0x3FFFFF) value = -0x3FFFFF;
352
+  
353
+  
354
+  Xfer((byte)(value >> 16));
355
+  Xfer((byte)(value >> 8));
356
+  Xfer((byte)(value));
357
+}
358
+
359
+
360
+void L6470::setMark(){
361
+  long value = getPos();
362
+  
363
+  Xfer(MARK);
364
+  if (value > 0x3FFFFF) value = 0x3FFFFF;
365
+  if (value < -0x3FFFFF) value = -0x3FFFFF;
366
+  
367
+  
368
+  Xfer((byte)(value >> 16));
369
+  Xfer((byte)(value >> 8));
370
+  Xfer((byte)(value));
371
+}
372
+
373
+void L6470::setAsHome(){
374
+  // Sets the ABS_POS register to 0, effectively declaring the current
375
+  // position to be "HOME".
376
+  Xfer(RESET_POS);
377
+}
378
+
379
+void L6470::resetDev(){
380
+  // Reset device to power up conditions. Equivalent to toggling the STBY
381
+  // pin or cycling power.
382
+  Xfer(RESET_DEVICE);
383
+}
384
+
385
+void L6470::softStop(){
386
+  // Bring the motor to a halt using the deceleration curve.
387
+  Xfer(SOFT_STOP);
388
+}
389
+
390
+void L6470::hardStop(){
391
+  // Stop the motor right away. No deceleration.
392
+  Xfer(HARD_STOP);
393
+}
394
+
395
+void L6470::softFree(){
396
+  // Decelerate the motor and disengage
397
+  Xfer(SOFT_HIZ);
398
+}
399
+
400
+void L6470::free(){
401
+  // disengage the motor immediately with no deceleration.
402
+  Xfer(HARD_HIZ);
403
+}
404
+
405
+int L6470::getStatus(){
406
+  // Fetch and return the 16-bit value in the STATUS register. Resets
407
+  // any warning flags and exits any error states. Using GetParam()
408
+  // to read STATUS does not clear these values.
409
+  int temp = 0;
410
+  Xfer(GET_STATUS);
411
+  temp = Xfer(0)<<8;
412
+  temp |= Xfer(0);
413
+  return temp;
414
+}
415
+
416
+unsigned long L6470::AccCalc(float stepsPerSecPerSec){
417
+  // The value in the ACC register is [(steps/s/s)*(tick^2)]/(2^-40) where tick is
418
+  // 250ns (datasheet value)- 0x08A on boot.
419
+  // Multiply desired steps/s/s by .137438 to get an appropriate value for this register.
420
+  // This is a 12-bit value, so we need to make sure the value is at or below 0xFFF.
421
+  float temp = stepsPerSecPerSec * 0.137438;
422
+  if( (unsigned long) long(temp) > 0x00000FFF) return 0x00000FFF;
423
+  else return (unsigned long) long(temp);
424
+}
425
+
426
+
427
+unsigned long L6470::DecCalc(float stepsPerSecPerSec){
428
+  // The calculation for DEC is the same as for ACC. Value is 0x08A on boot.
429
+  // This is a 12-bit value, so we need to make sure the value is at or below 0xFFF.
430
+  float temp = stepsPerSecPerSec * 0.137438;
431
+  if( (unsigned long) long(temp) > 0x00000FFF) return 0x00000FFF;
432
+  else return (unsigned long) long(temp);
433
+}
434
+
435
+unsigned long L6470::MaxSpdCalc(float stepsPerSec){
436
+  // The value in the MAX_SPD register is [(steps/s)*(tick)]/(2^-18) where tick is
437
+  // 250ns (datasheet value)- 0x041 on boot.
438
+  // Multiply desired steps/s by .065536 to get an appropriate value for this register
439
+  // This is a 10-bit value, so we need to make sure it remains at or below 0x3FF
440
+  float temp = stepsPerSec * .065536;
441
+  if( (unsigned long) long(temp) > 0x000003FF) return 0x000003FF;
442
+  else return (unsigned long) long(temp);
443
+}
444
+
445
+unsigned long L6470::MinSpdCalc(float stepsPerSec){
446
+  // The value in the MIN_SPD register is [(steps/s)*(tick)]/(2^-24) where tick is
447
+  // 250ns (datasheet value)- 0x000 on boot.
448
+  // Multiply desired steps/s by 4.1943 to get an appropriate value for this register
449
+  // This is a 12-bit value, so we need to make sure the value is at or below 0xFFF.
450
+  float temp = stepsPerSec * 4.1943;
451
+  if( (unsigned long) long(temp) > 0x00000FFF) return 0x00000FFF;
452
+  else return (unsigned long) long(temp);
453
+}
454
+
455
+unsigned long L6470::FSCalc(float stepsPerSec){
456
+  // The value in the FS_SPD register is ([(steps/s)*(tick)]/(2^-18))-0.5 where tick is
457
+  // 250ns (datasheet value)- 0x027 on boot.
458
+  // Multiply desired steps/s by .065536 and subtract .5 to get an appropriate value for this register
459
+  // This is a 10-bit value, so we need to make sure the value is at or below 0x3FF.
460
+  float temp = (stepsPerSec * .065536)-.5;
461
+  if( (unsigned long) long(temp) > 0x000003FF) return 0x000003FF;
462
+  else return (unsigned long) long(temp);
463
+}
464
+
465
+unsigned long L6470::IntSpdCalc(float stepsPerSec){
466
+  // The value in the INT_SPD register is [(steps/s)*(tick)]/(2^-24) where tick is
467
+  // 250ns (datasheet value)- 0x408 on boot.
468
+  // Multiply desired steps/s by 4.1943 to get an appropriate value for this register
469
+  // This is a 14-bit value, so we need to make sure the value is at or below 0x3FFF.
470
+  float temp = stepsPerSec * 4.1943;
471
+  if( (unsigned long) long(temp) > 0x00003FFF) return 0x00003FFF;
472
+  else return (unsigned long) long(temp);
473
+}
474
+
475
+unsigned long L6470::SpdCalc(float stepsPerSec){
476
+  // When issuing RUN command, the 20-bit speed is [(steps/s)*(tick)]/(2^-28) where tick is
477
+  // 250ns (datasheet value).
478
+  // Multiply desired steps/s by 67.106 to get an appropriate value for this register
479
+  // This is a 20-bit value, so we need to make sure the value is at or below 0xFFFFF.
480
+  
481
+  float temp = stepsPerSec * 67.106;
482
+  if( (unsigned long) long(temp) > 0x000FFFFF) return 0x000FFFFF;
483
+  else return (unsigned long)temp;
484
+}
485
+
486
+unsigned long L6470::Param(unsigned long value, byte bit_len){
487
+  // Generalization of the subsections of the register read/write functionality.
488
+  // We want the end user to just write the value without worrying about length,
489
+  // so we pass a bit length parameter from the calling function.
490
+  unsigned long ret_val=0; // We'll return this to generalize this function
491
+  // for both read and write of registers.
492
+  byte byte_len = bit_len/8; // How many BYTES do we have?
493
+  if (bit_len%8 > 0) byte_len++; // Make sure not to lose any partial byte values.
494
+  // Let's make sure our value has no spurious bits set, and if the value was too
495
+  // high, max it out.
496
+  unsigned long mask = 0xffffffff >> (32-bit_len);
497
+  if (value > mask) value = mask;
498
+  // The following three if statements handle the various possible byte length
499
+  // transfers- it'll be no less than 1 but no more than 3 bytes of data.
500
+  // L6470::Xfer() sends a byte out through SPI and returns a byte received
501
+  // over SPI- when calling it, we typecast a shifted version of the masked
502
+  // value, then we shift the received value back by the same amount and
503
+  // store it until return time.
504
+  if (byte_len == 3) {
505
+    ret_val |= long(Xfer((byte)(value>>16))) << 16;
506
+    //Serial.println(ret_val, HEX);
507
+  }
508
+  if (byte_len >= 2) {
509
+    ret_val |= long(Xfer((byte)(value>>8))) << 8;
510
+    //Serial.println(ret_val, HEX);
511
+  }
512
+  if (byte_len >= 1) {
513
+    ret_val |= Xfer((byte)value);
514
+    //Serial.println(ret_val, HEX);
515
+  }
516
+  // Return the received values. Mask off any unnecessary bits, just for
517
+  // the sake of thoroughness- we don't EXPECT to see anything outside
518
+  // the bit length range but better to be safe than sorry.
519
+  return (ret_val & mask);
520
+}
521
+
522
+byte L6470::Xfer(byte data){
523
+  // This simple function shifts a byte out over SPI and receives a byte over
524
+  // SPI. Unusually for SPI devices, the dSPIN requires a toggling of the
525
+  // CS (slaveSelect) pin after each byte sent. That makes this function
526
+  // a bit more reasonable, because we can include more functionality in it.
527
+  byte data_out;
528
+  digitalWrite(_SSPin,LOW);
529
+  // SPI.transfer() both shifts a byte out on the MOSI pin AND receives a
530
+  // byte in on the MISO pin.
531
+  data_out = SPI.transfer(data);
532
+  digitalWrite(_SSPin,HIGH);
533
+  return data_out;
534
+}
535
+
536
+
537
+
538
+void L6470::SetParam(byte param, unsigned long value){
539
+  Xfer(SET_PARAM | param);
540
+  ParamHandler(param, value);
541
+}
542
+
543
+unsigned long L6470::GetParam(byte param){
544
+  // Realize the "get parameter" function, to read from the various registers in
545
+  // the dSPIN chip.
546
+  Xfer(GET_PARAM | param);
547
+  return ParamHandler(param, 0);
548
+}
549
+
550
+long L6470::convert(unsigned long val){
551
+  //convert 22bit 2s comp to signed long
552
+  int MSB = val >> 21;
553
+  
554
+  val = val << 11;
555
+  val = val >> 11;
556
+  
557
+  if(MSB == 1) val = val | 0b11111111111000000000000000000000;
558
+  return val;
559
+}
560
+
561
+unsigned long L6470::ParamHandler(byte param, unsigned long value){
562
+  // Much of the functionality between "get parameter" and "set parameter" is
563
+  // very similar, so we deal with that by putting all of it in one function
564
+  // here to save memory space and simplify the program.
565
+  unsigned long ret_val = 0; // This is a temp for the value to return.
566
+  // This switch structure handles the appropriate action for each register.
567
+  // This is necessary since not all registers are of the same length, either
568
+  // bit-wise or byte-wise, so we want to make sure we mask out any spurious
569
+  // bits and do the right number of transfers. That is handled by the dSPIN_Param()
570
+  // function, in most cases, but for 1-byte or smaller transfers, we call
571
+  // Xfer() directly.
572
+  switch (param)
573
+  {
574
+    // ABS_POS is the current absolute offset from home. It is a 22 bit number expressed
575
+    // in two's complement. At power up, this value is 0. It cannot be written when
576
+    // the motor is running, but at any other time, it can be updated to change the
577
+    // interpreted position of the motor.
578
+    case ABS_POS:
579
+      ret_val = Param(value, 22);
580
+      break;
581
+    // EL_POS is the current electrical position in the step generation cycle. It can
582
+    // be set when the motor is not in motion. Value is 0 on power up.
583
+    case EL_POS:
584
+      ret_val = Param(value, 9);
585
+      break;
586
+    // MARK is a second position other than 0 that the motor can be told to go to. As
587
+    // with ABS_POS, it is 22-bit two's complement. Value is 0 on power up.
588
+    case MARK:
589
+      ret_val = Param(value, 22);
590
+      break;
591
+    // SPEED contains information about the current speed. It is read-only. It does
592
+    // NOT provide direction information.
593
+    case SPEED:
594
+      ret_val = Param(0, 20);
595
+      break;
596
+    // ACC and DEC set the acceleration and deceleration rates. Set ACC to 0xFFF
597
+    // to get infinite acceleration/decelaeration- there is no way to get infinite
598
+    // deceleration w/o infinite acceleration (except the HARD STOP command).
599
+    // Cannot be written while motor is running. Both default to 0x08A on power up.
600
+    // AccCalc() and DecCalc() functions exist to convert steps/s/s values into
601
+    // 12-bit values for these two registers.
602
+    case ACC:
603
+      ret_val = Param(value, 12);
604
+      break;
605
+    case DEC:
606
+      ret_val = Param(value, 12);
607
+      break;
608
+    // MAX_SPEED is just what it says- any command which attempts to set the speed
609
+    // of the motor above this value will simply cause the motor to turn at this
610
+    // speed. Value is 0x041 on power up.
611
+    // MaxSpdCalc() function exists to convert steps/s value into a 10-bit value
612
+    // for this register.
613
+    case MAX_SPEED:
614
+      ret_val = Param(value, 10);
615
+      break;
616
+    // MIN_SPEED controls two things- the activation of the low-speed optimization
617
+    // feature and the lowest speed the motor will be allowed to operate at. LSPD_OPT
618
+    // is the 13th bit, and when it is set, the minimum allowed speed is automatically
619
+    // set to zero. This value is 0 on startup.
620
+    // MinSpdCalc() function exists to convert steps/s value into a 12-bit value for this
621
+    // register. SetLowSpeedOpt() function exists to enable/disable the optimization feature.
622
+    case MIN_SPEED:
623
+      ret_val = Param(value, 12);
624
+      break;
625
+    // FS_SPD register contains a threshold value above which microstepping is disabled
626
+    // and the dSPIN operates in full-step mode. Defaults to 0x027 on power up.
627
+    // FSCalc() function exists to convert steps/s value into 10-bit integer for this
628
+    // register.
629
+    case FS_SPD:
630
+      ret_val = Param(value, 10);
631
+      break;
632
+    // KVAL is the maximum voltage of the PWM outputs. These 8-bit values are ratiometric
633
+    // representations: 255 for full output voltage, 128 for half, etc. Default is 0x29.
634
+    // The implications of different KVAL settings is too complex to dig into here, but
635
+    // it will usually work to max the value for RUN, ACC, and DEC. Maxing the value for
636
+    // HOLD may result in excessive power dissipation when the motor is not running.
637
+    case KVAL_HOLD:
638
+      ret_val = Xfer((byte)value);
639
+      break;
640
+    case KVAL_RUN:
641
+      ret_val = Xfer((byte)value);
642
+      break;
643
+    case KVAL_ACC:
644
+      ret_val = Xfer((byte)value);
645
+      break;
646
+    case KVAL_DEC:
647
+      ret_val = Xfer((byte)value);
648
+      break;
649
+    // INT_SPD, ST_SLP, FN_SLP_ACC and FN_SLP_DEC are all related to the back EMF
650
+    // compensation functionality. Please see the datasheet for details of this
651
+    // function- it is too complex to discuss here. Default values seem to work
652
+    // well enough.
653
+    case INT_SPD:
654
+      ret_val = Param(value, 14);
655
+      break;
656
+    case ST_SLP:
657
+      ret_val = Xfer((byte)value);
658
+      break;
659
+    case FN_SLP_ACC:
660
+      ret_val = Xfer((byte)value);
661
+      break;
662
+    case FN_SLP_DEC:
663
+      ret_val = Xfer((byte)value);
664
+      break;
665
+    // K_THERM is motor winding thermal drift compensation. Please see the datasheet
666
+    // for full details on operation- the default value should be okay for most users.
667
+    case K_THERM:
668
+      ret_val = Xfer((byte)value & 0x0F);
669
+      break;
670
+    // ADC_OUT is a read-only register containing the result of the ADC measurements.
671
+    // This is less useful than it sounds; see the datasheet for more information.
672
+    case ADC_OUT:
673
+      ret_val = Xfer(0);
674
+      break;
675
+    // Set the overcurrent threshold. Ranges from 375mA to 6A in steps of 375mA.
676
+    // A set of defined constants is provided for the user's convenience. Default
677
+    // value is 3.375A- 0x08. This is a 4-bit value.
678
+    case OCD_TH:
679
+      ret_val = Xfer((byte)value & 0x0F);
680
+      break;
681
+    // Stall current threshold. Defaults to 0x40, or 2.03A. Value is from 31.25mA to
682
+    // 4A in 31.25mA steps. This is a 7-bit value.
683
+    case STALL_TH:
684
+      ret_val = Xfer((byte)value & 0x7F);
685
+      break;
686
+    // STEP_MODE controls the microstepping settings, as well as the generation of an
687
+    // output signal from the dSPIN. Bits 2:0 control the number of microsteps per
688
+    // step the part will generate. Bit 7 controls whether the BUSY/SYNC pin outputs
689
+    // a BUSY signal or a step synchronization signal. Bits 6:4 control the frequency
690
+    // of the output signal relative to the full-step frequency; see datasheet for
691
+    // that relationship as it is too complex to reproduce here.
692
+    // Most likely, only the microsteps per step value will be needed; there is a set
693
+    // of constants provided for ease of use of these values.
694
+    case STEP_MODE:
695
+      ret_val = Xfer((byte)value);
696
+      break;
697
+    // ALARM_EN controls which alarms will cause the FLAG pin to fall. A set of constants
698
+    // is provided to make this easy to interpret. By default, ALL alarms will trigger the
699
+    // FLAG pin.
700
+    case ALARM_EN:
701
+      ret_val = Xfer((byte)value);
702
+      break;
703
+    // CONFIG contains some assorted configuration bits and fields. A fairly comprehensive
704
+    // set of reasonably self-explanatory constants is provided, but users should refer
705
+    // to the datasheet before modifying the contents of this register to be certain they
706
+    // understand the implications of their modifications. Value on boot is 0x2E88; this
707
+    // can be a useful way to verify proper start up and operation of the dSPIN chip.
708
+    case CONFIG:
709
+      ret_val = Param(value, 16);
710
+      break;
711
+      // STATUS contains read-only information about the current condition of the chip. A
712
+      // comprehensive set of constants for masking and testing this register is provided, but
713
+      // users should refer to the datasheet to ensure that they fully understand each one of
714
+      // the bits in the register.
715
+    case STATUS: // STATUS is a read-only register
716
+      ret_val = Param(0, 16);
717
+      break;
718
+    default:
719
+      ret_val = Xfer((byte)(value));
720
+    break;
721
+  }
722
+  return ret_val;
723
+}

+ 286
- 0
ArduinoAddons/Arduino_1.x.x/libraries/L6470/L6470.h View File

@@ -0,0 +1,286 @@
1
+////////////////////////////////////////////////////////////
2
+//ORIGINAL CODE 12/12/2011- Mike Hord, SparkFun Electronics
3
+//LIBRARY Created by Adam Meyer of bildr Aug 18th 2012
4
+//Released as MIT license
5
+////////////////////////////////////////////////////////////
6
+#ifndef L6470_h
7
+#define L6470_h
8
+
9
+#include <Arduino.h>
10
+#include <SPI.h>
11
+
12
+#define SLAVE_SELECT_PIN 38 // Wire this to the CSN pin
13
+// #define RESET 6 // Wire this to the STBY line
14
+#define BUSYN 7 // Wire this to the BSYN line
15
+
16
+// constant definitions for overcurrent thresholds. Write these values to
17
+// register dSPIN_OCD_TH to set the level at which an overcurrent even occurs.
18
+#define OCD_TH_375mA 0x00
19
+#define OCD_TH_750mA 0x01
20
+#define OCD_TH_1125mA 0x02
21
+#define OCD_TH_1500mA 0x03
22
+#define OCD_TH_1875mA 0x04
23
+#define OCD_TH_2250mA 0x05
24
+#define OCD_TH_2625mA 0x06
25
+#define OCD_TH_3000mA 0x07
26
+#define OCD_TH_3375mA 0x08
27
+#define OCD_TH_3750mA 0x09
28
+#define OCD_TH_4125mA 0x0A
29
+#define OCD_TH_4500mA 0x0B
30
+#define OCD_TH_4875mA 0x0C
31
+#define OCD_TH_5250mA 0x0D
32
+#define OCD_TH_5625mA 0x0E
33
+#define OCD_TH_6000mA 0x0F
34
+
35
+// STEP_MODE option values.
36
+// First comes the "microsteps per step" options...
37
+#define STEP_MODE_STEP_SEL 0x07 // Mask for these bits only.
38
+#define STEP_SEL_1 0x00
39
+#define STEP_SEL_1_2 0x01
40
+#define STEP_SEL_1_4 0x02
41
+#define STEP_SEL_1_8 0x03
42
+#define STEP_SEL_1_16 0x04
43
+#define STEP_SEL_1_32 0x05
44
+#define STEP_SEL_1_64 0x06
45
+#define STEP_SEL_1_128 0x07
46
+
47
+// ...next, define the SYNC_EN bit. When set, the BUSYN pin will instead
48
+// output a clock related to the full-step frequency as defined by the
49
+// SYNC_SEL bits below.
50
+#define STEP_MODE_SYNC_EN 0x80 // Mask for this bit
51
+#define SYNC_EN 0x80
52
+
53
+// ...last, define the SYNC_SEL modes. The clock output is defined by
54
+// the full-step frequency and the value in these bits- see the datasheet
55
+// for a matrix describing that relationship (page 46).
56
+#define STEP_MODE_SYNC_SEL 0x70
57
+#define SYNC_SEL_1_2 0x00
58
+#define SYNC_SEL_1 0x10
59
+#define SYNC_SEL_2 0x20
60
+#define SYNC_SEL_4 0x30
61
+#define SYNC_SEL_8 0x40
62
+#define SYNC_SEL_16 0x50
63
+#define SYNC_SEL_32 0x60
64
+#define SYNC_SEL_64 0x70
65
+
66
+// Bit names for the ALARM_EN register.
67
+// Each of these bits defines one potential alarm condition.
68
+// When one of these conditions occurs and the respective bit in ALARM_EN is set,
69
+// the FLAG pin will go low. The register must be queried to determine which event
70
+// caused the alarm.
71
+#define ALARM_EN_OVERCURRENT 0x01
72
+#define ALARM_EN_THERMAL_SHUTDOWN 0x02
73
+#define ALARM_EN_THERMAL_WARNING 0x04
74
+#define ALARM_EN_UNDER_VOLTAGE 0x08
75
+#define ALARM_EN_STALL_DET_A 0x10
76
+#define ALARM_EN_STALL_DET_B 0x20
77
+#define ALARM_EN_SW_TURN_ON 0x40
78
+#define ALARM_EN_WRONG_NPERF_CMD 0x80
79
+
80
+// CONFIG register renames.
81
+
82
+// Oscillator options.
83
+// The dSPIN needs to know what the clock frequency is because it uses that for some
84
+// calculations during operation.
85
+#define CONFIG_OSC_SEL 0x000F // Mask for this bit field.
86
+#define CONFIG_INT_16MHZ 0x0000 // Internal 16MHz, no output
87
+#define CONFIG_INT_16MHZ_OSCOUT_2MHZ 0x0008 // Default; internal 16MHz, 2MHz output
88
+#define CONFIG_INT_16MHZ_OSCOUT_4MHZ 0x0009 // Internal 16MHz, 4MHz output
89
+#define CONFIG_INT_16MHZ_OSCOUT_8MHZ 0x000A // Internal 16MHz, 8MHz output
90
+#define CONFIG_INT_16MHZ_OSCOUT_16MHZ 0x000B // Internal 16MHz, 16MHz output
91
+#define CONFIG_EXT_8MHZ_XTAL_DRIVE 0x0004 // External 8MHz crystal
92
+#define CONFIG_EXT_16MHZ_XTAL_DRIVE 0x0005 // External 16MHz crystal
93
+#define CONFIG_EXT_24MHZ_XTAL_DRIVE 0x0006 // External 24MHz crystal
94
+#define CONFIG_EXT_32MHZ_XTAL_DRIVE 0x0007 // External 32MHz crystal
95
+#define CONFIG_EXT_8MHZ_OSCOUT_INVERT 0x000C // External 8MHz crystal, output inverted
96
+#define CONFIG_EXT_16MHZ_OSCOUT_INVERT 0x000D // External 16MHz crystal, output inverted
97
+#define CONFIG_EXT_24MHZ_OSCOUT_INVERT 0x000E // External 24MHz crystal, output inverted
98
+#define CONFIG_EXT_32MHZ_OSCOUT_INVERT 0x000F // External 32MHz crystal, output inverted
99
+
100
+// Configure the functionality of the external switch input
101
+#define CONFIG_SW_MODE 0x0010 // Mask for this bit.
102
+#define CONFIG_SW_HARD_STOP 0x0000 // Default; hard stop motor on switch.
103
+#define CONFIG_SW_USER 0x0010 // Tie to the GoUntil and ReleaseSW
104
+                                                    // commands to provide jog function.
105
+                                                    // See page 25 of datasheet.
106
+
107
+// Configure the motor voltage compensation mode (see page 34 of datasheet)
108
+#define CONFIG_EN_VSCOMP 0x0020 // Mask for this bit.
109
+#define CONFIG_VS_COMP_DISABLE 0x0000 // Disable motor voltage compensation.
110
+#define CONFIG_VS_COMP_ENABLE 0x0020 // Enable motor voltage compensation.
111
+
112
+// Configure overcurrent detection event handling
113
+#define CONFIG_OC_SD 0x0080 // Mask for this bit.
114
+#define CONFIG_OC_SD_DISABLE 0x0000 // Bridges do NOT shutdown on OC detect
115
+#define CONFIG_OC_SD_ENABLE 0x0080 // Bridges shutdown on OC detect
116
+
117
+// Configure the slew rate of the power bridge output
118
+#define CONFIG_POW_SR 0x0300 // Mask for this bit field.
119
+#define CONFIG_SR_180V_us 0x0000 // 180V/us
120
+#define CONFIG_SR_290V_us 0x0200 // 290V/us
121
+#define CONFIG_SR_530V_us 0x0300 // 530V/us
122
+
123
+// Integer divisors for PWM sinewave generation
124
+// See page 32 of the datasheet for more information on this.
125
+#define CONFIG_F_PWM_DEC 0x1C00 // mask for this bit field
126
+#define CONFIG_PWM_MUL_0_625 (0x00)<<10
127
+#define CONFIG_PWM_MUL_0_75 (0x01)<<10
128
+#define CONFIG_PWM_MUL_0_875 (0x02)<<10
129
+#define CONFIG_PWM_MUL_1 (0x03)<<10
130
+#define CONFIG_PWM_MUL_1_25 (0x04)<<10
131
+#define CONFIG_PWM_MUL_1_5 (0x05)<<10
132
+#define CONFIG_PWM_MUL_1_75 (0x06)<<10
133
+#define CONFIG_PWM_MUL_2 (0x07)<<10
134
+
135
+// Multiplier for the PWM sinewave frequency
136
+#define CONFIG_F_PWM_INT 0xE000 // mask for this bit field.
137
+#define CONFIG_PWM_DIV_1 (0x00)<<13
138
+#define CONFIG_PWM_DIV_2 (0x01)<<13
139
+#define CONFIG_PWM_DIV_3 (0x02)<<13
140
+#define CONFIG_PWM_DIV_4 (0x03)<<13
141
+#define CONFIG_PWM_DIV_5 (0x04)<<13
142
+#define CONFIG_PWM_DIV_6 (0x05)<<13
143
+#define CONFIG_PWM_DIV_7 (0x06)<<13
144
+
145
+// Status register bit renames- read-only bits conferring information about the
146
+// device to the user.
147
+#define STATUS_HIZ 0x0001 // high when bridges are in HiZ mode
148
+#define STATUS_BUSY 0x0002 // mirrors BUSY pin
149
+#define STATUS_SW_F 0x0004 // low when switch open, high when closed
150
+#define STATUS_SW_EVN 0x0008 // active high, set on switch falling edge,
151
+                                                    // cleared by reading STATUS
152
+#define STATUS_DIR 0x0010 // Indicates current motor direction.
153
+                                                    // High is FWD, Low is REV.
154
+#define STATUS_NOTPERF_CMD 0x0080 // Last command not performed.
155
+#define STATUS_WRONG_CMD 0x0100 // Last command not valid.
156
+#define STATUS_UVLO 0x0200 // Undervoltage lockout is active
157
+#define STATUS_TH_WRN 0x0400 // Thermal warning
158
+#define STATUS_TH_SD 0x0800 // Thermal shutdown
159
+#define STATUS_OCD 0x1000 // Overcurrent detected
160
+#define STATUS_STEP_LOSS_A 0x2000 // Stall detected on A bridge
161
+#define STATUS_STEP_LOSS_B 0x4000 // Stall detected on B bridge
162
+#define STATUS_SCK_MOD 0x8000 // Step clock mode is active
163
+
164
+// Status register motor status field
165
+#define STATUS_MOT_STATUS 0x0060 // field mask
166
+#define STATUS_MOT_STATUS_STOPPED (0x0000)<<13 // Motor stopped
167
+#define STATUS_MOT_STATUS_ACCELERATION (0x0001)<<13 // Motor accelerating
168
+#define STATUS_MOT_STATUS_DECELERATION (0x0002)<<13 // Motor decelerating
169
+#define STATUS_MOT_STATUS_CONST_SPD (0x0003)<<13 // Motor at constant speed
170
+
171
+// Register address redefines.
172
+// See the Param_Handler() function for more info about these.
173
+#define ABS_POS 0x01
174
+#define EL_POS 0x02
175
+#define MARK 0x03
176
+#define SPEED 0x04
177
+#define ACC 0x05
178
+#define DEC 0x06
179
+#define MAX_SPEED 0x07
180
+#define MIN_SPEED 0x08
181
+#define FS_SPD 0x15
182
+#define KVAL_HOLD 0x09
183
+#define KVAL_RUN 0x0A
184
+#define KVAL_ACC 0x0B
185
+#define KVAL_DEC 0x0C
186
+#define INT_SPD 0x0D
187
+#define ST_SLP 0x0E
188
+#define FN_SLP_ACC 0x0F
189
+#define FN_SLP_DEC 0x10
190
+#define K_THERM 0x11
191
+#define ADC_OUT 0x12
192
+#define OCD_TH 0x13
193
+#define STALL_TH 0x14
194
+#define STEP_MODE 0x16
195
+#define ALARM_EN 0x17
196
+#define CONFIG 0x18
197
+#define STATUS 0x19
198
+
199
+//dSPIN commands
200
+#define NOP 0x00
201
+#define SET_PARAM 0x00
202
+#define GET_PARAM 0x20
203
+#define RUN 0x50
204
+#define STEP_CLOCK 0x58
205
+#define MOVE 0x40
206
+#define GOTO 0x60
207
+#define GOTO_DIR 0x68
208
+#define GO_UNTIL 0x82
209
+#define RELEASE_SW 0x92
210
+#define GO_HOME 0x70
211
+#define GO_MARK 0x78
212
+#define RESET_POS 0xD8
213
+#define RESET_DEVICE 0xC0
214
+#define SOFT_STOP 0xB0
215
+#define HARD_STOP 0xB8
216
+#define SOFT_HIZ 0xA0
217
+#define HARD_HIZ 0xA8
218
+#define GET_STATUS 0xD0
219
+
220
+/* dSPIN direction options */
221
+#define FWD 0x01
222
+#define REV 0x00
223
+
224
+/* dSPIN action options */
225
+#define ACTION_RESET 0x00
226
+#define ACTION_COPY 0x01
227
+
228
+
229
+class L6470{
230
+
231
+  public:
232
+
233
+    L6470(int SSPin);
234
+    void init(int k_value);
235
+    void setMicroSteps(int microSteps);
236
+    void setCurrent(int current);
237
+    void setMaxSpeed(int speed);
238
+    void setMinSpeed(int speed);
239
+    void setAcc(float acceleration);
240
+    void setDec(float deceleration);
241
+    void setOverCurrent(unsigned int ma_current);
242
+    void setThresholdSpeed(float threshold);
243
+    void setStallCurrent(float ma_current);
244
+    
245
+    unsigned long ParamHandler(byte param, unsigned long value);
246
+    void SetLowSpeedOpt(boolean enable);
247
+    void run(byte dir, float spd);
248
+    void Step_Clock(byte dir);
249
+    void goHome();
250
+    void setAsHome();
251
+    void goMark();
252
+    void move(long n_step);
253
+    void goTo(long pos);
254
+    void goTo_DIR(byte dir, long pos);
255
+    void goUntil(byte act, byte dir, unsigned long spd);
256
+    boolean isBusy();
257
+    void releaseSW(byte act, byte dir);
258
+    float getSpeed();
259
+    long getPos();
260
+    void setMark();
261
+    void setMark(long value);
262
+    void resetPos();
263
+    void resetDev();
264
+    void softStop();
265
+    void hardStop();
266
+    void softFree();
267
+    void free();
268
+    int getStatus();
269
+	void SetParam(byte param, unsigned long value);
270
+
271
+  private:
272
+    long convert(unsigned long val);
273
+    unsigned long GetParam(byte param);
274
+    unsigned long AccCalc(float stepsPerSecPerSec);
275
+    unsigned long DecCalc(float stepsPerSecPerSec);
276
+    unsigned long MaxSpdCalc(float stepsPerSec);
277
+    unsigned long MinSpdCalc(float stepsPerSec);
278
+    unsigned long FSCalc(float stepsPerSec);
279
+    unsigned long IntSpdCalc(float stepsPerSec);
280
+    unsigned long SpdCalc(float stepsPerSec);
281
+    unsigned long Param(unsigned long value, byte bit_len);
282
+    byte Xfer(byte data);
283
+    int _SSPin;
284
+};
285
+
286
+#endif

+ 53
- 0
ArduinoAddons/Arduino_1.x.x/libraries/L6470/keywords.txt View File

@@ -0,0 +1,53 @@
1
+#######################################################
2
+# keywords.txt - keywords file for the L6470 library
3
+#
4
+# ORIGINAL CODE 12/12/2011- Mike Hord, SparkFun Electronics
5
+# Library by Adam Meyer of bildr Aug 18th 2012
6
+#
7
+# Released as MIT license
8
+#######################################################
9
+
10
+#######################################
11
+# Datatypes (KEYWORD1)
12
+#######################################
13
+
14
+L6470 KEYWORD1
15
+
16
+#######################################
17
+# Methods and Functions (KEYWORD2)
18
+#######################################
19
+
20
+L6470 				KEYWORD2
21
+init 				KEYWORD2
22
+setMicroSteps 		KEYWORD2
23
+setCurrent 			KEYWORD2
24
+setMaxSpeed 		KEYWORD2
25
+setMinSpeed 		KEYWORD2
26
+setAcc 				KEYWORD2
27
+setDec 				KEYWORD2
28
+setOverCurrent 		KEYWORD2
29
+setThresholdSpeed 	KEYWORD2
30
+setStallCurrent 	KEYWORD2
31
+ParamHandler 		KEYWORD2
32
+SetLowSpeedOpt 		KEYWORD2
33
+run 				KEYWORD2
34
+Step_Clock 			KEYWORD2
35
+goHome 				KEYWORD2
36
+goMark 				KEYWORD2
37
+move 				KEYWORD2
38
+goTo 				KEYWORD2
39
+goTo_DIR 			KEYWORD2
40
+goUntil 			KEYWORD2
41
+isBusy 				KEYWORD2
42
+releaseSW 			KEYWORD2
43
+resetPos			KEYWORD2
44
+resetDev 			KEYWORD2
45
+softStop			KEYWORD2
46
+hardStop 			KEYWORD2
47
+softHiZ 			KEYWORD2
48
+hardHiZ 			KEYWORD2
49
+getStatus 			KEYWORD2
50
+
51
+#######################################
52
+# Constants (LITERAL1)
53
+#######################################

+ 17
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/.gitignore View File

@@ -0,0 +1,17 @@
1
+#mac stuff
2
+.DS_Store
3
+
4
+#eclipse stuff
5
+.classpath
6
+.project
7
+
8
+#processing stuff 
9
+generated/
10
+examples/TMC26XMotorTester/processing/TMC26XMotorTest/application.*/
11
+examples/TMC26XMotorTester/processing/TMC26XMotorTest/application.*
12
+
13
+#eagle stuff
14
+schematics/*.b#?
15
+schematics/*.s#?
16
+
17
+*.zip

+ 1813
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/Doxyfile
File diff suppressed because it is too large
View File


+ 10
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/LICENSE View File

@@ -0,0 +1,10 @@
1
+
2
+Copyright (c) 2012 Interactive Matter
3
+
4
+based on the stepper library by Tom Igoe, et. al.
5
+
6
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
7
+
8
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
9
+
10
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ 71
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/README.rst View File

@@ -0,0 +1,71 @@
1
+Arduino TMC26X Stepper Motor Controller Library
2
+===============================================
3
+
4
+License
5
+-------
6
+
7
+TMC26XStepper.cpp - - TMC 260/261/262 Stepper library for Wiring/Arduino
8
+ 
9
+based on the stepper library by Tom Igoe, et. al.
10
+ 
11
+Copyright (c) 2011, Interactive Matter, Marcus Nowotny
12
+ 
13
+Permission is hereby granted, free of charge, to any person obtaining a copy
14
+of this software and associated documentation files (the "Software"), to deal
15
+in the Software without restriction, including without limitation the rights
16
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
17
+copies of the Software, and to permit persons to whom the Software is
18
+furnished to do so, subject to the following conditions:
19
+ 
20
+The above copyright notice and this permission notice shall be included in
21
+all copies or substantial portions of the Software.
22
+ 
23
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
26
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
28
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
29
+THE SOFTWARE.
30
+
31
+About
32
+-----
33
+
34
+The TMC26X is a stepper motor controller for bipolar stepper motors. From the trinamic web site:
35
+
36
+ The TMC262 is the first energy efficient high current high precision microstepping driver 
37
+ IC for bipolar stepper motors. The unique high resolution sensorless load detection stallGuard2™ 
38
+ is used to for the world’s first integrated load dependent current control feature called coolStep™.
39
+ The ability to read out the load and detect an overload makes the TMC262 an optimum choice for 
40
+ drives where a high reliability is desired at a low cost. The new patented spreadCycle PWM mixed 
41
+ decay chopper scheme ensures best zero crossing performance as well as high speed operation. 
42
+ The TMC262 can be driven with Step & Direction signals as well as by serial SPI™ interface. 
43
+ Using the microPlyer allows to operate the motor with highest 256 μStep smoothness reducing the 
44
+ input frequency to 16 μSteps. A full set of protection and diagnostic features makes this device 
45
+ very rugged. It directly drives external MOSFETs for currents of up to 6A. This way it reaches 
46
+ highest energy efficiency and allows driving of a high motor current without cooling measures 
47
+ even at high environment temperatures.
48
+
49
+
50
+The unique features of the TMC26X are that everything can (and must) be controlled in software:
51
+
52
+* the motor current
53
+* microstepping
54
+* stall protection
55
+* current reduction according to load
56
+* stallGuard2™ sensorless load detection
57
+* coolStep™ load dependent current control
58
+* spreadCycle hysteresis PWM chopper 
59
+* microPlyer 16-to-256 μStep multiplier
60
+* full protection and diagnostics
61
+
62
+This makes the TMC26X a bit harder to use than other stepper motors but much more versatile.
63
+This library resolves all the complicated stuff so that you can use TMC26X straight away.
64
+Furthermore, all the settings are implemented in high level interfaces so that configuring your
65
+motor is a breeze.
66
+
67
+How to use
68
+----------
69
+
70
+Check out the Setup Guide here: 
71
+And the How To here:

+ 999
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/TMC26XStepper.cpp
File diff suppressed because it is too large
View File


+ 607
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/TMC26XStepper.h View File

@@ -0,0 +1,607 @@
1
+/*
2
+ TMC26XStepper.cpp - - TMC26X Stepper library for Wiring/Arduino
3
+ 
4
+ based on the stepper library by Tom Igoe, et. al.
5
+
6
+ Copyright (c) 2011, Interactive Matter, Marcus Nowotny
7
+ 
8
+ Permission is hereby granted, free of charge, to any person obtaining a copy
9
+ of this software and associated documentation files (the "Software"), to deal
10
+ in the Software without restriction, including without limitation the rights
11
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12
+ copies of the Software, and to permit persons to whom the Software is
13
+ furnished to do so, subject to the following conditions:
14
+ 
15
+ The above copyright notice and this permission notice shall be included in
16
+ all copies or substantial portions of the Software.
17
+ 
18
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24
+ THE SOFTWARE.
25
+
26
+ */
27
+
28
+
29
+// ensure this library description is only included once
30
+#ifndef TMC26XStepper_h
31
+#define TMC26XStepper_h
32
+
33
+//! return value for TMC26XStepper.getOverTemperature() if there is a overtemperature situation in the TMC chip
34
+/*!
35
+ * This warning indicates that the TCM chip is too warm. 
36
+ * It is still working but some parameters may be inferior. 
37
+ * You should do something against it.
38
+ */
39
+#define TMC26X_OVERTEMPERATURE_PREWARING 1
40
+//! return value for TMC26XStepper.getOverTemperature() if there is a overtemperature shutdown in the TMC chip
41
+/*!
42
+ * This warning indicates that the TCM chip is too warm to operate and has shut down to prevent damage. 
43
+ * It will stop working until it cools down again.
44
+ * If you encouter this situation you must do something against it. Like reducing the current or improving the PCB layout 
45
+ * and/or heat management.
46
+ */
47
+#define TMC26X_OVERTEMPERATURE_SHUTDOWN 2
48
+
49
+//which values can be read out
50
+/*!
51
+ * Selects to readout the microstep position from the motor.
52
+ *\sa readStatus()
53
+ */
54
+#define TMC26X_READOUT_POSITION 0
55
+/*!
56
+ * Selects to read out the StallGuard value of the motor.
57
+ *\sa readStatus()
58
+ */
59
+#define TMC26X_READOUT_STALLGUARD 1
60
+/*!
61
+ * Selects to read out the current current setting (acc. to CoolStep) and the upper bits of the StallGuard value from the motor.
62
+ *\sa readStatus(), setCurrent()
63
+ */
64
+#define TMC26X_READOUT_CURRENT 3
65
+
66
+/*!
67
+ * Define to set the minimum current for CoolStep operation to 1/2 of the selected CS minium.
68
+ *\sa setCoolStepConfiguration()
69
+ */
70
+#define COOL_STEP_HALF_CS_LIMIT 0
71
+/*!
72
+ * Define to set the minimum current for CoolStep operation to 1/4 of the selected CS minium.
73
+ *\sa setCoolStepConfiguration()
74
+ */
75
+#define COOL_STEP_QUARTDER_CS_LIMIT 1
76
+
77
+/*!
78
+ * \class TMC26XStepper
79
+ * \brief Class representing a TMC26X stepper driver
80
+ * 
81
+ * In order to use one fo those drivers in your Arduino code you have to create an object of that class:
82
+ * \code
83
+ * TMC26XStepper stepper = TMC26XStepper(200,1,2,3,500);
84
+ * \endcode
85
+ * see TMC26XStepper(int number_of_steps, int cs_pin, int dir_pin, int step_pin, unsigned int rms_current)
86
+ *
87
+ * Keep in mind that you need to start the driver with start() in order to get the TMC26X configured.
88
+ * 
89
+ * The most important function is the move(). It checks if the motor has to do a step or not.
90
+ * It is important that you call move() as often as possible in your Arduino loop() routine. I suggest
91
+ * to use a very fast loop routine and always call it at the beginning or the end.
92
+ *
93
+ * In order to move you have to provide a movement speed with setSpeed(). The speed is a positive value setting
94
+ * the rotations per minute.
95
+ *
96
+ * To really move the motor you have to call step() to tell the driver to move the motor the given number 
97
+ * of steps in the given direction. Positive values move the motor in one direction, negative values in the other direction.
98
+ *
99
+ * You can check with isMoving() if the mototr is still moving or stop it  apruptely with stop().
100
+ */
101
+class TMC26XStepper {
102
+  public:
103
+    /*!
104
+     * \brief creates a new represenatation of a stepper motor connected to a TMC26X stepper driver
105
+     *
106
+     * This is the main constructor. If in doubt use this. You must provide all parameters as described below.
107
+     *
108
+     * \param number_of_steps the number of steps the motor has per rotation.
109
+     * \param cs_pin The Arduino pin you have connected the Cient Select Pin (!CS) of the TMC26X for SPI
110
+     * \param dir_pin the number of the Arduino pin the Direction input of the TMC26X is connected
111
+     * \param step_pin the number of the Arduino pin the step pin of the TMC26X driver is connected.
112
+     * \param rms_current the maximum current to privide to the motor in mA (!). A value of 200 would send up to 200mA to the motor
113
+     * \param resistor the current sense resistor in milli Ohm, defaults to ,15 Ohm ( or 150 milli Ohm) as in the TMC260 Arduino Shield
114
+     *
115
+     * Keep in mind that you must also call TMC26XStepper.start() in order to configure the stepper driver for use.
116
+     *
117
+     * By default the Constant Off Time chopper is used, see TCM262Stepper.setConstantOffTimeChopper() for details. 
118
+     * This should work on most motors (YMMV). You may want to configure and use the Spread Cycle Chopper, see  setSpreadCycleChopper().
119
+     *
120
+     * By default a microstepping of 1/32th is used to provide a smooth motor run, while still giving a good progression per step.
121
+     * You can select a different stepping with setMicrosteps() to aa different value.
122
+     * \sa start(), setMicrosteps()
123
+     */
124
+	TMC26XStepper(int number_of_steps, int cs_pin, int dir_pin, int step_pin, unsigned int current, unsigned int resistor=150);
125
+	
126
+    /*!
127
+     * \brief configures and starts the TMC26X stepper driver. Before you called this function the stepper driver is in nonfunctional mode.
128
+     *
129
+     * This routine configures the TMC26X stepper driver for the given values via SPI. 
130
+     * Most member functions are non functional if the driver has not been started.
131
+     * Therefore it is best to call this in your Arduino setup() function.
132
+     */
133
+	void start();
134
+    
135
+    /*!
136
+     * \brief resets the stepper in unconfigured mode.
137
+     *
138
+     * This routine enables you to call start again. It does not change anything 
139
+     * in the internal stepper configuration or the desired configuration.
140
+     * It just marks the stepper as not yet startet. You do not have to reconfigure
141
+     * the stepper to start it again, but it is not reset to any factory settings
142
+     * this has to be configured back by yourself.
143
+     * (Hint: Normally you do not need this function)
144
+     */
145
+	void un_start();
146
+
147
+
148
+    /*!
149
+     * \brief Sets the rotation speed in revolutions per minute.
150
+     * \param whatSpeed the desired speed in rotations per minute.
151
+     */
152
+    void setSpeed(unsigned int whatSpeed);
153
+    
154
+    /*!
155
+     * \brief reads out the currently selected speed in revolutions per minute.
156
+     * \sa setSpeed()
157
+     */
158
+    unsigned int getSpeed(void);
159
+
160
+    /*!
161
+     * \brief Set the number of microsteps in 2^i values (rounded) up to 256
162
+     *
163
+     * This method set's the number of microsteps per step in 2^i interval.
164
+     * This means you can select 1, 2, 4, 16, 32, 64, 128 or 256 as valid microsteps.
165
+     * If you give any other value it will be rounded to the next smaller number (3 would give a microstepping of 2).
166
+     * You can always check the current microstepping with getMicrosteps(). 
167
+     */ 
168
+	void setMicrosteps(int number_of_steps);
169
+    
170
+	/*!
171
+     * \brief returns the effective current number of microsteps selected.
172
+     *
173
+     * This function always returns the effective number of microsteps. 
174
+     * This can be a bit different than the micro steps set in setMicrosteps() since it is rounded to 2^i.
175
+     *
176
+     * \sa setMicrosteps()
177
+     */
178
+	int getMicrosteps(void);
179
+
180
+    /*!
181
+     * \brief Initiate a movement for the given number of steps. Positive numbers move in one, negative numbers in the other direction.
182
+     *
183
+     * \param number_of_steps The number of steps to move the motor.
184
+     * \return 0 if the motor was not moving and moves now. -1 if the motor is moving and the new steps could not be set.
185
+     *
186
+     * If the previous movement is not finished yet the function will return -1 and not change the steps to move the motor.
187
+	 * If the motor does not move it return 0
188
+     *
189
+     * The direction of the movement is indicated by the sign of the steps parameter. It is not determinable if positive values are right 
190
+     * or left This depends on the internal construction of the motor and how you connected it to the stepper driver.
191
+     *
192
+     * You can always verify with isMoving() or even use stop() to stop the motor before giving it new step directions.
193
+     * \sa isMoving(), getStepsLeft(), stop()
194
+     */
195
+    char step(int number_of_steps);
196
+    
197
+    /*!
198
+     * \brief Central movement method, must be called as often as possible in the lopp function and is very fast.
199
+     *
200
+     * This routine checks if the motor still has to move, if the waiting delay has passed to send a new step command to the motor 
201
+     * and manages the number of steps yet to move to fulfill the current move command.
202
+     *
203
+     * This function is implemented to be as fast as possible to call it as often as possible in your loop routine.
204
+     * The more regurlarly you call this function the better. In both senses of 'regularly': Calling it as often as
205
+     * possible is not a bad idea and if you even manage that the intervals you call this function are not too irregular helps too.
206
+     *
207
+     * You can call this routine even if you know that the motor is not miving. It introduces just a very small penalty in your code.
208
+     * You must not call isMoving() to determine if you need to call this function, since taht is done internally already and only 
209
+     * slows down you code.
210
+     * 
211
+     * How often you call this function directly influences your top miving speed for the motor. It may be a good idea to call this
212
+     * from an timer overflow interrupt to ensure proper calling.
213
+     * \sa step()
214
+     */
215
+    char move(void);
216
+
217
+    /*!
218
+     * \brief checks if the motor still has to move to fulfill the last movement command.
219
+     * \return 0 if the motor stops, -1 if the motor is moving.
220
+     *
221
+     * This method can be used to determine if the motor is ready for new movements.
222
+     *\sa step(), move()
223
+     */
224
+    char isMoving(void);
225
+    
226
+    /*!
227
+     * \brief Get the number of steps left in the current movement.
228
+     * \return The number of steps left in the movement. This number is always positive.
229
+     */
230
+    unsigned int getStepsLeft(void);
231
+    
232
+    /*!
233
+     * \brief Stops the motor regardless if it moves or not.
234
+     * \return -1 if the motor was moving and is really stoped or 0 if it was not moving at all.
235
+     *
236
+     * This method directly and apruptely stops the motor and may be used as an emergency stop.
237
+     */
238
+    char stop(void);
239
+    
240
+    /*!
241
+     * \brief Sets and configure the classical Constant Off Timer Chopper
242
+     * \param constant_off_time The off time setting controls the minimum chopper frequency. For most applications an off time within the range of 5μs to 20μs will fit. Setting this parameter to zero completely disables all driver transistors and the motor can free-wheel. 0: chopper off, 1:15: off time setting (1 will work with minimum blank time of 24 clocks)
243
+     * \param blank_time Selects the comparator blank time. This time needs to safely cover the switching event and the duration of the ringing on the sense resistor. For most low current drivers, a setting of 1 or 2 is good. For high current applications with large MOSFETs, a setting of 2 or 3 will be required. 0 (min setting) … (3) amx setting
244
+     * \param fast_decay_time_setting Fast decay time setting. Controls the portion of fast decay for each chopper cycle. 0: slow decay only, 1…15: duration of fast decay phase
245
+     * \param sine_wave_offset Sine wave offset. Controls the sine wave offset. A positive offset corrects for zero crossing error. -3…-1: negative offset, 0: no offset,1…12: positive offset
246
+     * \param use_curreent_comparator Selects usage of the current comparator for termination of the fast decay cycle. If current comparator is enabled, it terminates the fast decay cycle in case the current reaches a higher negative value than the actual positive value. (0 disable, -1 enable).
247
+     *
248
+     * The classic constant off time chopper uses a fixed portion of fast decay following each on phase. 
249
+     * While the duration of the on time is determined by the chopper comparator, the fast decay time needs 
250
+     * to be set by the user in a way, that the current decay is enough for the driver to be able to follow 
251
+     * the falling slope of the sine wave, and on the other hand it should not be too long, in order to minimize 
252
+     * motor current ripple and power dissipation. This best can be tuned using an oscilloscope or 
253
+     * trying out motor smoothness at different velocities. A good starting value is a fast decay time setting 
254
+     * similar to the slow decay time setting.
255
+     * After tuning of the fast decay time, the offset should be determined, in order to have a smooth zero transition. 
256
+     * This is necessary, because the fast decay phase leads to the absolute value of the motor current being lower 
257
+     * than the target current (see figure 17). If the zero offset is too low, the motor stands still for a short 
258
+     * moment during current zero crossing, if it is set too high, it makes a larger microstep.
259
+     * Typically, a positive offset setting is required for optimum operation.
260
+     *
261
+     * \sa setSpreadCycleChoper() for other alternatives.
262
+     * \sa setRandomOffTime() for spreading the noise over a wider spectrum
263
+     */
264
+	void setConstantOffTimeChopper(char constant_off_time, char blank_time, char fast_decay_time_setting, char sine_wave_offset, unsigned char use_current_comparator);
265
+    
266
+    /*!
267
+     * \brief Sets and configures with spread cycle chopper.
268
+     * \param constant_off_time The off time setting controls the minimum chopper frequency. For most applications an off time within the range of 5μs to 20μs will fit. Setting this parameter to zero completely disables all driver transistors and the motor can free-wheel. 0: chopper off, 1:15: off time setting (1 will work with minimum blank time of 24 clocks)
269
+     * \param blank_time Selects the comparator blank time. This time needs to safely cover the switching event and the duration of the ringing on the sense resistor. For most low current drivers, a setting of 1 or 2 is good. For high current applications with large MOSFETs, a setting of 2 or 3 will be required. 0 (min setting) … (3) amx setting
270
+     * \param hysteresis_start Hysteresis start setting. Please remark, that this value is an offset to the hysteresis end value. 1 … 8
271
+     * \param hysteresis_end Hysteresis end setting. Sets the hysteresis end value after a number of decrements. Decrement interval time is controlled by hysteresis_decrement. The sum hysteresis_start + hysteresis_end must be <16. At a current setting CS of max. 30 (amplitude reduced to 240), the sum is not limited.
272
+     * \param hysteresis_decrement Hysteresis decrement setting. This setting determines the slope of the hysteresis during on time and during fast decay time. 0 (fast decrement) … 3 (slow decrement).
273
+     *
274
+     * The spreadCycle chopper scheme (pat.fil.) is a precise and simple to use chopper principle, which automatically determines 
275
+     * the optimum fast decay portion for the motor. Anyhow, a number of settings can be made in order to optimally fit the driver 
276
+     * to the motor.
277
+     * Each chopper cycle is comprised of an on-phase, a slow decay phase, a fast decay phase and a second slow decay phase.
278
+     * The slow decay phases limit the maximum chopper frequency and are important for low motor and driver power dissipation. 
279
+     * The hysteresis start setting limits the chopper frequency by forcing the driver to introduce a minimum amount of 
280
+     * current ripple into the motor coils. The motor inductivity determines the ability to follow a changing motor current. 
281
+     * The duration of the on- and fast decay phase needs to cover at least the blank time, because the current comparator is 
282
+     * disabled during this time.
283
+     * 
284
+     * \sa setRandomOffTime() for spreading the noise over a wider spectrum
285
+     */
286
+	void setSpreadCycleChopper(char constant_off_time, char blank_time, char hysteresis_start, char hysteresis_end, char hysteresis_decrement);
287
+
288
+	/*!
289
+     * \brief Use random off time for noise reduction (0 for off, -1 for on).
290
+     * \param value 0 for off, -1 for on
291
+     *
292
+     * In a constant off time chopper scheme both coil choppers run freely, i.e. are not synchronized. 
293
+     * The frequency of each chopper mainly depends on the coil current and the position dependant motor coil inductivity, 
294
+     * thus it depends on the microstep position. With some motors a slightly audible beat can occur between the chopper 
295
+     * frequencies, especially when they are near to each other. This typically occurs at a few microstep positions within 
296
+     * each quarter wave. 
297
+     * This effect normally is not audible when compared to mechanical noise generated by ball bearings, 
298
+     * etc. Further factors which can cause a similar effect are a poor layout of sense resistor GND connection.
299
+     * In order to minimize the effect of a beat between both chopper frequencies, an internal random generator is provided. 
300
+     * It modulates the slow decay time setting when switched on. The random off time feature further spreads the chopper spectrum,
301
+     * reducing electromagnetic emission on single frequencies.
302
+     */
303
+	void setRandomOffTime(char value);
304
+    
305
+	/*!
306
+     * \brief set the maximum motor current in mA (1000 is 1 Amp)
307
+     * Keep in mind this is the maximum peak Current. The RMS current will be 1/sqrt(2) smaller. The actual current can also be smaller
308
+     * by employing CoolStep.
309
+     * \param current the maximum motor current in mA
310
+     * \sa getCurrent(), getCurrentCurrent()
311
+     */
312
+	void setCurrent(unsigned int current);
313
+    
314
+    /*!
315
+     * \brief readout the motor maximum current in mA (1000 is an Amp)
316
+     * This is the maximum current. to get the current current - which may be affected by CoolStep us getCurrentCurrent()
317
+     *\return the maximum motor current in milli amps
318
+     * \sa getCurrentCurrent()
319
+     */
320
+    unsigned int getCurrent(void);
321
+    
322
+	/*!
323
+     * \brief set the StallGuard threshold in order to get sensible StallGuard readings.
324
+     * \param stall_guard_threshold -64 … 63 the StallGuard threshold
325
+     * \param stall_guard_filter_enabled 0 if the filter is disabled, -1 if it is enabled
326
+     *
327
+     * The StallGuard threshold is used to optimize the StallGuard reading to sensible values. It should be at 0 at
328
+     * the maximum allowable load on the otor (but not before). = is a good starting point (and the default)
329
+     * If you get Stall Gaurd readings of 0 without any load or with too little laod increase the value.
330
+     * If you get readings of 1023 even with load decrease the setting.
331
+     *
332
+     * If you switch on the filter the StallGuard reading is only updated each 4th full step to reduce the noise in the
333
+     * reading.
334
+     * 
335
+     * \sa getCurrentStallGuardReading() to read out the current value.
336
+     */ 
337
+	void setStallGuardThreshold(char stall_guard_threshold, char stall_guard_filter_enabled);
338
+    
339
+    /*!
340
+     * \brief reads out the StallGuard threshold
341
+     * \return a number between -64 and 63.
342
+     */
343
+    char getStallGuardThreshold(void);
344
+    
345
+    /*!
346
+     * \brief returns the current setting of the StallGuard filter
347
+     * \return 0 if not set, -1 if set
348
+     */
349
+    char getStallGuardFilter(void);
350
+    
351
+    /*!
352
+     * \brief This method configures the CoolStep smart energy operation. You must have a proper StallGuard configuration for the motor situation (current, voltage, speed) in rder to use this feature.
353
+     * \param lower_SG_threshold Sets the lower threshold for stallGuard2TM reading. Below this value, the motor current becomes increased. Allowed values are 0...480
354
+     * \param SG_hysteresis Sets the distance between the lower and the upper threshold for stallGuard2TM reading. Above the upper threshold (which is lower_SG_threshold+SG_hysteresis+1) the motor current becomes decreased. Allowed values are 0...480
355
+     * \param current_decrement_step_size Sets the current decrement steps. If the StallGuard value is above the threshold the current gets decremented by this step size. 0...32
356
+     * \param current_increment_step_size Sets the current increment step. The current becomes incremented for each measured stallGuard2TM value below the lower threshold. 0...8
357
+     * \param lower_current_limit Sets the lower motor current limit for coolStepTM operation by scaling the CS value. Values can be COOL_STEP_HALF_CS_LIMIT, COOL_STEP_QUARTER_CS_LIMIT
358
+     * The CoolStep smart energy operation automatically adjust the current sent into the motor according to the current load,
359
+     * read out by the StallGuard in order to provide the optimum torque with the minimal current consumption.
360
+     * You configure the CoolStep current regulator by defining upper and lower bounds of StallGuard readouts. If the readout is above the 
361
+     * limit the current gets increased, below the limit the current gets decreased.
362
+     * You can specify the upper an lower threshold of the StallGuard readout in order to adjust the current. You can also set the number of
363
+     * StallGuard readings neccessary above or below the limit to get a more stable current adjustement.
364
+     * The current adjustement itself is configured by the number of steps the current gests in- or decreased and the absolut minimum current
365
+     * (1/2 or 1/4th otf the configured current).
366
+     * \sa COOL_STEP_HALF_CS_LIMIT, COOL_STEP_QUARTER_CS_LIMIT
367
+     */
368
+    void setCoolStepConfiguration(unsigned int lower_SG_threshold, unsigned int SG_hysteresis, unsigned char current_decrement_step_size,
369
+                                  unsigned char current_increment_step_size, unsigned char lower_current_limit);
370
+    
371
+    /*!
372
+     * \brief enables or disables the CoolStep smart energy operation feature. It must be configured before enabling it.
373
+     * \param enabled true if CoolStep should be enabled, false if not.
374
+     * \sa setCoolStepConfiguration()
375
+     */
376
+    void setCoolStepEnabled(boolean enabled);
377
+    
378
+    
379
+    /*!
380
+     * \brief check if the CoolStep feature is enabled
381
+     * \sa setCoolStepEnabled()
382
+     */
383
+    boolean isCoolStepEnabled();
384
+
385
+    /*!
386
+     * \brief returns the lower StallGuard threshold for the CoolStep operation
387
+     * \sa setCoolStepConfiguration()
388
+     */
389
+    unsigned int getCoolStepLowerSgThreshold();
390
+    
391
+    /*!
392
+     * \brief returns the upper StallGuard threshold for the CoolStep operation
393
+     * \sa setCoolStepConfiguration()
394
+     */
395
+    unsigned int getCoolStepUpperSgThreshold();
396
+    
397
+    /*!
398
+     * \brief returns the number of StallGuard readings befor CoolStep adjusts the motor current.
399
+     * \sa setCoolStepConfiguration()
400
+     */
401
+    unsigned char getCoolStepNumberOfSGReadings();
402
+    
403
+    /*!
404
+     * \brief returns the increment steps for the current for the CoolStep operation
405
+     * \sa setCoolStepConfiguration()
406
+     */
407
+    unsigned char getCoolStepCurrentIncrementSize();
408
+    
409
+    /*!
410
+     * \brief returns the absolut minium current for the CoolStep operation
411
+     * \sa setCoolStepConfiguration()
412
+     * \sa COOL_STEP_HALF_CS_LIMIT, COOL_STEP_QUARTER_CS_LIMIT
413
+     */
414
+    unsigned char getCoolStepLowerCurrentLimit();
415
+    
416
+	/*!
417
+     * \brief Get the current microstep position for phase A
418
+     * \return The current microstep position for phase A 0…255
419
+     * 
420
+     * Keep in mind that this routine reads and writes a value via SPI - so this may take a bit time.
421
+     */
422
+	int getMotorPosition(void);
423
+    
424
+    /*!
425
+     * \brief Reads the current StallGuard value.
426
+     * \return The current StallGuard value, lesser values indicate higher load, 0 means stall detected.
427
+     * Keep in mind that this routine reads and writes a value via SPI - so this may take a bit time.
428
+     * \sa setStallGuardThreshold() for tuning the readout to sensible ranges.
429
+     */
430
+	int getCurrentStallGuardReading(void);
431
+    
432
+    /*!
433
+     * \brief Reads the current current setting value as fraction of the maximum current
434
+     * Returns values between 0 and 31, representing 1/32 to 32/32 (=1)
435
+     * \sa setCoolStepConfiguration()
436
+     */
437
+    unsigned char getCurrentCSReading(void);
438
+    
439
+    
440
+    /*!
441
+     *\brief a convenience method to determine if the current scaling uses 0.31V or 0.165V as reference.
442
+     *\return false if 0.13V is the reference voltage, true if 0.165V is used.
443
+     */
444
+    boolean isCurrentScalingHalfed();
445
+
446
+    /*!
447
+     * \brief Reads the current current setting value and recalculates the absolute current in mA (1A would be 1000).
448
+     * This method calculates the currently used current setting (either by setting or by CoolStep) and reconstructs
449
+     * the current in mA by usinge the VSENSE and resistor value. This method uses floating point math - so it 
450
+     * may not be the fastest.
451
+     * \sa getCurrentCSReading(), getResistor(), isCurrentScalingHalfed(), getCurrent()
452
+     */
453
+    unsigned int getCurrentCurrent(void);
454
+    
455
+    /*!
456
+     * \brief checks if there is a StallGuard warning in the last status
457
+     * \return 0 if there was no warning, -1 if there was some warning.
458
+     * Keep in mind that this method does not enforce a readout but uses the value of the last status readout.
459
+     * You may want to use getMotorPosition() or getCurrentStallGuardReading() to enforce an updated status readout.
460
+     *
461
+     * \sa setStallGuardThreshold() for tuning the readout to sensible ranges.
462
+     */
463
+	boolean isStallGuardOverThreshold(void);
464
+    
465
+    /*!
466
+     * \brief Return over temperature status of the last status readout
467
+     * return 0 is everything is OK, TMC26X_OVERTEMPERATURE_PREWARING if status is reached, TMC26X_OVERTEMPERATURE_SHUTDOWN is the chip is shutdown, -1 if the status is unknown.
468
+     * Keep in mind that this method does not enforce a readout but uses the value of the last status readout.
469
+     * You may want to use getMotorPosition() or getCurrentStallGuardReading() to enforce an updated status readout.
470
+     */
471
+	char getOverTemperature(void);
472
+    
473
+    /*!
474
+     * \brief Is motor channel A shorted to ground detected in the last status readout.
475
+     * \return true is yes, false if not.
476
+     * Keep in mind that this method does not enforce a readout but uses the value of the last status readout.
477
+     * You may want to use getMotorPosition() or getCurrentStallGuardReading() to enforce an updated status readout.
478
+     */
479
+     
480
+	boolean isShortToGroundA(void);
481
+
482
+    /*!
483
+     * \brief Is motor channel B shorted to ground detected in the last status readout.
484
+     * \return true is yes, false if not.
485
+     * Keep in mind that this method does not enforce a readout but uses the value of the last status readout.
486
+     * You may want to use getMotorPosition() or getCurrentStallGuardReading() to enforce an updated status readout.
487
+     */
488
+	boolean isShortToGroundB(void);
489
+	/*!
490
+     * \brief iIs motor channel A connected according to the last statu readout.
491
+     * \return true is yes, false if not.
492
+     * Keep in mind that this method does not enforce a readout but uses the value of the last status readout.
493
+     * You may want to use getMotorPosition() or getCurrentStallGuardReading() to enforce an updated status readout.
494
+     */
495
+	boolean isOpenLoadA(void);
496
+
497
+	/*!
498
+     * \brief iIs motor channel A connected according to the last statu readout.
499
+     * \return true is yes, false if not.
500
+     * Keep in mind that this method does not enforce a readout but uses the value of the last status readout.
501
+     * You may want to use getMotorPosition() or getCurrentStallGuardReading() to enforce an updated status readout.
502
+     */
503
+	boolean isOpenLoadB(void);
504
+    
505
+    /*!
506
+     * \brief Is chopper inactive since 2^20 clock cycles - defaults to ~0,08s
507
+     * \return true is yes, false if not.
508
+     * Keep in mind that this method does not enforce a readout but uses the value of the last status readout.
509
+     * You may want to use getMotorPosition() or getCurrentStallGuardReading() to enforce an updated status readout.
510
+     */
511
+	boolean isStandStill(void);
512
+
513
+    /*!
514
+     * \brief checks if there is a StallGuard warning in the last status
515
+     * \return 0 if there was no warning, -1 if there was some warning.
516
+     * Keep in mind that this method does not enforce a readout but uses the value of the last status readout.
517
+     * You may want to use getMotorPosition() or getCurrentStallGuardReading() to enforce an updated status readout.
518
+     *
519
+     * \sa isStallGuardOverThreshold()
520
+     * TODO why?
521
+     *
522
+     * \sa setStallGuardThreshold() for tuning the readout to sensible ranges.
523
+     */
524
+	boolean isStallGuardReached(void);
525
+    
526
+    /*!
527
+     *\brief enables or disables the motor driver bridges. If disabled the motor can run freely. If enabled not.
528
+     *\param enabled a boolean value true if the motor should be enabled, false otherwise.
529
+     */
530
+    void setEnabled(boolean enabled);
531
+    
532
+    /*!
533
+     *\brief checks if the output bridges are enabled. If the bridges are not enabled the motor can run freely
534
+     *\return true if the bridges and by that the motor driver are enabled, false if not.
535
+     *\sa setEnabled()
536
+     */
537
+    boolean isEnabled();
538
+
539
+	/*!
540
+     * \brief Manually read out the status register
541
+     * This function sends a byte to the motor driver in order to get the current readout. The parameter read_value
542
+     * seletcs which value will get returned. If the read_vlaue changes in respect to the previous readout this method
543
+     * automatically send two bytes to the motor: one to set the redout and one to get the actual readout. So this method 
544
+     * may take time to send and read one or two bits - depending on the previous readout.
545
+     * \param read_value selects which value to read out (0..3). You can use the defines TMC26X_READOUT_POSITION, TMC_262_READOUT_STALLGUARD, or TMC_262_READOUT_CURRENT
546
+     * \sa TMC26X_READOUT_POSITION, TMC_262_READOUT_STALLGUARD, TMC_262_READOUT_CURRENT
547
+     */
548
+	void readStatus(char read_value);
549
+    
550
+    /*!
551
+     * \brief Returns the current sense resistor value in milliohm.
552
+     * The default value of ,15 Ohm will return 150.
553
+     */
554
+    int getResistor();
555
+
556
+    /*!
557
+     * \brief Prints out all the information that can be found in the last status read out - it does not force a status readout. 
558
+     * The result is printed via Serial
559
+     */
560
+	void debugLastStatus(void);
561
+	/*!
562
+     * \brief library version
563
+     * \return the version number as int.
564
+     */
565
+    int version(void);
566
+
567
+  private:    
568
+  	unsigned int steps_left;		//the steps the motor has to do to complete the movement
569
+    int direction;        // Direction of rotation
570
+    unsigned long step_delay;    // delay between steps, in ms, based on speed
571
+    int number_of_steps;      // total number of steps this motor can take
572
+    unsigned int speed; // we need to store the current speed in order to change the speed after changing microstepping
573
+    unsigned int resistor; //current sense resitor value in milliohm
574
+        
575
+    unsigned long last_step_time;      // time stamp in ms of when the last step was taken
576
+    unsigned long next_step_time;      // time stamp in ms of when the last step was taken
577
+	
578
+	//driver control register copies to easily set & modify the registers
579
+	unsigned long driver_control_register_value;
580
+	unsigned long chopper_config_register;
581
+	unsigned long cool_step_register_value;
582
+	unsigned long stall_guard2_current_register_value;
583
+	unsigned long driver_configuration_register_value;
584
+	//the driver status result
585
+	unsigned long driver_status_result;
586
+	
587
+	//helper routione to get the top 10 bit of the readout
588
+	inline int getReadoutValue();
589
+	
590
+	//the pins for the stepper driver
591
+	unsigned char cs_pin;
592
+	unsigned char step_pin;
593
+	unsigned char dir_pin;
594
+	
595
+	//status values 
596
+	boolean started; //if the stepper has been started yet
597
+	int microsteps; //the current number of micro steps
598
+    char constant_off_time; //we need to remember this value in order to enable and disable the motor
599
+    unsigned char cool_step_lower_threshold; // we need to remember the threshold to enable and disable the CoolStep feature
600
+    boolean cool_step_enabled; //we need to remember this to configure the coolstep if it si enabled
601
+	
602
+	//SPI sender
603
+	inline void send262(unsigned long datagram);
604
+};
605
+
606
+#endif
607
+

+ 848
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/_t_m_c26_x_stepper_8cpp.html View File

@@ -0,0 +1,848 @@
1
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
+<html xmlns="http://www.w3.org/1999/xhtml">
3
+<head>
4
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
6
+<title>Trinamic TMC26X Stepper Driver for Arduino: TMC26XStepper.cpp File Reference</title>
7
+
8
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
9
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
10
+
11
+
12
+
13
+</head>
14
+<body>
15
+<div id="top"><!-- do not remove this div! -->
16
+
17
+
18
+<div id="titlearea">
19
+<table cellspacing="0" cellpadding="0">
20
+ <tbody>
21
+ <tr style="height: 56px;">
22
+  
23
+  
24
+  <td style="padding-left: 0.5em;">
25
+   <div id="projectname">Trinamic TMC26X Stepper Driver for Arduino
26
+   
27
+   </div>
28
+   
29
+  </td>
30
+  
31
+  
32
+  
33
+ </tr>
34
+ </tbody>
35
+</table>
36
+</div>
37
+
38
+<!-- Generated by Doxygen 1.7.6.1 -->
39
+  <div id="navrow1" class="tabs">
40
+    <ul class="tablist">
41
+      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
42
+      <li><a href="annotated.html"><span>Classes</span></a></li>
43
+      <li class="current"><a href="files.html"><span>Files</span></a></li>
44
+    </ul>
45
+  </div>
46
+  <div id="navrow2" class="tabs2">
47
+    <ul class="tablist">
48
+      <li><a href="files.html"><span>File&#160;List</span></a></li>
49
+      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
50
+    </ul>
51
+  </div>
52
+</div>
53
+<div class="header">
54
+  <div class="summary">
55
+<a href="#define-members">Defines</a>  </div>
56
+  <div class="headertitle">
57
+<div class="title">TMC26XStepper.cpp File Reference</div>  </div>
58
+</div><!--header-->
59
+<div class="contents">
60
+<div class="textblock"><code>#include &lt;WProgram.h&gt;</code><br/>
61
+<code>#include &lt;SPI.h&gt;</code><br/>
62
+<code>#include &quot;<a class="el" href="_t_m_c26_x_stepper_8h_source.html">TMC26XStepper.h</a>&quot;</code><br/>
63
+</div>
64
+<p><a href="_t_m_c26_x_stepper_8cpp_source.html">Go to the source code of this file.</a></p>
65
+<table class="memberdecls">
66
+<tr><td colspan="2"><h2><a name="define-members"></a>
67
+Defines</h2></td></tr>
68
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a6560b3471273e99e280ba795e3469ede">DEFAULT_MICROSTEPPING_VALUE</a>&#160;&#160;&#160;32</td></tr>
69
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a108f18bf4a30a0e0f0991ac0e4ce0579">DRIVER_CONTROL_REGISTER</a>&#160;&#160;&#160;0x0ul</td></tr>
70
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a70a540d1090b989b8600b5e4776659fe">CHOPPER_CONFIG_REGISTER</a>&#160;&#160;&#160;0x80000ul</td></tr>
71
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#ab9828bfaa075a0a8647c709136016317">COOL_STEP_REGISTER</a>&#160;&#160;&#160;0xA0000ul</td></tr>
72
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a478d9bde09a6528eef6af6ffeeb6caba">STALL_GUARD2_LOAD_MEASURE_REGISTER</a>&#160;&#160;&#160;0xC0000ul</td></tr>
73
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#af35f569d42ea3b1d634901a3b6a908ee">DRIVER_CONFIG_REGISTER</a>&#160;&#160;&#160;0xE0000ul</td></tr>
74
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a3b02ee1f518b0c90c16488f937abd443">REGISTER_BIT_PATTERN</a>&#160;&#160;&#160;0xFFFFFul</td></tr>
75
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a8f5cb0c066109ffb18cefc0e85ee1d1b">MICROSTEPPING_PATTERN</a>&#160;&#160;&#160;0xFul</td></tr>
76
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#aa64245f223209654c60588e4558e0bab">STEP_INTERPOLATION</a>&#160;&#160;&#160;0x200ul</td></tr>
77
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a770601bf0153e4bc639b9c3005b15af7">DOUBLE_EDGE_STEP</a>&#160;&#160;&#160;0x100ul</td></tr>
78
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a4fb1c008e2ff76eee9362600eed112e1">VSENSE</a>&#160;&#160;&#160;0x40ul</td></tr>
79
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a143b7757272f07866d9655bde8303d9a">READ_MICROSTEP_POSTION</a>&#160;&#160;&#160;0x0ul</td></tr>
80
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#ac1bd4da94fab7ce1049be2f866211819">READ_STALL_GUARD_READING</a>&#160;&#160;&#160;0x10ul</td></tr>
81
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#aef62b7fdcbac0b33b2d6e9cea4b5f9b2">READ_STALL_GUARD_AND_COOL_STEP</a>&#160;&#160;&#160;0x20ul</td></tr>
82
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a88a4b45fa6385eba8aa4f0342334b832">READ_SELECTION_PATTERN</a>&#160;&#160;&#160;0x30ul</td></tr>
83
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a57418a67ff726d540b813230bca1d536">CHOPPER_MODE_STANDARD</a>&#160;&#160;&#160;0x0ul</td></tr>
84
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#aaf1b564ced7de8ff3245c964e3775826">CHOPPER_MODE_T_OFF_FAST_DECAY</a>&#160;&#160;&#160;0x4000ul</td></tr>
85
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#aa4e49237f2671e7f28aa34ae0e89da8d">T_OFF_PATTERN</a>&#160;&#160;&#160;0xful</td></tr>
86
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a64520580cffd416668f3b91bd60f84e1">RANDOM_TOFF_TIME</a>&#160;&#160;&#160;0x2000ul</td></tr>
87
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a42cb2ce84258587d514ec3268548ba89">BLANK_TIMING_PATTERN</a>&#160;&#160;&#160;0x18000ul</td></tr>
88
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#abdac78f7f2c506972265a8e5883e1eae">BLANK_TIMING_SHIFT</a>&#160;&#160;&#160;15</td></tr>
89
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a424c248097b38c1e29e6a58ad48e6bd9">HYSTERESIS_DECREMENT_PATTERN</a>&#160;&#160;&#160;0x1800ul</td></tr>
90
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a36e554a87785ce6ba998b79aae9e74e0">HYSTERESIS_DECREMENT_SHIFT</a>&#160;&#160;&#160;11</td></tr>
91
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#ad9d2302f6d61cd84a612a2e2bcdeb56e">HYSTERESIS_LOW_VALUE_PATTERN</a>&#160;&#160;&#160;0x780ul</td></tr>
92
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a38ce0bb0fa20db28351ac9167f28db98">HYSTERESIS_LOW_SHIFT</a>&#160;&#160;&#160;7</td></tr>
93
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a0de4e98b412dced62c3a4452b7483af3">HYSTERESIS_START_VALUE_PATTERN</a>&#160;&#160;&#160;0x78ul</td></tr>
94
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#ac2c1c939256126e605396c4aaee3c804">HYSTERESIS_START_VALUE_SHIFT</a>&#160;&#160;&#160;4</td></tr>
95
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a7659d842c803e47ba911a2a6e26327f3">T_OFF_TIMING_PATERN</a>&#160;&#160;&#160;0xFul</td></tr>
96
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a8a261a77d198b85f6dd8416387b354b3">MINIMUM_CURRENT_FOURTH</a>&#160;&#160;&#160;0x8000ul</td></tr>
97
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#adbe13a0464355e42fbe786ca5f58ed8d">CURRENT_DOWN_STEP_SPEED_PATTERN</a>&#160;&#160;&#160;0x6000ul</td></tr>
98
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#ac8f748bf735c447dbed7dd4c7b631a87">SE_MAX_PATTERN</a>&#160;&#160;&#160;0xF00ul</td></tr>
99
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#aba6c07e5672e34e618bb3a550ab0d2bc">SE_CURRENT_STEP_WIDTH_PATTERN</a>&#160;&#160;&#160;0x60ul</td></tr>
100
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#ae1862dfb958c03698b0abd95fda033ea">SE_MIN_PATTERN</a>&#160;&#160;&#160;0xful</td></tr>
101
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#afdbbefabd0c29c4b6e403c4663d0f0be">STALL_GUARD_FILTER_ENABLED</a>&#160;&#160;&#160;0x10000ul</td></tr>
102
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#ae631457932894a974334892704550ecc">STALL_GUARD_TRESHHOLD_VALUE_PATTERN</a>&#160;&#160;&#160;0x17F00ul</td></tr>
103
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a99dcb8c6d98b0b54c23699a3f90450e4">CURRENT_SCALING_PATTERN</a>&#160;&#160;&#160;0x1Ful</td></tr>
104
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a99ac04f0615556fc13c0c9f3e1c1b49d">STALL_GUARD_CONFIG_PATTERN</a>&#160;&#160;&#160;0x17F00ul</td></tr>
105
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a6a1cb1fd61cf7c570f94376fa11fe55b">STALL_GUARD_VALUE_PATTERN</a>&#160;&#160;&#160;0x7F00ul</td></tr>
106
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#aa09ef662fd19bf2d063d6bd0f48eca14">STATUS_STALL_GUARD_STATUS</a>&#160;&#160;&#160;0x1ul</td></tr>
107
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#adbb23d2f055c9eab55eac29d1a75deb4">STATUS_OVER_TEMPERATURE_SHUTDOWN</a>&#160;&#160;&#160;0x2ul</td></tr>
108
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#aa317fd77f2f26fdfbfd331e21d9069e8">STATUS_OVER_TEMPERATURE_WARNING</a>&#160;&#160;&#160;0x4ul</td></tr>
109
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a8e03041302a092174fa33b3cf837dca2">STATUS_SHORT_TO_GROUND_A</a>&#160;&#160;&#160;0x8ul</td></tr>
110
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a903c3eba99695a32c6736463dcfd93ae">STATUS_SHORT_TO_GROUND_B</a>&#160;&#160;&#160;0x10ul</td></tr>
111
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#ae9cbbe5af7188e6bff8fe412f8e42f59">STATUS_OPEN_LOAD_A</a>&#160;&#160;&#160;0x20ul</td></tr>
112
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#ab29dc5cd6c6c4e5bf99e71bd563e1be1">STATUS_OPEN_LOAD_B</a>&#160;&#160;&#160;0x40ul</td></tr>
113
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#ab96ed1635faee6650e9cce73598a2773">STATUS_STAND_STILL</a>&#160;&#160;&#160;0x80ul</td></tr>
114
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a5c3d76da63f585e37813c32be2e11ab7">READOUT_VALUE_PATTERN</a>&#160;&#160;&#160;0xFFC00ul</td></tr>
115
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8cpp.html#a54a6d12e96d851361974b10614a00e45">INITIAL_MICROSTEPPING</a>&#160;&#160;&#160;0x3ul</td></tr>
116
+</table>
117
+<hr/><h2>Define Documentation</h2>
118
+<a class="anchor" id="a42cb2ce84258587d514ec3268548ba89"></a><!-- doxytag: member="TMC26XStepper.cpp::BLANK_TIMING_PATTERN" ref="a42cb2ce84258587d514ec3268548ba89" args="" -->
119
+<div class="memitem">
120
+<div class="memproto">
121
+      <table class="memname">
122
+        <tr>
123
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a42cb2ce84258587d514ec3268548ba89">BLANK_TIMING_PATTERN</a>&#160;&#160;&#160;0x18000ul</td>
124
+        </tr>
125
+      </table>
126
+</div>
127
+<div class="memdoc">
128
+
129
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00063">63</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
130
+
131
+</div>
132
+</div>
133
+<a class="anchor" id="abdac78f7f2c506972265a8e5883e1eae"></a><!-- doxytag: member="TMC26XStepper.cpp::BLANK_TIMING_SHIFT" ref="abdac78f7f2c506972265a8e5883e1eae" args="" -->
134
+<div class="memitem">
135
+<div class="memproto">
136
+      <table class="memname">
137
+        <tr>
138
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#abdac78f7f2c506972265a8e5883e1eae">BLANK_TIMING_SHIFT</a>&#160;&#160;&#160;15</td>
139
+        </tr>
140
+      </table>
141
+</div>
142
+<div class="memdoc">
143
+
144
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00064">64</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
145
+
146
+</div>
147
+</div>
148
+<a class="anchor" id="a70a540d1090b989b8600b5e4776659fe"></a><!-- doxytag: member="TMC26XStepper.cpp::CHOPPER_CONFIG_REGISTER" ref="a70a540d1090b989b8600b5e4776659fe" args="" -->
149
+<div class="memitem">
150
+<div class="memproto">
151
+      <table class="memname">
152
+        <tr>
153
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a70a540d1090b989b8600b5e4776659fe">CHOPPER_CONFIG_REGISTER</a>&#160;&#160;&#160;0x80000ul</td>
154
+        </tr>
155
+      </table>
156
+</div>
157
+<div class="memdoc">
158
+
159
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00041">41</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
160
+
161
+</div>
162
+</div>
163
+<a class="anchor" id="a57418a67ff726d540b813230bca1d536"></a><!-- doxytag: member="TMC26XStepper.cpp::CHOPPER_MODE_STANDARD" ref="a57418a67ff726d540b813230bca1d536" args="" -->
164
+<div class="memitem">
165
+<div class="memproto">
166
+      <table class="memname">
167
+        <tr>
168
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a57418a67ff726d540b813230bca1d536">CHOPPER_MODE_STANDARD</a>&#160;&#160;&#160;0x0ul</td>
169
+        </tr>
170
+      </table>
171
+</div>
172
+<div class="memdoc">
173
+
174
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00059">59</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
175
+
176
+</div>
177
+</div>
178
+<a class="anchor" id="aaf1b564ced7de8ff3245c964e3775826"></a><!-- doxytag: member="TMC26XStepper.cpp::CHOPPER_MODE_T_OFF_FAST_DECAY" ref="aaf1b564ced7de8ff3245c964e3775826" args="" -->
179
+<div class="memitem">
180
+<div class="memproto">
181
+      <table class="memname">
182
+        <tr>
183
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#aaf1b564ced7de8ff3245c964e3775826">CHOPPER_MODE_T_OFF_FAST_DECAY</a>&#160;&#160;&#160;0x4000ul</td>
184
+        </tr>
185
+      </table>
186
+</div>
187
+<div class="memdoc">
188
+
189
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00060">60</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
190
+
191
+</div>
192
+</div>
193
+<a class="anchor" id="ab9828bfaa075a0a8647c709136016317"></a><!-- doxytag: member="TMC26XStepper.cpp::COOL_STEP_REGISTER" ref="ab9828bfaa075a0a8647c709136016317" args="" -->
194
+<div class="memitem">
195
+<div class="memproto">
196
+      <table class="memname">
197
+        <tr>
198
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ab9828bfaa075a0a8647c709136016317">COOL_STEP_REGISTER</a>&#160;&#160;&#160;0xA0000ul</td>
199
+        </tr>
200
+      </table>
201
+</div>
202
+<div class="memdoc">
203
+
204
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00042">42</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
205
+
206
+</div>
207
+</div>
208
+<a class="anchor" id="adbe13a0464355e42fbe786ca5f58ed8d"></a><!-- doxytag: member="TMC26XStepper.cpp::CURRENT_DOWN_STEP_SPEED_PATTERN" ref="adbe13a0464355e42fbe786ca5f58ed8d" args="" -->
209
+<div class="memitem">
210
+<div class="memproto">
211
+      <table class="memname">
212
+        <tr>
213
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#adbe13a0464355e42fbe786ca5f58ed8d">CURRENT_DOWN_STEP_SPEED_PATTERN</a>&#160;&#160;&#160;0x6000ul</td>
214
+        </tr>
215
+      </table>
216
+</div>
217
+<div class="memdoc">
218
+
219
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00075">75</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
220
+
221
+</div>
222
+</div>
223
+<a class="anchor" id="a99dcb8c6d98b0b54c23699a3f90450e4"></a><!-- doxytag: member="TMC26XStepper.cpp::CURRENT_SCALING_PATTERN" ref="a99dcb8c6d98b0b54c23699a3f90450e4" args="" -->
224
+<div class="memitem">
225
+<div class="memproto">
226
+      <table class="memname">
227
+        <tr>
228
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a99dcb8c6d98b0b54c23699a3f90450e4">CURRENT_SCALING_PATTERN</a>&#160;&#160;&#160;0x1Ful</td>
229
+        </tr>
230
+      </table>
231
+</div>
232
+<div class="memdoc">
233
+
234
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00083">83</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
235
+
236
+</div>
237
+</div>
238
+<a class="anchor" id="a6560b3471273e99e280ba795e3469ede"></a><!-- doxytag: member="TMC26XStepper.cpp::DEFAULT_MICROSTEPPING_VALUE" ref="a6560b3471273e99e280ba795e3469ede" args="" -->
239
+<div class="memitem">
240
+<div class="memproto">
241
+      <table class="memname">
242
+        <tr>
243
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a6560b3471273e99e280ba795e3469ede">DEFAULT_MICROSTEPPING_VALUE</a>&#160;&#160;&#160;32</td>
244
+        </tr>
245
+      </table>
246
+</div>
247
+<div class="memdoc">
248
+
249
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00037">37</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
250
+
251
+</div>
252
+</div>
253
+<a class="anchor" id="a770601bf0153e4bc639b9c3005b15af7"></a><!-- doxytag: member="TMC26XStepper.cpp::DOUBLE_EDGE_STEP" ref="a770601bf0153e4bc639b9c3005b15af7" args="" -->
254
+<div class="memitem">
255
+<div class="memproto">
256
+      <table class="memname">
257
+        <tr>
258
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a770601bf0153e4bc639b9c3005b15af7">DOUBLE_EDGE_STEP</a>&#160;&#160;&#160;0x100ul</td>
259
+        </tr>
260
+      </table>
261
+</div>
262
+<div class="memdoc">
263
+
264
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00051">51</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
265
+
266
+</div>
267
+</div>
268
+<a class="anchor" id="af35f569d42ea3b1d634901a3b6a908ee"></a><!-- doxytag: member="TMC26XStepper.cpp::DRIVER_CONFIG_REGISTER" ref="af35f569d42ea3b1d634901a3b6a908ee" args="" -->
269
+<div class="memitem">
270
+<div class="memproto">
271
+      <table class="memname">
272
+        <tr>
273
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#af35f569d42ea3b1d634901a3b6a908ee">DRIVER_CONFIG_REGISTER</a>&#160;&#160;&#160;0xE0000ul</td>
274
+        </tr>
275
+      </table>
276
+</div>
277
+<div class="memdoc">
278
+
279
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00044">44</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
280
+
281
+</div>
282
+</div>
283
+<a class="anchor" id="a108f18bf4a30a0e0f0991ac0e4ce0579"></a><!-- doxytag: member="TMC26XStepper.cpp::DRIVER_CONTROL_REGISTER" ref="a108f18bf4a30a0e0f0991ac0e4ce0579" args="" -->
284
+<div class="memitem">
285
+<div class="memproto">
286
+      <table class="memname">
287
+        <tr>
288
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a108f18bf4a30a0e0f0991ac0e4ce0579">DRIVER_CONTROL_REGISTER</a>&#160;&#160;&#160;0x0ul</td>
289
+        </tr>
290
+      </table>
291
+</div>
292
+<div class="memdoc">
293
+
294
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00040">40</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
295
+
296
+</div>
297
+</div>
298
+<a class="anchor" id="a424c248097b38c1e29e6a58ad48e6bd9"></a><!-- doxytag: member="TMC26XStepper.cpp::HYSTERESIS_DECREMENT_PATTERN" ref="a424c248097b38c1e29e6a58ad48e6bd9" args="" -->
299
+<div class="memitem">
300
+<div class="memproto">
301
+      <table class="memname">
302
+        <tr>
303
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a424c248097b38c1e29e6a58ad48e6bd9">HYSTERESIS_DECREMENT_PATTERN</a>&#160;&#160;&#160;0x1800ul</td>
304
+        </tr>
305
+      </table>
306
+</div>
307
+<div class="memdoc">
308
+
309
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00065">65</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
310
+
311
+</div>
312
+</div>
313
+<a class="anchor" id="a36e554a87785ce6ba998b79aae9e74e0"></a><!-- doxytag: member="TMC26XStepper.cpp::HYSTERESIS_DECREMENT_SHIFT" ref="a36e554a87785ce6ba998b79aae9e74e0" args="" -->
314
+<div class="memitem">
315
+<div class="memproto">
316
+      <table class="memname">
317
+        <tr>
318
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a36e554a87785ce6ba998b79aae9e74e0">HYSTERESIS_DECREMENT_SHIFT</a>&#160;&#160;&#160;11</td>
319
+        </tr>
320
+      </table>
321
+</div>
322
+<div class="memdoc">
323
+
324
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00066">66</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
325
+
326
+</div>
327
+</div>
328
+<a class="anchor" id="a38ce0bb0fa20db28351ac9167f28db98"></a><!-- doxytag: member="TMC26XStepper.cpp::HYSTERESIS_LOW_SHIFT" ref="a38ce0bb0fa20db28351ac9167f28db98" args="" -->
329
+<div class="memitem">
330
+<div class="memproto">
331
+      <table class="memname">
332
+        <tr>
333
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a38ce0bb0fa20db28351ac9167f28db98">HYSTERESIS_LOW_SHIFT</a>&#160;&#160;&#160;7</td>
334
+        </tr>
335
+      </table>
336
+</div>
337
+<div class="memdoc">
338
+
339
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00068">68</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
340
+
341
+</div>
342
+</div>
343
+<a class="anchor" id="ad9d2302f6d61cd84a612a2e2bcdeb56e"></a><!-- doxytag: member="TMC26XStepper.cpp::HYSTERESIS_LOW_VALUE_PATTERN" ref="ad9d2302f6d61cd84a612a2e2bcdeb56e" args="" -->
344
+<div class="memitem">
345
+<div class="memproto">
346
+      <table class="memname">
347
+        <tr>
348
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ad9d2302f6d61cd84a612a2e2bcdeb56e">HYSTERESIS_LOW_VALUE_PATTERN</a>&#160;&#160;&#160;0x780ul</td>
349
+        </tr>
350
+      </table>
351
+</div>
352
+<div class="memdoc">
353
+
354
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00067">67</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
355
+
356
+</div>
357
+</div>
358
+<a class="anchor" id="a0de4e98b412dced62c3a4452b7483af3"></a><!-- doxytag: member="TMC26XStepper.cpp::HYSTERESIS_START_VALUE_PATTERN" ref="a0de4e98b412dced62c3a4452b7483af3" args="" -->
359
+<div class="memitem">
360
+<div class="memproto">
361
+      <table class="memname">
362
+        <tr>
363
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a0de4e98b412dced62c3a4452b7483af3">HYSTERESIS_START_VALUE_PATTERN</a>&#160;&#160;&#160;0x78ul</td>
364
+        </tr>
365
+      </table>
366
+</div>
367
+<div class="memdoc">
368
+
369
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00069">69</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
370
+
371
+</div>
372
+</div>
373
+<a class="anchor" id="ac2c1c939256126e605396c4aaee3c804"></a><!-- doxytag: member="TMC26XStepper.cpp::HYSTERESIS_START_VALUE_SHIFT" ref="ac2c1c939256126e605396c4aaee3c804" args="" -->
374
+<div class="memitem">
375
+<div class="memproto">
376
+      <table class="memname">
377
+        <tr>
378
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ac2c1c939256126e605396c4aaee3c804">HYSTERESIS_START_VALUE_SHIFT</a>&#160;&#160;&#160;4</td>
379
+        </tr>
380
+      </table>
381
+</div>
382
+<div class="memdoc">
383
+
384
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00070">70</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
385
+
386
+</div>
387
+</div>
388
+<a class="anchor" id="a54a6d12e96d851361974b10614a00e45"></a><!-- doxytag: member="TMC26XStepper.cpp::INITIAL_MICROSTEPPING" ref="a54a6d12e96d851361974b10614a00e45" args="" -->
389
+<div class="memitem">
390
+<div class="memproto">
391
+      <table class="memname">
392
+        <tr>
393
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a54a6d12e96d851361974b10614a00e45">INITIAL_MICROSTEPPING</a>&#160;&#160;&#160;0x3ul</td>
394
+        </tr>
395
+      </table>
396
+</div>
397
+<div class="memdoc">
398
+
399
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00099">99</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
400
+
401
+</div>
402
+</div>
403
+<a class="anchor" id="a8f5cb0c066109ffb18cefc0e85ee1d1b"></a><!-- doxytag: member="TMC26XStepper.cpp::MICROSTEPPING_PATTERN" ref="a8f5cb0c066109ffb18cefc0e85ee1d1b" args="" -->
404
+<div class="memitem">
405
+<div class="memproto">
406
+      <table class="memname">
407
+        <tr>
408
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a8f5cb0c066109ffb18cefc0e85ee1d1b">MICROSTEPPING_PATTERN</a>&#160;&#160;&#160;0xFul</td>
409
+        </tr>
410
+      </table>
411
+</div>
412
+<div class="memdoc">
413
+
414
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00049">49</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
415
+
416
+</div>
417
+</div>
418
+<a class="anchor" id="a8a261a77d198b85f6dd8416387b354b3"></a><!-- doxytag: member="TMC26XStepper.cpp::MINIMUM_CURRENT_FOURTH" ref="a8a261a77d198b85f6dd8416387b354b3" args="" -->
419
+<div class="memitem">
420
+<div class="memproto">
421
+      <table class="memname">
422
+        <tr>
423
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a8a261a77d198b85f6dd8416387b354b3">MINIMUM_CURRENT_FOURTH</a>&#160;&#160;&#160;0x8000ul</td>
424
+        </tr>
425
+      </table>
426
+</div>
427
+<div class="memdoc">
428
+
429
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00074">74</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
430
+
431
+</div>
432
+</div>
433
+<a class="anchor" id="a64520580cffd416668f3b91bd60f84e1"></a><!-- doxytag: member="TMC26XStepper.cpp::RANDOM_TOFF_TIME" ref="a64520580cffd416668f3b91bd60f84e1" args="" -->
434
+<div class="memitem">
435
+<div class="memproto">
436
+      <table class="memname">
437
+        <tr>
438
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a64520580cffd416668f3b91bd60f84e1">RANDOM_TOFF_TIME</a>&#160;&#160;&#160;0x2000ul</td>
439
+        </tr>
440
+      </table>
441
+</div>
442
+<div class="memdoc">
443
+
444
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00062">62</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
445
+
446
+</div>
447
+</div>
448
+<a class="anchor" id="a143b7757272f07866d9655bde8303d9a"></a><!-- doxytag: member="TMC26XStepper.cpp::READ_MICROSTEP_POSTION" ref="a143b7757272f07866d9655bde8303d9a" args="" -->
449
+<div class="memitem">
450
+<div class="memproto">
451
+      <table class="memname">
452
+        <tr>
453
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a143b7757272f07866d9655bde8303d9a">READ_MICROSTEP_POSTION</a>&#160;&#160;&#160;0x0ul</td>
454
+        </tr>
455
+      </table>
456
+</div>
457
+<div class="memdoc">
458
+
459
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00053">53</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
460
+
461
+</div>
462
+</div>
463
+<a class="anchor" id="a88a4b45fa6385eba8aa4f0342334b832"></a><!-- doxytag: member="TMC26XStepper.cpp::READ_SELECTION_PATTERN" ref="a88a4b45fa6385eba8aa4f0342334b832" args="" -->
464
+<div class="memitem">
465
+<div class="memproto">
466
+      <table class="memname">
467
+        <tr>
468
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a88a4b45fa6385eba8aa4f0342334b832">READ_SELECTION_PATTERN</a>&#160;&#160;&#160;0x30ul</td>
469
+        </tr>
470
+      </table>
471
+</div>
472
+<div class="memdoc">
473
+
474
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00056">56</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
475
+
476
+</div>
477
+</div>
478
+<a class="anchor" id="aef62b7fdcbac0b33b2d6e9cea4b5f9b2"></a><!-- doxytag: member="TMC26XStepper.cpp::READ_STALL_GUARD_AND_COOL_STEP" ref="aef62b7fdcbac0b33b2d6e9cea4b5f9b2" args="" -->
479
+<div class="memitem">
480
+<div class="memproto">
481
+      <table class="memname">
482
+        <tr>
483
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#aef62b7fdcbac0b33b2d6e9cea4b5f9b2">READ_STALL_GUARD_AND_COOL_STEP</a>&#160;&#160;&#160;0x20ul</td>
484
+        </tr>
485
+      </table>
486
+</div>
487
+<div class="memdoc">
488
+
489
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00055">55</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
490
+
491
+</div>
492
+</div>
493
+<a class="anchor" id="ac1bd4da94fab7ce1049be2f866211819"></a><!-- doxytag: member="TMC26XStepper.cpp::READ_STALL_GUARD_READING" ref="ac1bd4da94fab7ce1049be2f866211819" args="" -->
494
+<div class="memitem">
495
+<div class="memproto">
496
+      <table class="memname">
497
+        <tr>
498
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ac1bd4da94fab7ce1049be2f866211819">READ_STALL_GUARD_READING</a>&#160;&#160;&#160;0x10ul</td>
499
+        </tr>
500
+      </table>
501
+</div>
502
+<div class="memdoc">
503
+
504
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00054">54</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
505
+
506
+</div>
507
+</div>
508
+<a class="anchor" id="a5c3d76da63f585e37813c32be2e11ab7"></a><!-- doxytag: member="TMC26XStepper.cpp::READOUT_VALUE_PATTERN" ref="a5c3d76da63f585e37813c32be2e11ab7" args="" -->
509
+<div class="memitem">
510
+<div class="memproto">
511
+      <table class="memname">
512
+        <tr>
513
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a5c3d76da63f585e37813c32be2e11ab7">READOUT_VALUE_PATTERN</a>&#160;&#160;&#160;0xFFC00ul</td>
514
+        </tr>
515
+      </table>
516
+</div>
517
+<div class="memdoc">
518
+
519
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00096">96</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
520
+
521
+</div>
522
+</div>
523
+<a class="anchor" id="a3b02ee1f518b0c90c16488f937abd443"></a><!-- doxytag: member="TMC26XStepper.cpp::REGISTER_BIT_PATTERN" ref="a3b02ee1f518b0c90c16488f937abd443" args="" -->
524
+<div class="memitem">
525
+<div class="memproto">
526
+      <table class="memname">
527
+        <tr>
528
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a3b02ee1f518b0c90c16488f937abd443">REGISTER_BIT_PATTERN</a>&#160;&#160;&#160;0xFFFFFul</td>
529
+        </tr>
530
+      </table>
531
+</div>
532
+<div class="memdoc">
533
+
534
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00046">46</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
535
+
536
+</div>
537
+</div>
538
+<a class="anchor" id="aba6c07e5672e34e618bb3a550ab0d2bc"></a><!-- doxytag: member="TMC26XStepper.cpp::SE_CURRENT_STEP_WIDTH_PATTERN" ref="aba6c07e5672e34e618bb3a550ab0d2bc" args="" -->
539
+<div class="memitem">
540
+<div class="memproto">
541
+      <table class="memname">
542
+        <tr>
543
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#aba6c07e5672e34e618bb3a550ab0d2bc">SE_CURRENT_STEP_WIDTH_PATTERN</a>&#160;&#160;&#160;0x60ul</td>
544
+        </tr>
545
+      </table>
546
+</div>
547
+<div class="memdoc">
548
+
549
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00077">77</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
550
+
551
+</div>
552
+</div>
553
+<a class="anchor" id="ac8f748bf735c447dbed7dd4c7b631a87"></a><!-- doxytag: member="TMC26XStepper.cpp::SE_MAX_PATTERN" ref="ac8f748bf735c447dbed7dd4c7b631a87" args="" -->
554
+<div class="memitem">
555
+<div class="memproto">
556
+      <table class="memname">
557
+        <tr>
558
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ac8f748bf735c447dbed7dd4c7b631a87">SE_MAX_PATTERN</a>&#160;&#160;&#160;0xF00ul</td>
559
+        </tr>
560
+      </table>
561
+</div>
562
+<div class="memdoc">
563
+
564
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00076">76</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
565
+
566
+</div>
567
+</div>
568
+<a class="anchor" id="ae1862dfb958c03698b0abd95fda033ea"></a><!-- doxytag: member="TMC26XStepper.cpp::SE_MIN_PATTERN" ref="ae1862dfb958c03698b0abd95fda033ea" args="" -->
569
+<div class="memitem">
570
+<div class="memproto">
571
+      <table class="memname">
572
+        <tr>
573
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ae1862dfb958c03698b0abd95fda033ea">SE_MIN_PATTERN</a>&#160;&#160;&#160;0xful</td>
574
+        </tr>
575
+      </table>
576
+</div>
577
+<div class="memdoc">
578
+
579
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00078">78</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
580
+
581
+</div>
582
+</div>
583
+<a class="anchor" id="a478d9bde09a6528eef6af6ffeeb6caba"></a><!-- doxytag: member="TMC26XStepper.cpp::STALL_GUARD2_LOAD_MEASURE_REGISTER" ref="a478d9bde09a6528eef6af6ffeeb6caba" args="" -->
584
+<div class="memitem">
585
+<div class="memproto">
586
+      <table class="memname">
587
+        <tr>
588
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a478d9bde09a6528eef6af6ffeeb6caba">STALL_GUARD2_LOAD_MEASURE_REGISTER</a>&#160;&#160;&#160;0xC0000ul</td>
589
+        </tr>
590
+      </table>
591
+</div>
592
+<div class="memdoc">
593
+
594
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00043">43</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
595
+
596
+</div>
597
+</div>
598
+<a class="anchor" id="a99ac04f0615556fc13c0c9f3e1c1b49d"></a><!-- doxytag: member="TMC26XStepper.cpp::STALL_GUARD_CONFIG_PATTERN" ref="a99ac04f0615556fc13c0c9f3e1c1b49d" args="" -->
599
+<div class="memitem">
600
+<div class="memproto">
601
+      <table class="memname">
602
+        <tr>
603
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a99ac04f0615556fc13c0c9f3e1c1b49d">STALL_GUARD_CONFIG_PATTERN</a>&#160;&#160;&#160;0x17F00ul</td>
604
+        </tr>
605
+      </table>
606
+</div>
607
+<div class="memdoc">
608
+
609
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00084">84</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
610
+
611
+</div>
612
+</div>
613
+<a class="anchor" id="afdbbefabd0c29c4b6e403c4663d0f0be"></a><!-- doxytag: member="TMC26XStepper.cpp::STALL_GUARD_FILTER_ENABLED" ref="afdbbefabd0c29c4b6e403c4663d0f0be" args="" -->
614
+<div class="memitem">
615
+<div class="memproto">
616
+      <table class="memname">
617
+        <tr>
618
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#afdbbefabd0c29c4b6e403c4663d0f0be">STALL_GUARD_FILTER_ENABLED</a>&#160;&#160;&#160;0x10000ul</td>
619
+        </tr>
620
+      </table>
621
+</div>
622
+<div class="memdoc">
623
+
624
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00081">81</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
625
+
626
+</div>
627
+</div>
628
+<a class="anchor" id="ae631457932894a974334892704550ecc"></a><!-- doxytag: member="TMC26XStepper.cpp::STALL_GUARD_TRESHHOLD_VALUE_PATTERN" ref="ae631457932894a974334892704550ecc" args="" -->
629
+<div class="memitem">
630
+<div class="memproto">
631
+      <table class="memname">
632
+        <tr>
633
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ae631457932894a974334892704550ecc">STALL_GUARD_TRESHHOLD_VALUE_PATTERN</a>&#160;&#160;&#160;0x17F00ul</td>
634
+        </tr>
635
+      </table>
636
+</div>
637
+<div class="memdoc">
638
+
639
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00082">82</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
640
+
641
+</div>
642
+</div>
643
+<a class="anchor" id="a6a1cb1fd61cf7c570f94376fa11fe55b"></a><!-- doxytag: member="TMC26XStepper.cpp::STALL_GUARD_VALUE_PATTERN" ref="a6a1cb1fd61cf7c570f94376fa11fe55b" args="" -->
644
+<div class="memitem">
645
+<div class="memproto">
646
+      <table class="memname">
647
+        <tr>
648
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a6a1cb1fd61cf7c570f94376fa11fe55b">STALL_GUARD_VALUE_PATTERN</a>&#160;&#160;&#160;0x7F00ul</td>
649
+        </tr>
650
+      </table>
651
+</div>
652
+<div class="memdoc">
653
+
654
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00085">85</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
655
+
656
+</div>
657
+</div>
658
+<a class="anchor" id="ae9cbbe5af7188e6bff8fe412f8e42f59"></a><!-- doxytag: member="TMC26XStepper.cpp::STATUS_OPEN_LOAD_A" ref="ae9cbbe5af7188e6bff8fe412f8e42f59" args="" -->
659
+<div class="memitem">
660
+<div class="memproto">
661
+      <table class="memname">
662
+        <tr>
663
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ae9cbbe5af7188e6bff8fe412f8e42f59">STATUS_OPEN_LOAD_A</a>&#160;&#160;&#160;0x20ul</td>
664
+        </tr>
665
+      </table>
666
+</div>
667
+<div class="memdoc">
668
+
669
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00093">93</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
670
+
671
+</div>
672
+</div>
673
+<a class="anchor" id="ab29dc5cd6c6c4e5bf99e71bd563e1be1"></a><!-- doxytag: member="TMC26XStepper.cpp::STATUS_OPEN_LOAD_B" ref="ab29dc5cd6c6c4e5bf99e71bd563e1be1" args="" -->
674
+<div class="memitem">
675
+<div class="memproto">
676
+      <table class="memname">
677
+        <tr>
678
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ab29dc5cd6c6c4e5bf99e71bd563e1be1">STATUS_OPEN_LOAD_B</a>&#160;&#160;&#160;0x40ul</td>
679
+        </tr>
680
+      </table>
681
+</div>
682
+<div class="memdoc">
683
+
684
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00094">94</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
685
+
686
+</div>
687
+</div>
688
+<a class="anchor" id="adbb23d2f055c9eab55eac29d1a75deb4"></a><!-- doxytag: member="TMC26XStepper.cpp::STATUS_OVER_TEMPERATURE_SHUTDOWN" ref="adbb23d2f055c9eab55eac29d1a75deb4" args="" -->
689
+<div class="memitem">
690
+<div class="memproto">
691
+      <table class="memname">
692
+        <tr>
693
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#adbb23d2f055c9eab55eac29d1a75deb4">STATUS_OVER_TEMPERATURE_SHUTDOWN</a>&#160;&#160;&#160;0x2ul</td>
694
+        </tr>
695
+      </table>
696
+</div>
697
+<div class="memdoc">
698
+
699
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00089">89</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
700
+
701
+</div>
702
+</div>
703
+<a class="anchor" id="aa317fd77f2f26fdfbfd331e21d9069e8"></a><!-- doxytag: member="TMC26XStepper.cpp::STATUS_OVER_TEMPERATURE_WARNING" ref="aa317fd77f2f26fdfbfd331e21d9069e8" args="" -->
704
+<div class="memitem">
705
+<div class="memproto">
706
+      <table class="memname">
707
+        <tr>
708
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#aa317fd77f2f26fdfbfd331e21d9069e8">STATUS_OVER_TEMPERATURE_WARNING</a>&#160;&#160;&#160;0x4ul</td>
709
+        </tr>
710
+      </table>
711
+</div>
712
+<div class="memdoc">
713
+
714
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00090">90</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
715
+
716
+</div>
717
+</div>
718
+<a class="anchor" id="a8e03041302a092174fa33b3cf837dca2"></a><!-- doxytag: member="TMC26XStepper.cpp::STATUS_SHORT_TO_GROUND_A" ref="a8e03041302a092174fa33b3cf837dca2" args="" -->
719
+<div class="memitem">
720
+<div class="memproto">
721
+      <table class="memname">
722
+        <tr>
723
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a8e03041302a092174fa33b3cf837dca2">STATUS_SHORT_TO_GROUND_A</a>&#160;&#160;&#160;0x8ul</td>
724
+        </tr>
725
+      </table>
726
+</div>
727
+<div class="memdoc">
728
+
729
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00091">91</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
730
+
731
+</div>
732
+</div>
733
+<a class="anchor" id="a903c3eba99695a32c6736463dcfd93ae"></a><!-- doxytag: member="TMC26XStepper.cpp::STATUS_SHORT_TO_GROUND_B" ref="a903c3eba99695a32c6736463dcfd93ae" args="" -->
734
+<div class="memitem">
735
+<div class="memproto">
736
+      <table class="memname">
737
+        <tr>
738
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a903c3eba99695a32c6736463dcfd93ae">STATUS_SHORT_TO_GROUND_B</a>&#160;&#160;&#160;0x10ul</td>
739
+        </tr>
740
+      </table>
741
+</div>
742
+<div class="memdoc">
743
+
744
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00092">92</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
745
+
746
+</div>
747
+</div>
748
+<a class="anchor" id="aa09ef662fd19bf2d063d6bd0f48eca14"></a><!-- doxytag: member="TMC26XStepper.cpp::STATUS_STALL_GUARD_STATUS" ref="aa09ef662fd19bf2d063d6bd0f48eca14" args="" -->
749
+<div class="memitem">
750
+<div class="memproto">
751
+      <table class="memname">
752
+        <tr>
753
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#aa09ef662fd19bf2d063d6bd0f48eca14">STATUS_STALL_GUARD_STATUS</a>&#160;&#160;&#160;0x1ul</td>
754
+        </tr>
755
+      </table>
756
+</div>
757
+<div class="memdoc">
758
+
759
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00088">88</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
760
+
761
+</div>
762
+</div>
763
+<a class="anchor" id="ab96ed1635faee6650e9cce73598a2773"></a><!-- doxytag: member="TMC26XStepper.cpp::STATUS_STAND_STILL" ref="ab96ed1635faee6650e9cce73598a2773" args="" -->
764
+<div class="memitem">
765
+<div class="memproto">
766
+      <table class="memname">
767
+        <tr>
768
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ab96ed1635faee6650e9cce73598a2773">STATUS_STAND_STILL</a>&#160;&#160;&#160;0x80ul</td>
769
+        </tr>
770
+      </table>
771
+</div>
772
+<div class="memdoc">
773
+
774
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00095">95</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
775
+
776
+</div>
777
+</div>
778
+<a class="anchor" id="aa64245f223209654c60588e4558e0bab"></a><!-- doxytag: member="TMC26XStepper.cpp::STEP_INTERPOLATION" ref="aa64245f223209654c60588e4558e0bab" args="" -->
779
+<div class="memitem">
780
+<div class="memproto">
781
+      <table class="memname">
782
+        <tr>
783
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#aa64245f223209654c60588e4558e0bab">STEP_INTERPOLATION</a>&#160;&#160;&#160;0x200ul</td>
784
+        </tr>
785
+      </table>
786
+</div>
787
+<div class="memdoc">
788
+
789
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00050">50</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
790
+
791
+</div>
792
+</div>
793
+<a class="anchor" id="aa4e49237f2671e7f28aa34ae0e89da8d"></a><!-- doxytag: member="TMC26XStepper.cpp::T_OFF_PATTERN" ref="aa4e49237f2671e7f28aa34ae0e89da8d" args="" -->
794
+<div class="memitem">
795
+<div class="memproto">
796
+      <table class="memname">
797
+        <tr>
798
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#aa4e49237f2671e7f28aa34ae0e89da8d">T_OFF_PATTERN</a>&#160;&#160;&#160;0xful</td>
799
+        </tr>
800
+      </table>
801
+</div>
802
+<div class="memdoc">
803
+
804
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00061">61</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
805
+
806
+</div>
807
+</div>
808
+<a class="anchor" id="a7659d842c803e47ba911a2a6e26327f3"></a><!-- doxytag: member="TMC26XStepper.cpp::T_OFF_TIMING_PATERN" ref="a7659d842c803e47ba911a2a6e26327f3" args="" -->
809
+<div class="memitem">
810
+<div class="memproto">
811
+      <table class="memname">
812
+        <tr>
813
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a7659d842c803e47ba911a2a6e26327f3">T_OFF_TIMING_PATERN</a>&#160;&#160;&#160;0xFul</td>
814
+        </tr>
815
+      </table>
816
+</div>
817
+<div class="memdoc">
818
+
819
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00071">71</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
820
+
821
+</div>
822
+</div>
823
+<a class="anchor" id="a4fb1c008e2ff76eee9362600eed112e1"></a><!-- doxytag: member="TMC26XStepper.cpp::VSENSE" ref="a4fb1c008e2ff76eee9362600eed112e1" args="" -->
824
+<div class="memitem">
825
+<div class="memproto">
826
+      <table class="memname">
827
+        <tr>
828
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a4fb1c008e2ff76eee9362600eed112e1">VSENSE</a>&#160;&#160;&#160;0x40ul</td>
829
+        </tr>
830
+      </table>
831
+</div>
832
+<div class="memdoc">
833
+
834
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html#l00052">52</a> of file <a class="el" href="_t_m_c26_x_stepper_8cpp_source.html">TMC26XStepper.cpp</a>.</p>
835
+
836
+</div>
837
+</div>
838
+</div><!-- contents -->
839
+
840
+
841
+<hr class="footer"/><address class="footer"><small>
842
+Generated on Mon Nov 19 2012 20:26:21 for Trinamic TMC26X Stepper Driver for Arduino by &#160;<a href="http://www.doxygen.org/index.html">
843
+<img class="footer" src="doxygen.png" alt="doxygen"/>
844
+</a> 1.7.6.1
845
+</small></address>
846
+
847
+</body>
848
+</html>

+ 1067
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/_t_m_c26_x_stepper_8cpp_source.html
File diff suppressed because it is too large
View File


+ 212
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/_t_m_c26_x_stepper_8h.html View File

@@ -0,0 +1,212 @@
1
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
+<html xmlns="http://www.w3.org/1999/xhtml">
3
+<head>
4
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
6
+<title>Trinamic TMC26X Stepper Driver for Arduino: TMC26XStepper.h File Reference</title>
7
+
8
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
9
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
10
+
11
+
12
+
13
+</head>
14
+<body>
15
+<div id="top"><!-- do not remove this div! -->
16
+
17
+
18
+<div id="titlearea">
19
+<table cellspacing="0" cellpadding="0">
20
+ <tbody>
21
+ <tr style="height: 56px;">
22
+  
23
+  
24
+  <td style="padding-left: 0.5em;">
25
+   <div id="projectname">Trinamic TMC26X Stepper Driver for Arduino
26
+   
27
+   </div>
28
+   
29
+  </td>
30
+  
31
+  
32
+  
33
+ </tr>
34
+ </tbody>
35
+</table>
36
+</div>
37
+
38
+<!-- Generated by Doxygen 1.7.6.1 -->
39
+  <div id="navrow1" class="tabs">
40
+    <ul class="tablist">
41
+      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
42
+      <li><a href="annotated.html"><span>Classes</span></a></li>
43
+      <li class="current"><a href="files.html"><span>Files</span></a></li>
44
+    </ul>
45
+  </div>
46
+  <div id="navrow2" class="tabs2">
47
+    <ul class="tablist">
48
+      <li><a href="files.html"><span>File&#160;List</span></a></li>
49
+      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
50
+    </ul>
51
+  </div>
52
+</div>
53
+<div class="header">
54
+  <div class="summary">
55
+<a href="#nested-classes">Classes</a> &#124;
56
+<a href="#define-members">Defines</a>  </div>
57
+  <div class="headertitle">
58
+<div class="title">TMC26XStepper.h File Reference</div>  </div>
59
+</div><!--header-->
60
+<div class="contents">
61
+
62
+<p><a href="_t_m_c26_x_stepper_8h_source.html">Go to the source code of this file.</a></p>
63
+<table class="memberdecls">
64
+<tr><td colspan="2"><h2><a name="nested-classes"></a>
65
+Classes</h2></td></tr>
66
+<tr><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td></tr>
67
+<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Class representing a TMC26X stepper driver.  <a href="class_t_m_c26_x_stepper.html#details">More...</a><br/></td></tr>
68
+<tr><td colspan="2"><h2><a name="define-members"></a>
69
+Defines</h2></td></tr>
70
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8h.html#add42eee34f674f92c19bcd5266d2445f">TMC26X_OVERTEMPERATURE_PREWARING</a>&#160;&#160;&#160;1</td></tr>
71
+<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">return value for <a class="el" href="class_t_m_c26_x_stepper.html#a7662c2fbc03d1f5a7da5cabcc153b2d7" title="Return over temperature status of the last status readout return 0 is everything is OK...">TMC26XStepper.getOverTemperature()</a> if there is a overtemperature situation in the TMC chip  <a href="#add42eee34f674f92c19bcd5266d2445f"></a><br/></td></tr>
72
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8h.html#adae814ce848677abd87758c7ac79a436">TMC26X_OVERTEMPERATURE_SHUTDOWN</a>&#160;&#160;&#160;2</td></tr>
73
+<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">return value for <a class="el" href="class_t_m_c26_x_stepper.html#a7662c2fbc03d1f5a7da5cabcc153b2d7" title="Return over temperature status of the last status readout return 0 is everything is OK...">TMC26XStepper.getOverTemperature()</a> if there is a overtemperature shutdown in the TMC chip  <a href="#adae814ce848677abd87758c7ac79a436"></a><br/></td></tr>
74
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8h.html#aff05d4a47ef8821322ccc2a20785fbee">TMC26X_READOUT_POSITION</a>&#160;&#160;&#160;0</td></tr>
75
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8h.html#ac864ff8886123039c7d2d3c617f7ef87">TMC26X_READOUT_STALLGUARD</a>&#160;&#160;&#160;1</td></tr>
76
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8h.html#a01760ad15e3846536526a990efe47094">TMC26X_READOUT_CURRENT</a>&#160;&#160;&#160;3</td></tr>
77
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8h.html#a28b1774bd4aa854fb5e4b6dc7db96ecb">COOL_STEP_HALF_CS_LIMIT</a>&#160;&#160;&#160;0</td></tr>
78
+<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_t_m_c26_x_stepper_8h.html#a1a4db5eafd0a9247677153cb4c8b7d54">COOL_STEP_QUARTDER_CS_LIMIT</a>&#160;&#160;&#160;1</td></tr>
79
+</table>
80
+<hr/><h2>Define Documentation</h2>
81
+<a class="anchor" id="a28b1774bd4aa854fb5e4b6dc7db96ecb"></a><!-- doxytag: member="TMC26XStepper.h::COOL_STEP_HALF_CS_LIMIT" ref="a28b1774bd4aa854fb5e4b6dc7db96ecb" args="" -->
82
+<div class="memitem">
83
+<div class="memproto">
84
+      <table class="memname">
85
+        <tr>
86
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8h.html#a28b1774bd4aa854fb5e4b6dc7db96ecb">COOL_STEP_HALF_CS_LIMIT</a>&#160;&#160;&#160;0</td>
87
+        </tr>
88
+      </table>
89
+</div>
90
+<div class="memdoc">
91
+<p>Define to set the minimum current for CoolStep operation to 1/2 of the selected CS minium. </p>
92
+<dl class="see"><dt><b>See also:</b></dt><dd>setCoolStepConfiguration() </dd></dl>
93
+
94
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8h_source.html#l00070">70</a> of file <a class="el" href="_t_m_c26_x_stepper_8h_source.html">TMC26XStepper.h</a>.</p>
95
+
96
+</div>
97
+</div>
98
+<a class="anchor" id="a1a4db5eafd0a9247677153cb4c8b7d54"></a><!-- doxytag: member="TMC26XStepper.h::COOL_STEP_QUARTDER_CS_LIMIT" ref="a1a4db5eafd0a9247677153cb4c8b7d54" args="" -->
99
+<div class="memitem">
100
+<div class="memproto">
101
+      <table class="memname">
102
+        <tr>
103
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8h.html#a1a4db5eafd0a9247677153cb4c8b7d54">COOL_STEP_QUARTDER_CS_LIMIT</a>&#160;&#160;&#160;1</td>
104
+        </tr>
105
+      </table>
106
+</div>
107
+<div class="memdoc">
108
+<p>Define to set the minimum current for CoolStep operation to 1/4 of the selected CS minium. </p>
109
+<dl class="see"><dt><b>See also:</b></dt><dd>setCoolStepConfiguration() </dd></dl>
110
+
111
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8h_source.html#l00075">75</a> of file <a class="el" href="_t_m_c26_x_stepper_8h_source.html">TMC26XStepper.h</a>.</p>
112
+
113
+</div>
114
+</div>
115
+<a class="anchor" id="add42eee34f674f92c19bcd5266d2445f"></a><!-- doxytag: member="TMC26XStepper.h::TMC26X_OVERTEMPERATURE_PREWARING" ref="add42eee34f674f92c19bcd5266d2445f" args="" -->
116
+<div class="memitem">
117
+<div class="memproto">
118
+      <table class="memname">
119
+        <tr>
120
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8h.html#add42eee34f674f92c19bcd5266d2445f">TMC26X_OVERTEMPERATURE_PREWARING</a>&#160;&#160;&#160;1</td>
121
+        </tr>
122
+      </table>
123
+</div>
124
+<div class="memdoc">
125
+
126
+<p>return value for <a class="el" href="class_t_m_c26_x_stepper.html#a7662c2fbc03d1f5a7da5cabcc153b2d7" title="Return over temperature status of the last status readout return 0 is everything is OK...">TMC26XStepper.getOverTemperature()</a> if there is a overtemperature situation in the TMC chip </p>
127
+<p>This warning indicates that the TCM chip is too warm. It is still working but some parameters may be inferior. You should do something against it. </p>
128
+
129
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8h_source.html#l00039">39</a> of file <a class="el" href="_t_m_c26_x_stepper_8h_source.html">TMC26XStepper.h</a>.</p>
130
+
131
+</div>
132
+</div>
133
+<a class="anchor" id="adae814ce848677abd87758c7ac79a436"></a><!-- doxytag: member="TMC26XStepper.h::TMC26X_OVERTEMPERATURE_SHUTDOWN" ref="adae814ce848677abd87758c7ac79a436" args="" -->
134
+<div class="memitem">
135
+<div class="memproto">
136
+      <table class="memname">
137
+        <tr>
138
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8h.html#adae814ce848677abd87758c7ac79a436">TMC26X_OVERTEMPERATURE_SHUTDOWN</a>&#160;&#160;&#160;2</td>
139
+        </tr>
140
+      </table>
141
+</div>
142
+<div class="memdoc">
143
+
144
+<p>return value for <a class="el" href="class_t_m_c26_x_stepper.html#a7662c2fbc03d1f5a7da5cabcc153b2d7" title="Return over temperature status of the last status readout return 0 is everything is OK...">TMC26XStepper.getOverTemperature()</a> if there is a overtemperature shutdown in the TMC chip </p>
145
+<p>This warning indicates that the TCM chip is too warm to operate and has shut down to prevent damage. It will stop working until it cools down again. If you encouter this situation you must do something against it. Like reducing the current or improving the PCB layout and/or heat management. </p>
146
+
147
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8h_source.html#l00047">47</a> of file <a class="el" href="_t_m_c26_x_stepper_8h_source.html">TMC26XStepper.h</a>.</p>
148
+
149
+</div>
150
+</div>
151
+<a class="anchor" id="a01760ad15e3846536526a990efe47094"></a><!-- doxytag: member="TMC26XStepper.h::TMC26X_READOUT_CURRENT" ref="a01760ad15e3846536526a990efe47094" args="" -->
152
+<div class="memitem">
153
+<div class="memproto">
154
+      <table class="memname">
155
+        <tr>
156
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8h.html#a01760ad15e3846536526a990efe47094">TMC26X_READOUT_CURRENT</a>&#160;&#160;&#160;3</td>
157
+        </tr>
158
+      </table>
159
+</div>
160
+<div class="memdoc">
161
+<p>Selects to read out the current current setting (acc. to CoolStep) and the upper bits of the StallGuard value from the motor. </p>
162
+<dl class="see"><dt><b>See also:</b></dt><dd>readStatus(), setCurrent() </dd></dl>
163
+
164
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8h_source.html#l00064">64</a> of file <a class="el" href="_t_m_c26_x_stepper_8h_source.html">TMC26XStepper.h</a>.</p>
165
+
166
+</div>
167
+</div>
168
+<a class="anchor" id="aff05d4a47ef8821322ccc2a20785fbee"></a><!-- doxytag: member="TMC26XStepper.h::TMC26X_READOUT_POSITION" ref="aff05d4a47ef8821322ccc2a20785fbee" args="" -->
169
+<div class="memitem">
170
+<div class="memproto">
171
+      <table class="memname">
172
+        <tr>
173
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8h.html#aff05d4a47ef8821322ccc2a20785fbee">TMC26X_READOUT_POSITION</a>&#160;&#160;&#160;0</td>
174
+        </tr>
175
+      </table>
176
+</div>
177
+<div class="memdoc">
178
+<p>Selects to readout the microstep position from the motor. </p>
179
+<dl class="see"><dt><b>See also:</b></dt><dd>readStatus() </dd></dl>
180
+
181
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8h_source.html#l00054">54</a> of file <a class="el" href="_t_m_c26_x_stepper_8h_source.html">TMC26XStepper.h</a>.</p>
182
+
183
+</div>
184
+</div>
185
+<a class="anchor" id="ac864ff8886123039c7d2d3c617f7ef87"></a><!-- doxytag: member="TMC26XStepper.h::TMC26X_READOUT_STALLGUARD" ref="ac864ff8886123039c7d2d3c617f7ef87" args="" -->
186
+<div class="memitem">
187
+<div class="memproto">
188
+      <table class="memname">
189
+        <tr>
190
+          <td class="memname">#define <a class="el" href="_t_m_c26_x_stepper_8h.html#ac864ff8886123039c7d2d3c617f7ef87">TMC26X_READOUT_STALLGUARD</a>&#160;&#160;&#160;1</td>
191
+        </tr>
192
+      </table>
193
+</div>
194
+<div class="memdoc">
195
+<p>Selects to read out the StallGuard value of the motor. </p>
196
+<dl class="see"><dt><b>See also:</b></dt><dd>readStatus() </dd></dl>
197
+
198
+<p>Definition at line <a class="el" href="_t_m_c26_x_stepper_8h_source.html#l00059">59</a> of file <a class="el" href="_t_m_c26_x_stepper_8h_source.html">TMC26XStepper.h</a>.</p>
199
+
200
+</div>
201
+</div>
202
+</div><!-- contents -->
203
+
204
+
205
+<hr class="footer"/><address class="footer"><small>
206
+Generated on Mon Nov 19 2012 20:26:21 for Trinamic TMC26X Stepper Driver for Arduino by &#160;<a href="http://www.doxygen.org/index.html">
207
+<img class="footer" src="doxygen.png" alt="doxygen"/>
208
+</a> 1.7.6.1
209
+</small></address>
210
+
211
+</body>
212
+</html>

+ 256
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/_t_m_c26_x_stepper_8h_source.html View File

@@ -0,0 +1,256 @@
1
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
+<html xmlns="http://www.w3.org/1999/xhtml">
3
+<head>
4
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
6
+<title>Trinamic TMC26X Stepper Driver for Arduino: TMC26XStepper.h Source File</title>
7
+
8
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
9
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
10
+
11
+
12
+
13
+</head>
14
+<body>
15
+<div id="top"><!-- do not remove this div! -->
16
+
17
+
18
+<div id="titlearea">
19
+<table cellspacing="0" cellpadding="0">
20
+ <tbody>
21
+ <tr style="height: 56px;">
22
+  
23
+  
24
+  <td style="padding-left: 0.5em;">
25
+   <div id="projectname">Trinamic TMC26X Stepper Driver for Arduino
26
+   
27
+   </div>
28
+   
29
+  </td>
30
+  
31
+  
32
+  
33
+ </tr>
34
+ </tbody>
35
+</table>
36
+</div>
37
+
38
+<!-- Generated by Doxygen 1.7.6.1 -->
39
+  <div id="navrow1" class="tabs">
40
+    <ul class="tablist">
41
+      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
42
+      <li><a href="annotated.html"><span>Classes</span></a></li>
43
+      <li class="current"><a href="files.html"><span>Files</span></a></li>
44
+    </ul>
45
+  </div>
46
+  <div id="navrow2" class="tabs2">
47
+    <ul class="tablist">
48
+      <li><a href="files.html"><span>File&#160;List</span></a></li>
49
+      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
50
+    </ul>
51
+  </div>
52
+</div>
53
+<div class="header">
54
+  <div class="headertitle">
55
+<div class="title">TMC26XStepper.h</div>  </div>
56
+</div><!--header-->
57
+<div class="contents">
58
+<a href="_t_m_c26_x_stepper_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
59
+<a name="l00002"></a>00002 <span class="comment"> TMC26XStepper.cpp - - TMC26X Stepper library for Wiring/Arduino - Version 0.1</span>
60
+<a name="l00003"></a>00003 <span class="comment"> </span>
61
+<a name="l00004"></a>00004 <span class="comment"> based on the stepper library by Tom Igoe, et. al.</span>
62
+<a name="l00005"></a>00005 <span class="comment"></span>
63
+<a name="l00006"></a>00006 <span class="comment"> Copyright (c) 2011, Interactive Matter, Marcus Nowotny</span>
64
+<a name="l00007"></a>00007 <span class="comment"> </span>
65
+<a name="l00008"></a>00008 <span class="comment"> Permission is hereby granted, free of charge, to any person obtaining a copy</span>
66
+<a name="l00009"></a>00009 <span class="comment"> of this software and associated documentation files (the &quot;Software&quot;), to deal</span>
67
+<a name="l00010"></a>00010 <span class="comment"> in the Software without restriction, including without limitation the rights</span>
68
+<a name="l00011"></a>00011 <span class="comment"> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell</span>
69
+<a name="l00012"></a>00012 <span class="comment"> copies of the Software, and to permit persons to whom the Software is</span>
70
+<a name="l00013"></a>00013 <span class="comment"> furnished to do so, subject to the following conditions:</span>
71
+<a name="l00014"></a>00014 <span class="comment"> </span>
72
+<a name="l00015"></a>00015 <span class="comment"> The above copyright notice and this permission notice shall be included in</span>
73
+<a name="l00016"></a>00016 <span class="comment"> all copies or substantial portions of the Software.</span>
74
+<a name="l00017"></a>00017 <span class="comment"> </span>
75
+<a name="l00018"></a>00018 <span class="comment"> THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR</span>
76
+<a name="l00019"></a>00019 <span class="comment"> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,</span>
77
+<a name="l00020"></a>00020 <span class="comment"> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE</span>
78
+<a name="l00021"></a>00021 <span class="comment"> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER</span>
79
+<a name="l00022"></a>00022 <span class="comment"> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,</span>
80
+<a name="l00023"></a>00023 <span class="comment"> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN</span>
81
+<a name="l00024"></a>00024 <span class="comment"> THE SOFTWARE.</span>
82
+<a name="l00025"></a>00025 <span class="comment"></span>
83
+<a name="l00026"></a>00026 <span class="comment"> */</span>
84
+<a name="l00027"></a>00027 
85
+<a name="l00028"></a>00028 
86
+<a name="l00029"></a>00029 <span class="comment">// ensure this library description is only included once</span>
87
+<a name="l00030"></a>00030 <span class="preprocessor">#ifndef TMC26XStepper_h</span>
88
+<a name="l00031"></a>00031 <span class="preprocessor"></span><span class="preprocessor">#define TMC26XStepper_h</span>
89
+<a name="l00032"></a>00032 <span class="preprocessor"></span>
90
+<a name="l00034"></a>00034 
91
+<a name="l00039"></a><a class="code" href="_t_m_c26_x_stepper_8h.html#add42eee34f674f92c19bcd5266d2445f">00039</a> <span class="preprocessor">#define TMC26X_OVERTEMPERATURE_PREWARING 1</span>
92
+<a name="l00040"></a>00040 <span class="preprocessor"></span>
93
+<a name="l00041"></a>00041 
94
+<a name="l00047"></a><a class="code" href="_t_m_c26_x_stepper_8h.html#adae814ce848677abd87758c7ac79a436">00047</a> <span class="preprocessor">#define TMC26X_OVERTEMPERATURE_SHUTDOWN 2</span>
95
+<a name="l00048"></a>00048 <span class="preprocessor"></span>
96
+<a name="l00049"></a>00049 <span class="comment">//which values can be read out</span>
97
+<a name="l00054"></a><a class="code" href="_t_m_c26_x_stepper_8h.html#aff05d4a47ef8821322ccc2a20785fbee">00054</a> <span class="comment"></span><span class="preprocessor">#define TMC26X_READOUT_POSITION 0</span>
98
+<a name="l00055"></a>00055 <span class="preprocessor"></span>
99
+<a name="l00059"></a><a class="code" href="_t_m_c26_x_stepper_8h.html#ac864ff8886123039c7d2d3c617f7ef87">00059</a> <span class="preprocessor">#define TMC26X_READOUT_STALLGUARD 1</span>
100
+<a name="l00060"></a>00060 <span class="preprocessor"></span>
101
+<a name="l00064"></a><a class="code" href="_t_m_c26_x_stepper_8h.html#a01760ad15e3846536526a990efe47094">00064</a> <span class="preprocessor">#define TMC26X_READOUT_CURRENT 3</span>
102
+<a name="l00065"></a>00065 <span class="preprocessor"></span>
103
+<a name="l00070"></a><a class="code" href="_t_m_c26_x_stepper_8h.html#a28b1774bd4aa854fb5e4b6dc7db96ecb">00070</a> <span class="preprocessor">#define COOL_STEP_HALF_CS_LIMIT 0</span>
104
+<a name="l00071"></a>00071 <span class="preprocessor"></span>
105
+<a name="l00075"></a><a class="code" href="_t_m_c26_x_stepper_8h.html#a1a4db5eafd0a9247677153cb4c8b7d54">00075</a> <span class="preprocessor">#define COOL_STEP_QUARTDER_CS_LIMIT 1</span>
106
+<a name="l00076"></a>00076 <span class="preprocessor"></span>
107
+<a name="l00101"></a><a class="code" href="class_t_m_c26_x_stepper.html">00101</a> <span class="keyword">class </span><a class="code" href="class_t_m_c26_x_stepper.html" title="Class representing a TMC26X stepper driver.">TMC26XStepper</a> {
108
+<a name="l00102"></a>00102   <span class="keyword">public</span>:
109
+<a name="l00124"></a>00124         <a class="code" href="class_t_m_c26_x_stepper.html#a3ef40763b8b8ab2b6ed4978c0647906c" title="creates a new represenatation of a stepper motor connected to a TMC26X stepper driver">TMC26XStepper</a>(<span class="keywordtype">int</span> number_of_steps, <span class="keywordtype">int</span> cs_pin, <span class="keywordtype">int</span> dir_pin, <span class="keywordtype">int</span> step_pin, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> current, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> resistor=150);
110
+<a name="l00125"></a>00125         
111
+<a name="l00133"></a>00133         <span class="keywordtype">void</span> <a class="code" href="class_t_m_c26_x_stepper.html#aad1ed82b3e05940bde5a6c7ed3d3e8f7" title="configures and starts the TMC26X stepper driver. Before you called this function the stepper driver i...">start</a>();
112
+<a name="l00134"></a>00134     
113
+<a name="l00145"></a>00145         <span class="keywordtype">void</span> <a class="code" href="class_t_m_c26_x_stepper.html#af968e70a13068f1e71ac0fa6865630c5" title="resets the stepper in unconfigured mode.">un_start</a>();
114
+<a name="l00146"></a>00146 
115
+<a name="l00147"></a>00147 
116
+<a name="l00152"></a>00152     <span class="keywordtype">void</span> <a class="code" href="class_t_m_c26_x_stepper.html#a9478f43090995c8d5cdb4d4e8c07cdbd" title="Sets the rotation speed in revolutions per minute.">setSpeed</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> whatSpeed);
117
+<a name="l00153"></a>00153     
118
+<a name="l00158"></a>00158     <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="class_t_m_c26_x_stepper.html#aa564f5cc0218d30ef897c2830c768c29" title="reads out the currently selected speed in revolutions per minute.">getSpeed</a>(<span class="keywordtype">void</span>);
119
+<a name="l00159"></a>00159 
120
+<a name="l00168"></a>00168         <span class="keywordtype">void</span> <a class="code" href="class_t_m_c26_x_stepper.html#a21041579c7f9284567ee2e2a55a3afd0" title="Set the number of microsteps in 2^i values (rounded) up to 256.">setMicrosteps</a>(<span class="keywordtype">int</span> number_of_steps);
121
+<a name="l00169"></a>00169     
122
+<a name="l00178"></a>00178         <span class="keywordtype">int</span> <a class="code" href="class_t_m_c26_x_stepper.html#a5808551ced98b79c09bbb4bf47ecfec3" title="returns the effective current number of microsteps selected.">getMicrosteps</a>(<span class="keywordtype">void</span>);
123
+<a name="l00179"></a>00179 
124
+<a name="l00195"></a>00195     <span class="keywordtype">char</span> <a class="code" href="class_t_m_c26_x_stepper.html#ac073a742496885f1f60751f9fb9c395d" title="Initiate a movement for the given number of steps. Positive numbers move in one, negative numbers in ...">step</a>(<span class="keywordtype">int</span> number_of_steps);
125
+<a name="l00196"></a>00196     
126
+<a name="l00215"></a>00215     <span class="keywordtype">char</span> <a class="code" href="class_t_m_c26_x_stepper.html#aed5d81f1549615529c723600a68ba415" title="Central movement method, must be called as often as possible in the lopp function and is very fast...">move</a>(<span class="keywordtype">void</span>);
127
+<a name="l00216"></a>00216 
128
+<a name="l00224"></a>00224     <span class="keywordtype">char</span> <a class="code" href="class_t_m_c26_x_stepper.html#a880d602be8414b7b965287c1790cd50e" title="checks if the motor still has to move to fulfill the last movement command.">isMoving</a>(<span class="keywordtype">void</span>);
129
+<a name="l00225"></a>00225     
130
+<a name="l00230"></a>00230     <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="class_t_m_c26_x_stepper.html#aa6c3211f85301ca0fb2e7b73cb8142a7" title="Get the number of steps left in the current movement.">getStepsLeft</a>(<span class="keywordtype">void</span>);
131
+<a name="l00231"></a>00231     
132
+<a name="l00238"></a>00238     <span class="keywordtype">char</span> <a class="code" href="class_t_m_c26_x_stepper.html#a6315c18eadbc6bf4f3d81a6f80296123" title="Stops the motor regardless if it moves or not.">stop</a>(<span class="keywordtype">void</span>);
133
+<a name="l00239"></a>00239     
134
+<a name="l00264"></a>00264         <span class="keywordtype">void</span> <a class="code" href="class_t_m_c26_x_stepper.html#ac2d8a2bbae2aba3ed7c98e3ff1a06649" title="Sets and configure the classical Constant Off Timer Chopper.">setConstantOffTimeChopper</a>(<span class="keywordtype">char</span> constant_off_time, <span class="keywordtype">char</span> blank_time, <span class="keywordtype">char</span> fast_decay_time_setting, <span class="keywordtype">char</span> sine_wave_offset, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> use_current_comparator);
135
+<a name="l00265"></a>00265     
136
+<a name="l00286"></a>00286         <span class="keywordtype">void</span> <a class="code" href="class_t_m_c26_x_stepper.html#aa152bb7ddb72a2bc8465553a39232df2" title="Sets and configures with spread cycle chopper.">setSpreadCycleChopper</a>(<span class="keywordtype">char</span> constant_off_time, <span class="keywordtype">char</span> blank_time, <span class="keywordtype">char</span> hysteresis_start, <span class="keywordtype">char</span> hysteresis_end, <span class="keywordtype">char</span> hysteresis_decrement);
137
+<a name="l00287"></a>00287 
138
+<a name="l00303"></a>00303         <span class="keywordtype">void</span> <a class="code" href="class_t_m_c26_x_stepper.html#a7ffd602cf4bf385847cba034417d5f0a" title="Use random off time for noise reduction (0 for off, -1 for on).">setRandomOffTime</a>(<span class="keywordtype">char</span> value);
139
+<a name="l00304"></a>00304     
140
+<a name="l00312"></a>00312         <span class="keywordtype">void</span> <a class="code" href="class_t_m_c26_x_stepper.html#aaa35fac83417c16b3a941fa168e4a4d2" title="set the maximum motor current in mA (1000 is 1 Amp) Keep in mind this is the maximum peak Current...">setCurrent</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> current);
141
+<a name="l00313"></a>00313     
142
+<a name="l00320"></a>00320     <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="class_t_m_c26_x_stepper.html#a0c544e23efe3e4a912aacf57de84b71f" title="readout the motor maximum current in mA (1000 is an Amp) This is the maximum current. to get the current current - which may be affected by CoolStep us getCurrentCurrent()">getCurrent</a>(<span class="keywordtype">void</span>);
143
+<a name="l00321"></a>00321     
144
+<a name="l00337"></a>00337         <span class="keywordtype">void</span> <a class="code" href="class_t_m_c26_x_stepper.html#af1a5abc23757860baf8ff421689a425a" title="set the StallGuard threshold in order to get sensible StallGuard readings.">setStallGuardThreshold</a>(<span class="keywordtype">char</span> stall_guard_threshold, <span class="keywordtype">char</span> stall_guard_filter_enabled);
145
+<a name="l00338"></a>00338     
146
+<a name="l00343"></a>00343     <span class="keywordtype">char</span> <a class="code" href="class_t_m_c26_x_stepper.html#a056661f444725c3ae15696d1e8d91def" title="reads out the StallGuard threshold">getStallGuardThreshold</a>(<span class="keywordtype">void</span>);
147
+<a name="l00344"></a>00344     
148
+<a name="l00349"></a>00349     <span class="keywordtype">char</span> <a class="code" href="class_t_m_c26_x_stepper.html#a47e3443e3e786314c1099b8f14a91b8a" title="returns the current setting of the StallGuard filter">getStallGuardFilter</a>(<span class="keywordtype">void</span>);
149
+<a name="l00350"></a>00350     
150
+<a name="l00368"></a>00368     <span class="keywordtype">void</span> <a class="code" href="class_t_m_c26_x_stepper.html#a381fbcce7c586ca2f1da8f9e704df14e" title="This method configures the CoolStep smart energy operation. You must have a proper StallGuard configu...">setCoolStepConfiguration</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> lower_SG_threshold, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> SG_hysteresis, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> current_decrement_step_size,
151
+<a name="l00369"></a>00369                                   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> current_increment_step_size, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> lower_current_limit);
152
+<a name="l00370"></a>00370     
153
+<a name="l00376"></a>00376     <span class="keywordtype">void</span> <a class="code" href="class_t_m_c26_x_stepper.html#a15bf0ed5a166a5d9a41f90f3ccbc6157" title="enables or disables the CoolStep smart energy operation feature. It must be configured before enablin...">setCoolStepEnabled</a>(<span class="keywordtype">boolean</span> enabled);
154
+<a name="l00377"></a>00377     
155
+<a name="l00378"></a>00378     
156
+<a name="l00383"></a>00383     <span class="keywordtype">boolean</span> <a class="code" href="class_t_m_c26_x_stepper.html#a6de2306b6d8dc1fa2e50fccb66d8e66d" title="check if the CoolStep feature is enabled">isCoolStepEnabled</a>();
157
+<a name="l00384"></a>00384 
158
+<a name="l00389"></a>00389     <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="class_t_m_c26_x_stepper.html#aa7469949deaa39a58038b3ddef532bc8" title="returns the lower StallGuard threshold for the CoolStep operation">getCoolStepLowerSgThreshold</a>();
159
+<a name="l00390"></a>00390     
160
+<a name="l00395"></a>00395     <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="class_t_m_c26_x_stepper.html#ac61298fd658773c28823d33ab04e970f" title="returns the upper StallGuard threshold for the CoolStep operation">getCoolStepUpperSgThreshold</a>();
161
+<a name="l00396"></a>00396     
162
+<a name="l00401"></a>00401     <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="class_t_m_c26_x_stepper.html#aad44ee5ae73bf8e69af05674a304ba46" title="returns the number of StallGuard readings befor CoolStep adjusts the motor current.">getCoolStepNumberOfSGReadings</a>();
163
+<a name="l00402"></a>00402     
164
+<a name="l00407"></a>00407     <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="class_t_m_c26_x_stepper.html#ababe688a15f087d23d4ff2094fcee883" title="returns the increment steps for the current for the CoolStep operation">getCoolStepCurrentIncrementSize</a>();
165
+<a name="l00408"></a>00408     
166
+<a name="l00414"></a>00414     <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="class_t_m_c26_x_stepper.html#a0c7e8541abc120a3910e35c6fbf2167c" title="returns the absolut minium current for the CoolStep operation">getCoolStepLowerCurrentLimit</a>();
167
+<a name="l00415"></a>00415     
168
+<a name="l00422"></a>00422         <span class="keywordtype">int</span> <a class="code" href="class_t_m_c26_x_stepper.html#a1019f6f889acfd3176eecd60a0a20125" title="Get the current microstep position for phase A.">getMotorPosition</a>(<span class="keywordtype">void</span>);
169
+<a name="l00423"></a>00423     
170
+<a name="l00430"></a>00430         <span class="keywordtype">int</span> <a class="code" href="class_t_m_c26_x_stepper.html#aed570ce3eea640e087b046333015de1e" title="Reads the current StallGuard value.">getCurrentStallGuardReading</a>(<span class="keywordtype">void</span>);
171
+<a name="l00431"></a>00431     
172
+<a name="l00437"></a>00437     <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="class_t_m_c26_x_stepper.html#a1a939fb495d747c2c11be99a740371e1" title="Reads the current current setting value as fraction of the maximum current Returns values between 0 a...">getCurrentCSReading</a>(<span class="keywordtype">void</span>);
173
+<a name="l00438"></a>00438     
174
+<a name="l00439"></a>00439     
175
+<a name="l00444"></a>00444     <span class="keywordtype">boolean</span> <a class="code" href="class_t_m_c26_x_stepper.html#ad435db189ebb101fb2de90a484f33905" title="a convenience method to determine if the current scaling uses 0.31V or 0.165V as reference.">isCurrentScalingHalfed</a>();
176
+<a name="l00445"></a>00445 
177
+<a name="l00453"></a>00453     <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="class_t_m_c26_x_stepper.html#aa00741168a7def0a7a9d2f2c9d3b99d7" title="Reads the current current setting value and recalculates the absolute current in mA (1A would be 1000...">getCurrentCurrent</a>(<span class="keywordtype">void</span>);
178
+<a name="l00454"></a>00454     
179
+<a name="l00463"></a>00463         <span class="keywordtype">boolean</span> <a class="code" href="class_t_m_c26_x_stepper.html#aea4c6e1fac909116c6b55f902d6cff41" title="checks if there is a StallGuard warning in the last status">isStallGuardOverThreshold</a>(<span class="keywordtype">void</span>);
180
+<a name="l00464"></a>00464     
181
+<a name="l00471"></a>00471         <span class="keywordtype">char</span> <a class="code" href="class_t_m_c26_x_stepper.html#a7662c2fbc03d1f5a7da5cabcc153b2d7" title="Return over temperature status of the last status readout return 0 is everything is OK...">getOverTemperature</a>(<span class="keywordtype">void</span>);
182
+<a name="l00472"></a>00472     
183
+<a name="l00480"></a>00480         <span class="keywordtype">boolean</span> <a class="code" href="class_t_m_c26_x_stepper.html#ad329fa4693d3139dea241ebe3d0f33cf" title="Is motor channel A shorted to ground detected in the last status readout.">isShortToGroundA</a>(<span class="keywordtype">void</span>);
184
+<a name="l00481"></a>00481 
185
+<a name="l00488"></a>00488         <span class="keywordtype">boolean</span> <a class="code" href="class_t_m_c26_x_stepper.html#a0ccb54d40cce0d802aa56ff6261f9f3b" title="Is motor channel B shorted to ground detected in the last status readout.">isShortToGroundB</a>(<span class="keywordtype">void</span>);
186
+<a name="l00495"></a>00495         <span class="keywordtype">boolean</span> <a class="code" href="class_t_m_c26_x_stepper.html#af97b2ab9d1ba36765ac6f17cf25ec45c" title="iIs motor channel A connected according to the last statu readout.">isOpenLoadA</a>(<span class="keywordtype">void</span>);
187
+<a name="l00496"></a>00496 
188
+<a name="l00503"></a>00503         <span class="keywordtype">boolean</span> <a class="code" href="class_t_m_c26_x_stepper.html#a303590124f5ac6d6a06d0ec60d0b5303" title="iIs motor channel A connected according to the last statu readout.">isOpenLoadB</a>(<span class="keywordtype">void</span>);
189
+<a name="l00504"></a>00504     
190
+<a name="l00511"></a>00511         <span class="keywordtype">boolean</span> <a class="code" href="class_t_m_c26_x_stepper.html#ab26602f360a4fb6ec6d262011675b2b0" title="Is chopper inactive since 2^20 clock cycles - defaults to ~0,08s.">isStandStill</a>(<span class="keywordtype">void</span>);
191
+<a name="l00512"></a>00512 
192
+<a name="l00524"></a>00524         <span class="keywordtype">boolean</span> <a class="code" href="class_t_m_c26_x_stepper.html#afdeded501ec2cabeffde33d31b6573f7" title="checks if there is a StallGuard warning in the last status">isStallGuardReached</a>(<span class="keywordtype">void</span>);
193
+<a name="l00525"></a>00525     
194
+<a name="l00530"></a>00530     <span class="keywordtype">void</span> <a class="code" href="class_t_m_c26_x_stepper.html#a4472cd86ad5b65dec5ec45ce69158305" title="enables or disables the motor driver bridges. If disabled the motor can run freely. If enabled not.">setEnabled</a>(<span class="keywordtype">boolean</span> enabled);
195
+<a name="l00531"></a>00531     
196
+<a name="l00537"></a>00537     <span class="keywordtype">boolean</span> <a class="code" href="class_t_m_c26_x_stepper.html#a15796c0cbdeab23a343c3f25327283b6" title="checks if the output bridges are enabled. If the bridges are not enabled the motor can run freely...">isEnabled</a>();
197
+<a name="l00538"></a>00538 
198
+<a name="l00548"></a>00548         <span class="keywordtype">void</span> <a class="code" href="class_t_m_c26_x_stepper.html#af95a824bfdf49ef979b5354798e52967" title="Manually read out the status register This function sends a byte to the motor driver in order to get ...">readStatus</a>(<span class="keywordtype">char</span> read_value);
199
+<a name="l00549"></a>00549     
200
+<a name="l00554"></a>00554     <span class="keywordtype">int</span> <a class="code" href="class_t_m_c26_x_stepper.html#ae1db5ec2ec9bfbfaea83c659e006692e" title="Returns the current sense resistor value in milliohm. The default value of ,15 Ohm will return 150...">getResistor</a>();
201
+<a name="l00555"></a>00555 
202
+<a name="l00560"></a>00560         <span class="keywordtype">void</span> <a class="code" href="class_t_m_c26_x_stepper.html#ad5e5b1bf5a46d02577dd548083877ec3" title="Prints out all the information that can be found in the last status read out - it does not force a st...">debugLastStatus</a>(<span class="keywordtype">void</span>);
203
+<a name="l00565"></a>00565     <span class="keywordtype">int</span> <a class="code" href="class_t_m_c26_x_stepper.html#ab040d9df1e85d6fb0c105205a36b0215" title="library version">version</a>(<span class="keywordtype">void</span>);
204
+<a name="l00566"></a>00566 
205
+<a name="l00567"></a>00567   <span class="keyword">private</span>:    
206
+<a name="l00568"></a>00568         <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> steps_left;                <span class="comment">//the steps the motor has to do to complete the movement</span>
207
+<a name="l00569"></a>00569     <span class="keywordtype">int</span> direction;        <span class="comment">// Direction of rotation</span>
208
+<a name="l00570"></a>00570     <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> step_delay;    <span class="comment">// delay between steps, in ms, based on speed</span>
209
+<a name="l00571"></a>00571     <span class="keywordtype">int</span> number_of_steps;      <span class="comment">// total number of steps this motor can take</span>
210
+<a name="l00572"></a>00572     <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> speed; <span class="comment">// we need to store the current speed in order to change the speed after changing microstepping</span>
211
+<a name="l00573"></a>00573     <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> resistor; <span class="comment">//current sense resitor value in milliohm</span>
212
+<a name="l00574"></a>00574         
213
+<a name="l00575"></a>00575     <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> last_step_time;      <span class="comment">// time stamp in ms of when the last step was taken</span>
214
+<a name="l00576"></a>00576     <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> next_step_time;      <span class="comment">// time stamp in ms of when the last step was taken</span>
215
+<a name="l00577"></a>00577         
216
+<a name="l00578"></a>00578         <span class="comment">//driver control register copies to easily set &amp; modify the registers</span>
217
+<a name="l00579"></a>00579         <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> driver_control_register_value;
218
+<a name="l00580"></a>00580         <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> chopper_config_register;
219
+<a name="l00581"></a>00581         <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> cool_step_register_value;
220
+<a name="l00582"></a>00582         <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> stall_guard2_current_register_value;
221
+<a name="l00583"></a>00583         <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> driver_configuration_register_value;
222
+<a name="l00584"></a>00584         <span class="comment">//the driver status result</span>
223
+<a name="l00585"></a>00585         <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> driver_status_result;
224
+<a name="l00586"></a>00586         
225
+<a name="l00587"></a>00587         <span class="comment">//helper routione to get the top 10 bit of the readout</span>
226
+<a name="l00588"></a>00588         <span class="keyword">inline</span> <span class="keywordtype">int</span> getReadoutValue();
227
+<a name="l00589"></a>00589         
228
+<a name="l00590"></a>00590         <span class="comment">//the pins for the stepper driver</span>
229
+<a name="l00591"></a>00591         <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> cs_pin;
230
+<a name="l00592"></a>00592         <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> step_pin;
231
+<a name="l00593"></a>00593         <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> dir_pin;
232
+<a name="l00594"></a>00594         
233
+<a name="l00595"></a>00595         <span class="comment">//status values </span>
234
+<a name="l00596"></a>00596         <span class="keywordtype">boolean</span> started; <span class="comment">//if the stepper has been started yet</span>
235
+<a name="l00597"></a>00597         <span class="keywordtype">int</span> microsteps; <span class="comment">//the current number of micro steps</span>
236
+<a name="l00598"></a>00598     <span class="keywordtype">char</span> constant_off_time; <span class="comment">//we need to remember this value in order to enable and disable the motor</span>
237
+<a name="l00599"></a>00599     <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> cool_step_lower_threshold; <span class="comment">// we need to remember the threshold to enable and disable the CoolStep feature</span>
238
+<a name="l00600"></a>00600     <span class="keywordtype">boolean</span> cool_step_enabled; <span class="comment">//we need to remember this to configure the coolstep if it si enabled</span>
239
+<a name="l00601"></a>00601         
240
+<a name="l00602"></a>00602         <span class="comment">//SPI sender</span>
241
+<a name="l00603"></a>00603         <span class="keyword">inline</span> <span class="keywordtype">void</span> send262(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> datagram);
242
+<a name="l00604"></a>00604 };
243
+<a name="l00605"></a>00605 
244
+<a name="l00606"></a>00606 <span class="preprocessor">#endif</span>
245
+<a name="l00607"></a>00607 <span class="preprocessor"></span>
246
+</pre></div></div><!-- contents -->
247
+
248
+
249
+<hr class="footer"/><address class="footer"><small>
250
+Generated on Mon Nov 19 2012 20:26:21 for Trinamic TMC26X Stepper Driver for Arduino by &#160;<a href="http://www.doxygen.org/index.html">
251
+<img class="footer" src="doxygen.png" alt="doxygen"/>
252
+</a> 1.7.6.1
253
+</small></address>
254
+
255
+</body>
256
+</html>

+ 72
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/annotated.html View File

@@ -0,0 +1,72 @@
1
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
+<html xmlns="http://www.w3.org/1999/xhtml">
3
+<head>
4
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
6
+<title>Trinamic TMC26X Stepper Driver for Arduino: Class List</title>
7
+
8
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
9
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
10
+
11
+
12
+
13
+</head>
14
+<body>
15
+<div id="top"><!-- do not remove this div! -->
16
+
17
+
18
+<div id="titlearea">
19
+<table cellspacing="0" cellpadding="0">
20
+ <tbody>
21
+ <tr style="height: 56px;">
22
+  
23
+  
24
+  <td style="padding-left: 0.5em;">
25
+   <div id="projectname">Trinamic TMC26X Stepper Driver for Arduino
26
+   
27
+   </div>
28
+   
29
+  </td>
30
+  
31
+  
32
+  
33
+ </tr>
34
+ </tbody>
35
+</table>
36
+</div>
37
+
38
+<!-- Generated by Doxygen 1.7.6.1 -->
39
+  <div id="navrow1" class="tabs">
40
+    <ul class="tablist">
41
+      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
42
+      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
43
+      <li><a href="files.html"><span>Files</span></a></li>
44
+    </ul>
45
+  </div>
46
+  <div id="navrow2" class="tabs2">
47
+    <ul class="tablist">
48
+      <li class="current"><a href="annotated.html"><span>Class&#160;List</span></a></li>
49
+      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
50
+      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
51
+    </ul>
52
+  </div>
53
+</div>
54
+<div class="header">
55
+  <div class="headertitle">
56
+<div class="title">Class List</div>  </div>
57
+</div><!--header-->
58
+<div class="contents">
59
+<div class="textblock">Here are the classes, structs, unions and interfaces with brief descriptions:</div><table>
60
+  <tr><td class="indexkey"><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td class="indexvalue">Class representing a TMC26X stepper driver </td></tr>
61
+</table>
62
+</div><!-- contents -->
63
+
64
+
65
+<hr class="footer"/><address class="footer"><small>
66
+Generated on Mon Nov 19 2012 20:26:21 for Trinamic TMC26X Stepper Driver for Arduino by &#160;<a href="http://www.doxygen.org/index.html">
67
+<img class="footer" src="doxygen.png" alt="doxygen"/>
68
+</a> 1.7.6.1
69
+</small></address>
70
+
71
+</body>
72
+</html>

BIN
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/bc_s.png View File


+ 117
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/class_t_m_c26_x_stepper-members.html View File

@@ -0,0 +1,117 @@
1
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
+<html xmlns="http://www.w3.org/1999/xhtml">
3
+<head>
4
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
6
+<title>Trinamic TMC26X Stepper Driver for Arduino: Member List</title>
7
+
8
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
9
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
10
+
11
+
12
+
13
+</head>
14
+<body>
15
+<div id="top"><!-- do not remove this div! -->
16
+
17
+
18
+<div id="titlearea">
19
+<table cellspacing="0" cellpadding="0">
20
+ <tbody>
21
+ <tr style="height: 56px;">
22
+  
23
+  
24
+  <td style="padding-left: 0.5em;">
25
+   <div id="projectname">Trinamic TMC26X Stepper Driver for Arduino
26
+   
27
+   </div>
28
+   
29
+  </td>
30
+  
31
+  
32
+  
33
+ </tr>
34
+ </tbody>
35
+</table>
36
+</div>
37
+
38
+<!-- Generated by Doxygen 1.7.6.1 -->
39
+  <div id="navrow1" class="tabs">
40
+    <ul class="tablist">
41
+      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
42
+      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
43
+      <li><a href="files.html"><span>Files</span></a></li>
44
+    </ul>
45
+  </div>
46
+  <div id="navrow2" class="tabs2">
47
+    <ul class="tablist">
48
+      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
49
+      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
50
+      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
51
+    </ul>
52
+  </div>
53
+</div>
54
+<div class="header">
55
+  <div class="headertitle">
56
+<div class="title">TMC26XStepper Member List</div>  </div>
57
+</div><!--header-->
58
+<div class="contents">
59
+This is the complete list of members for <a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a>, including all inherited members.<table>
60
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#ad5e5b1bf5a46d02577dd548083877ec3">debugLastStatus</a>(void)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
61
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#ababe688a15f087d23d4ff2094fcee883">getCoolStepCurrentIncrementSize</a>()</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
62
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#a0c7e8541abc120a3910e35c6fbf2167c">getCoolStepLowerCurrentLimit</a>()</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
63
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#aa7469949deaa39a58038b3ddef532bc8">getCoolStepLowerSgThreshold</a>()</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
64
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#aad44ee5ae73bf8e69af05674a304ba46">getCoolStepNumberOfSGReadings</a>()</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
65
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#ac61298fd658773c28823d33ab04e970f">getCoolStepUpperSgThreshold</a>()</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
66
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#a0c544e23efe3e4a912aacf57de84b71f">getCurrent</a>(void)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
67
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#a1a939fb495d747c2c11be99a740371e1">getCurrentCSReading</a>(void)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
68
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#aa00741168a7def0a7a9d2f2c9d3b99d7">getCurrentCurrent</a>(void)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
69
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#aed570ce3eea640e087b046333015de1e">getCurrentStallGuardReading</a>(void)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
70
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#a5808551ced98b79c09bbb4bf47ecfec3">getMicrosteps</a>(void)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
71
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#a1019f6f889acfd3176eecd60a0a20125">getMotorPosition</a>(void)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
72
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#a7662c2fbc03d1f5a7da5cabcc153b2d7">getOverTemperature</a>(void)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
73
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#ae1db5ec2ec9bfbfaea83c659e006692e">getResistor</a>()</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
74
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#aa564f5cc0218d30ef897c2830c768c29">getSpeed</a>(void)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
75
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#a47e3443e3e786314c1099b8f14a91b8a">getStallGuardFilter</a>(void)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
76
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#a056661f444725c3ae15696d1e8d91def">getStallGuardThreshold</a>(void)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
77
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#aa6c3211f85301ca0fb2e7b73cb8142a7">getStepsLeft</a>(void)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
78
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#a6de2306b6d8dc1fa2e50fccb66d8e66d">isCoolStepEnabled</a>()</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
79
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#ad435db189ebb101fb2de90a484f33905">isCurrentScalingHalfed</a>()</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
80
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#a15796c0cbdeab23a343c3f25327283b6">isEnabled</a>()</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
81
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#a880d602be8414b7b965287c1790cd50e">isMoving</a>(void)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
82
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#af97b2ab9d1ba36765ac6f17cf25ec45c">isOpenLoadA</a>(void)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
83
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#a303590124f5ac6d6a06d0ec60d0b5303">isOpenLoadB</a>(void)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
84
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#ad329fa4693d3139dea241ebe3d0f33cf">isShortToGroundA</a>(void)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
85
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#a0ccb54d40cce0d802aa56ff6261f9f3b">isShortToGroundB</a>(void)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
86
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#aea4c6e1fac909116c6b55f902d6cff41">isStallGuardOverThreshold</a>(void)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
87
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#afdeded501ec2cabeffde33d31b6573f7">isStallGuardReached</a>(void)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
88
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#ab26602f360a4fb6ec6d262011675b2b0">isStandStill</a>(void)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
89
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#aed5d81f1549615529c723600a68ba415">move</a>(void)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
90
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#af95a824bfdf49ef979b5354798e52967">readStatus</a>(char read_value)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
91
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#ac2d8a2bbae2aba3ed7c98e3ff1a06649">setConstantOffTimeChopper</a>(char constant_off_time, char blank_time, char fast_decay_time_setting, char sine_wave_offset, unsigned char use_current_comparator)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
92
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#a381fbcce7c586ca2f1da8f9e704df14e">setCoolStepConfiguration</a>(unsigned int lower_SG_threshold, unsigned int SG_hysteresis, unsigned char current_decrement_step_size, unsigned char current_increment_step_size, unsigned char lower_current_limit)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
93
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#a15bf0ed5a166a5d9a41f90f3ccbc6157">setCoolStepEnabled</a>(boolean enabled)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
94
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#aaa35fac83417c16b3a941fa168e4a4d2">setCurrent</a>(unsigned int current)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
95
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#a4472cd86ad5b65dec5ec45ce69158305">setEnabled</a>(boolean enabled)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
96
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#a21041579c7f9284567ee2e2a55a3afd0">setMicrosteps</a>(int number_of_steps)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
97
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#a7ffd602cf4bf385847cba034417d5f0a">setRandomOffTime</a>(char value)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
98
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#a9478f43090995c8d5cdb4d4e8c07cdbd">setSpeed</a>(unsigned int whatSpeed)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
99
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#aa152bb7ddb72a2bc8465553a39232df2">setSpreadCycleChopper</a>(char constant_off_time, char blank_time, char hysteresis_start, char hysteresis_end, char hysteresis_decrement)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
100
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#af1a5abc23757860baf8ff421689a425a">setStallGuardThreshold</a>(char stall_guard_threshold, char stall_guard_filter_enabled)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
101
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#aad1ed82b3e05940bde5a6c7ed3d3e8f7">start</a>()</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
102
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#ac073a742496885f1f60751f9fb9c395d">step</a>(int number_of_steps)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
103
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#a6315c18eadbc6bf4f3d81a6f80296123">stop</a>(void)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
104
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#a3ef40763b8b8ab2b6ed4978c0647906c">TMC26XStepper</a>(int number_of_steps, int cs_pin, int dir_pin, int step_pin, unsigned int current, unsigned int resistor=150)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
105
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#af968e70a13068f1e71ac0fa6865630c5">un_start</a>()</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
106
+  <tr class="memlist"><td><a class="el" href="class_t_m_c26_x_stepper.html#ab040d9df1e85d6fb0c105205a36b0215">version</a>(void)</td><td><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a></td><td></td></tr>
107
+</table></div><!-- contents -->
108
+
109
+
110
+<hr class="footer"/><address class="footer"><small>
111
+Generated on Mon Nov 19 2012 20:26:21 for Trinamic TMC26X Stepper Driver for Arduino by &#160;<a href="http://www.doxygen.org/index.html">
112
+<img class="footer" src="doxygen.png" alt="doxygen"/>
113
+</a> 1.7.6.1
114
+</small></address>
115
+
116
+</body>
117
+</html>

+ 1463
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/class_t_m_c26_x_stepper.html
File diff suppressed because it is too large
View File


+ 78
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/classes.html View File

@@ -0,0 +1,78 @@
1
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
+<html xmlns="http://www.w3.org/1999/xhtml">
3
+<head>
4
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
6
+<title>Trinamic TMC26X Stepper Driver for Arduino: Class Index</title>
7
+
8
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
9
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
10
+
11
+
12
+
13
+</head>
14
+<body>
15
+<div id="top"><!-- do not remove this div! -->
16
+
17
+
18
+<div id="titlearea">
19
+<table cellspacing="0" cellpadding="0">
20
+ <tbody>
21
+ <tr style="height: 56px;">
22
+  
23
+  
24
+  <td style="padding-left: 0.5em;">
25
+   <div id="projectname">Trinamic TMC26X Stepper Driver for Arduino
26
+   
27
+   </div>
28
+   
29
+  </td>
30
+  
31
+  
32
+  
33
+ </tr>
34
+ </tbody>
35
+</table>
36
+</div>
37
+
38
+<!-- Generated by Doxygen 1.7.6.1 -->
39
+  <div id="navrow1" class="tabs">
40
+    <ul class="tablist">
41
+      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
42
+      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
43
+      <li><a href="files.html"><span>Files</span></a></li>
44
+    </ul>
45
+  </div>
46
+  <div id="navrow2" class="tabs2">
47
+    <ul class="tablist">
48
+      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
49
+      <li class="current"><a href="classes.html"><span>Class&#160;Index</span></a></li>
50
+      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
51
+    </ul>
52
+  </div>
53
+</div>
54
+<div class="header">
55
+  <div class="headertitle">
56
+<div class="title">Class Index</div>  </div>
57
+</div><!--header-->
58
+<div class="contents">
59
+<div class="qindex"><a class="qindex" href="#letter_T">T</a></div>
60
+<table style="margin: 10px; white-space: nowrap;" align="center" width="95%" border="0" cellspacing="0" cellpadding="0">
61
+<tr><td rowspan="2" valign="bottom"><a name="letter_T"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&#160;&#160;T&#160;&#160;</div></td></tr></table>
62
+</td><td></td></tr>
63
+<tr><td></td></tr>
64
+<tr><td valign="top"><a class="el" href="class_t_m_c26_x_stepper.html">TMC26XStepper</a>&#160;&#160;&#160;</td><td></td></tr>
65
+<tr><td></td><td></td></tr>
66
+</table>
67
+<div class="qindex"><a class="qindex" href="#letter_T">T</a></div>
68
+</div><!-- contents -->
69
+
70
+
71
+<hr class="footer"/><address class="footer"><small>
72
+Generated on Mon Nov 19 2012 20:26:21 for Trinamic TMC26X Stepper Driver for Arduino by &#160;<a href="http://www.doxygen.org/index.html">
73
+<img class="footer" src="doxygen.png" alt="doxygen"/>
74
+</a> 1.7.6.1
75
+</small></address>
76
+
77
+</body>
78
+</html>

BIN
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/closed.png View File


+ 949
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/doxygen.css View File

@@ -0,0 +1,949 @@
1
+/* The standard CSS for doxygen */
2
+
3
+body, table, div, p, dl {
4
+	font-family: Lucida Grande, Verdana, Geneva, Arial, sans-serif;
5
+	font-size: 13px;
6
+	line-height: 1.3;
7
+}
8
+
9
+/* @group Heading Levels */
10
+
11
+h1 {
12
+	font-size: 150%;
13
+}
14
+
15
+.title {
16
+	font-size: 150%;
17
+	font-weight: bold;
18
+	margin: 10px 2px;
19
+}
20
+
21
+h2 {
22
+	font-size: 120%;
23
+}
24
+
25
+h3 {
26
+	font-size: 100%;
27
+}
28
+
29
+dt {
30
+	font-weight: bold;
31
+}
32
+
33
+div.multicol {
34
+	-moz-column-gap: 1em;
35
+	-webkit-column-gap: 1em;
36
+	-moz-column-count: 3;
37
+	-webkit-column-count: 3;
38
+}
39
+
40
+p.startli, p.startdd, p.starttd {
41
+	margin-top: 2px;
42
+}
43
+
44
+p.endli {
45
+	margin-bottom: 0px;
46
+}
47
+
48
+p.enddd {
49
+	margin-bottom: 4px;
50
+}
51
+
52
+p.endtd {
53
+	margin-bottom: 2px;
54
+}
55
+
56
+/* @end */
57
+
58
+caption {
59
+	font-weight: bold;
60
+}
61
+
62
+span.legend {
63
+        font-size: 70%;
64
+        text-align: center;
65
+}
66
+
67
+h3.version {
68
+        font-size: 90%;
69
+        text-align: center;
70
+}
71
+
72
+div.qindex, div.navtab{
73
+	background-color: #EBEFF6;
74
+	border: 1px solid #A3B4D7;
75
+	text-align: center;
76
+}
77
+
78
+div.qindex, div.navpath {
79
+	width: 100%;
80
+	line-height: 140%;
81
+}
82
+
83
+div.navtab {
84
+	margin-right: 15px;
85
+}
86
+
87
+/* @group Link Styling */
88
+
89
+a {
90
+	color: #3D578C;
91
+	font-weight: normal;
92
+	text-decoration: none;
93
+}
94
+
95
+.contents a:visited {
96
+	color: #4665A2;
97
+}
98
+
99
+a:hover {
100
+	text-decoration: underline;
101
+}
102
+
103
+a.qindex {
104
+	font-weight: bold;
105
+}
106
+
107
+a.qindexHL {
108
+	font-weight: bold;
109
+	background-color: #9CAFD4;
110
+	color: #ffffff;
111
+	border: 1px double #869DCA;
112
+}
113
+
114
+.contents a.qindexHL:visited {
115
+        color: #ffffff;
116
+}
117
+
118
+a.el {
119
+	font-weight: bold;
120
+}
121
+
122
+a.elRef {
123
+}
124
+
125
+a.code, a.code:visited {
126
+	color: #4665A2; 
127
+}
128
+
129
+a.codeRef, a.codeRef:visited {
130
+	color: #4665A2; 
131
+}
132
+
133
+/* @end */
134
+
135
+dl.el {
136
+	margin-left: -1cm;
137
+}
138
+
139
+.fragment {
140
+	font-family: monospace, fixed;
141
+	font-size: 105%;
142
+}
143
+
144
+pre.fragment {
145
+	border: 1px solid #C4CFE5;
146
+	background-color: #FBFCFD;
147
+	padding: 4px 6px;
148
+	margin: 4px 8px 4px 2px;
149
+	overflow: auto;
150
+	word-wrap: break-word;
151
+	font-size:  9pt;
152
+	line-height: 125%;
153
+}
154
+
155
+div.ah {
156
+	background-color: black;
157
+	font-weight: bold;
158
+	color: #ffffff;
159
+	margin-bottom: 3px;
160
+	margin-top: 3px;
161
+	padding: 0.2em;
162
+	border: solid thin #333;
163
+	border-radius: 0.5em;
164
+	-webkit-border-radius: .5em;
165
+	-moz-border-radius: .5em;
166
+	box-shadow: 2px 2px 3px #999;
167
+	-webkit-box-shadow: 2px 2px 3px #999;
168
+	-moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px;
169
+	background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444));
170
+	background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000);
171
+}
172
+
173
+div.groupHeader {
174
+	margin-left: 16px;
175
+	margin-top: 12px;
176
+	font-weight: bold;
177
+}
178
+
179
+div.groupText {
180
+	margin-left: 16px;
181
+	font-style: italic;
182
+}
183
+
184
+body {
185
+	background-color: white;
186
+	color: black;
187
+        margin: 0;
188
+}
189
+
190
+div.contents {
191
+	margin-top: 10px;
192
+	margin-left: 8px;
193
+	margin-right: 8px;
194
+}
195
+
196
+td.indexkey {
197
+	background-color: #EBEFF6;
198
+	font-weight: bold;
199
+	border: 1px solid #C4CFE5;
200
+	margin: 2px 0px 2px 0;
201
+	padding: 2px 10px;
202
+        white-space: nowrap;
203
+        vertical-align: top;
204
+}
205
+
206
+td.indexvalue {
207
+	background-color: #EBEFF6;
208
+	border: 1px solid #C4CFE5;
209
+	padding: 2px 10px;
210
+	margin: 2px 0px;
211
+}
212
+
213
+tr.memlist {
214
+	background-color: #EEF1F7;
215
+}
216
+
217
+p.formulaDsp {
218
+	text-align: center;
219
+}
220
+
221
+img.formulaDsp {
222
+	
223
+}
224
+
225
+img.formulaInl {
226
+	vertical-align: middle;
227
+}
228
+
229
+div.center {
230
+	text-align: center;
231
+        margin-top: 0px;
232
+        margin-bottom: 0px;
233
+        padding: 0px;
234
+}
235
+
236
+div.center img {
237
+	border: 0px;
238
+}
239
+
240
+address.footer {
241
+	text-align: right;
242
+	padding-right: 12px;
243
+}
244
+
245
+img.footer {
246
+	border: 0px;
247
+	vertical-align: middle;
248
+}
249
+
250
+/* @group Code Colorization */
251
+
252
+span.keyword {
253
+	color: #008000
254
+}
255
+
256
+span.keywordtype {
257
+	color: #604020
258
+}
259
+
260
+span.keywordflow {
261
+	color: #e08000
262
+}
263
+
264
+span.comment {
265
+	color: #800000
266
+}
267
+
268
+span.preprocessor {
269
+	color: #806020
270
+}
271
+
272
+span.stringliteral {
273
+	color: #002080
274
+}
275
+
276
+span.charliteral {
277
+	color: #008080
278
+}
279
+
280
+span.vhdldigit { 
281
+	color: #ff00ff 
282
+}
283
+
284
+span.vhdlchar { 
285
+	color: #000000 
286
+}
287
+
288
+span.vhdlkeyword { 
289
+	color: #700070 
290
+}
291
+
292
+span.vhdllogic { 
293
+	color: #ff0000 
294
+}
295
+
296
+/* @end */
297
+
298
+/*
299
+.search {
300
+	color: #003399;
301
+	font-weight: bold;
302
+}
303
+
304
+form.search {
305
+	margin-bottom: 0px;
306
+	margin-top: 0px;
307
+}
308
+
309
+input.search {
310
+	font-size: 75%;
311
+	color: #000080;
312
+	font-weight: normal;
313
+	background-color: #e8eef2;
314
+}
315
+*/
316
+
317
+td.tiny {
318
+	font-size: 75%;
319
+}
320
+
321
+.dirtab {
322
+	padding: 4px;
323
+	border-collapse: collapse;
324
+	border: 1px solid #A3B4D7;
325
+}
326
+
327
+th.dirtab {
328
+	background: #EBEFF6;
329
+	font-weight: bold;
330
+}
331
+
332
+hr {
333
+	height: 0px;
334
+	border: none;
335
+	border-top: 1px solid #4A6AAA;
336
+}
337
+
338
+hr.footer {
339
+	height: 1px;
340
+}
341
+
342
+/* @group Member Descriptions */
343
+
344
+table.memberdecls {
345
+	border-spacing: 0px;
346
+	padding: 0px;
347
+}
348
+
349
+.mdescLeft, .mdescRight,
350
+.memItemLeft, .memItemRight,
351
+.memTemplItemLeft, .memTemplItemRight, .memTemplParams {
352
+	background-color: #F9FAFC;
353
+	border: none;
354
+	margin: 4px;
355
+	padding: 1px 0 0 8px;
356
+}
357
+
358
+.mdescLeft, .mdescRight {
359
+	padding: 0px 8px 4px 8px;
360
+	color: #555;
361
+}
362
+
363
+.memItemLeft, .memItemRight, .memTemplParams {
364
+	border-top: 1px solid #C4CFE5;
365
+}
366
+
367
+.memItemLeft, .memTemplItemLeft {
368
+        white-space: nowrap;
369
+}
370
+
371
+.memItemRight {
372
+	width: 100%;
373
+}
374
+
375
+.memTemplParams {
376
+	color: #4665A2;
377
+        white-space: nowrap;
378
+}
379
+
380
+/* @end */
381
+
382
+/* @group Member Details */
383
+
384
+/* Styles for detailed member documentation */
385
+
386
+.memtemplate {
387
+	font-size: 80%;
388
+	color: #4665A2;
389
+	font-weight: normal;
390
+	margin-left: 9px;
391
+}
392
+
393
+.memnav {
394
+	background-color: #EBEFF6;
395
+	border: 1px solid #A3B4D7;
396
+	text-align: center;
397
+	margin: 2px;
398
+	margin-right: 15px;
399
+	padding: 2px;
400
+}
401
+
402
+.mempage {
403
+	width: 100%;
404
+}
405
+
406
+.memitem {
407
+	padding: 0;
408
+	margin-bottom: 10px;
409
+	margin-right: 5px;
410
+}
411
+
412
+.memname {
413
+        white-space: nowrap;
414
+        font-weight: bold;
415
+        margin-left: 6px;
416
+}
417
+
418
+.memproto, dl.reflist dt {
419
+        border-top: 1px solid #A8B8D9;
420
+        border-left: 1px solid #A8B8D9;
421
+        border-right: 1px solid #A8B8D9;
422
+        padding: 6px 0px 6px 0px;
423
+        color: #253555;
424
+        font-weight: bold;
425
+        text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);
426
+        /* opera specific markup */
427
+        box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
428
+        border-top-right-radius: 8px;
429
+        border-top-left-radius: 8px;
430
+        /* firefox specific markup */
431
+        -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
432
+        -moz-border-radius-topright: 8px;
433
+        -moz-border-radius-topleft: 8px;
434
+        /* webkit specific markup */
435
+        -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
436
+        -webkit-border-top-right-radius: 8px;
437
+        -webkit-border-top-left-radius: 8px;
438
+        background-image:url('nav_f.png');
439
+        background-repeat:repeat-x;
440
+        background-color: #E2E8F2;
441
+
442
+}
443
+
444
+.memdoc, dl.reflist dd {
445
+        border-bottom: 1px solid #A8B8D9;      
446
+        border-left: 1px solid #A8B8D9;      
447
+        border-right: 1px solid #A8B8D9; 
448
+        padding: 2px 5px;
449
+        background-color: #FBFCFD;
450
+        border-top-width: 0;
451
+        /* opera specific markup */
452
+        border-bottom-left-radius: 8px;
453
+        border-bottom-right-radius: 8px;
454
+        box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
455
+        /* firefox specific markup */
456
+        -moz-border-radius-bottomleft: 8px;
457
+        -moz-border-radius-bottomright: 8px;
458
+        -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
459
+        background-image: -moz-linear-gradient(center top, #FFFFFF 0%, #FFFFFF 60%, #F7F8FB 95%, #EEF1F7);
460
+        /* webkit specific markup */
461
+        -webkit-border-bottom-left-radius: 8px;
462
+        -webkit-border-bottom-right-radius: 8px;
463
+        -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
464
+        background-image: -webkit-gradient(linear,center top,center bottom,from(#FFFFFF), color-stop(0.6,#FFFFFF), color-stop(0.60,#FFFFFF), color-stop(0.95,#F7F8FB), to(#EEF1F7));
465
+}
466
+
467
+dl.reflist dt {
468
+        padding: 5px;
469
+}
470
+
471
+dl.reflist dd {
472
+        margin: 0px 0px 10px 0px;
473
+        padding: 5px;
474
+}
475
+
476
+.paramkey {
477
+	text-align: right;
478
+}
479
+
480
+.paramtype {
481
+	white-space: nowrap;
482
+}
483
+
484
+.paramname {
485
+	color: #602020;
486
+	white-space: nowrap;
487
+}
488
+.paramname em {
489
+	font-style: normal;
490
+}
491
+
492
+.params, .retval, .exception, .tparams {
493
+        border-spacing: 6px 2px;
494
+}       
495
+
496
+.params .paramname, .retval .paramname {
497
+        font-weight: bold;
498
+        vertical-align: top;
499
+}
500
+        
501
+.params .paramtype {
502
+        font-style: italic;
503
+        vertical-align: top;
504
+}       
505
+        
506
+.params .paramdir {
507
+        font-family: "courier new",courier,monospace;
508
+        vertical-align: top;
509
+}
510
+
511
+
512
+
513
+
514
+/* @end */
515
+
516
+/* @group Directory (tree) */
517
+
518
+/* for the tree view */
519
+
520
+.ftvtree {
521
+	font-family: sans-serif;
522
+	margin: 0px;
523
+}
524
+
525
+/* these are for tree view when used as main index */
526
+
527
+.directory {
528
+	font-size: 9pt;
529
+	font-weight: bold;
530
+	margin: 5px;
531
+}
532
+
533
+.directory h3 {
534
+	margin: 0px;
535
+	margin-top: 1em;
536
+	font-size: 11pt;
537
+}
538
+
539
+/*
540
+The following two styles can be used to replace the root node title
541
+with an image of your choice.  Simply uncomment the next two styles,
542
+specify the name of your image and be sure to set 'height' to the
543
+proper pixel height of your image.
544
+*/
545
+
546
+/*
547
+.directory h3.swap {
548
+	height: 61px;
549
+	background-repeat: no-repeat;
550
+	background-image: url("yourimage.gif");
551
+}
552
+.directory h3.swap span {
553
+	display: none;
554
+}
555
+*/
556
+
557
+.directory > h3 {
558
+	margin-top: 0;
559
+}
560
+
561
+.directory p {
562
+	margin: 0px;
563
+	white-space: nowrap;
564
+}
565
+
566
+.directory div {
567
+	display: none;
568
+	margin: 0px;
569
+}
570
+
571
+.directory img {
572
+	vertical-align: -30%;
573
+}
574
+
575
+/* these are for tree view when not used as main index */
576
+
577
+.directory-alt {
578
+	font-size: 100%;
579
+	font-weight: bold;
580
+}
581
+
582
+.directory-alt h3 {
583
+	margin: 0px;
584
+	margin-top: 1em;
585
+	font-size: 11pt;
586
+}
587
+
588
+.directory-alt > h3 {
589
+	margin-top: 0;
590
+}
591
+
592
+.directory-alt p {
593
+	margin: 0px;
594
+	white-space: nowrap;
595
+}
596
+
597
+.directory-alt div {
598
+	display: none;
599
+	margin: 0px;
600
+}
601
+
602
+.directory-alt img {
603
+	vertical-align: -30%;
604
+}
605
+
606
+/* @end */
607
+
608
+div.dynheader {
609
+        margin-top: 8px;
610
+}
611
+
612
+address {
613
+	font-style: normal;
614
+	color: #2A3D61;
615
+}
616
+
617
+table.doxtable {
618
+	border-collapse:collapse;
619
+}
620
+
621
+table.doxtable td, table.doxtable th {
622
+	border: 1px solid #2D4068;
623
+	padding: 3px 7px 2px;
624
+}
625
+
626
+table.doxtable th {
627
+	background-color: #374F7F;
628
+	color: #FFFFFF;
629
+	font-size: 110%;
630
+	padding-bottom: 4px;
631
+	padding-top: 5px;
632
+	text-align:left;
633
+}
634
+
635
+table.fieldtable {
636
+        width: 100%;
637
+        margin-bottom: 10px;
638
+        border: 1px solid #A8B8D9;
639
+        border-spacing: 0px;
640
+        -moz-border-radius: 4px;
641
+        -webkit-border-radius: 4px;
642
+        border-radius: 4px;
643
+        -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px;
644
+        -webkit-box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15);
645
+        box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15);
646
+}
647
+
648
+.fieldtable td, .fieldtable th {
649
+        padding: 3px 7px 2px;
650
+}
651
+
652
+.fieldtable td.fieldtype, .fieldtable td.fieldname {
653
+        white-space: nowrap;
654
+        border-right: 1px solid #A8B8D9;
655
+        border-bottom: 1px solid #A8B8D9;
656
+        vertical-align: top;
657
+}
658
+
659
+.fieldtable td.fielddoc {
660
+        border-bottom: 1px solid #A8B8D9;
661
+        width: 100%;
662
+}
663
+
664
+.fieldtable tr:last-child td {
665
+        border-bottom: none;
666
+}
667
+
668
+.fieldtable th {
669
+        background-image:url('nav_f.png');
670
+        background-repeat:repeat-x;
671
+        background-color: #E2E8F2;
672
+        font-size: 90%;
673
+        color: #253555;
674
+        padding-bottom: 4px;
675
+        padding-top: 5px;
676
+        text-align:left;
677
+        -moz-border-radius-topleft: 4px;
678
+        -moz-border-radius-topright: 4px;
679
+        -webkit-border-top-left-radius: 4px;
680
+        -webkit-border-top-right-radius: 4px;
681
+        border-top-left-radius: 4px;
682
+        border-top-right-radius: 4px;
683
+        border-bottom: 1px solid #A8B8D9;
684
+}
685
+
686
+
687
+.tabsearch {
688
+	top: 0px;
689
+	left: 10px;
690
+	height: 36px;
691
+	background-image: url('tab_b.png');
692
+	z-index: 101;
693
+	overflow: hidden;
694
+	font-size: 13px;
695
+}
696
+
697
+.navpath ul
698
+{
699
+	font-size: 11px;
700
+	background-image:url('tab_b.png');
701
+	background-repeat:repeat-x;
702
+	height:30px;
703
+	line-height:30px;
704
+	color:#8AA0CC;
705
+	border:solid 1px #C2CDE4;
706
+	overflow:hidden;
707
+	margin:0px;
708
+	padding:0px;
709
+}
710
+
711
+.navpath li
712
+{
713
+	list-style-type:none;
714
+	float:left;
715
+	padding-left:10px;
716
+	padding-right:15px;
717
+	background-image:url('bc_s.png');
718
+	background-repeat:no-repeat;
719
+	background-position:right;
720
+	color:#364D7C;
721
+}
722
+
723
+.navpath li.navelem a
724
+{
725
+	height:32px;
726
+	display:block;
727
+	text-decoration: none;
728
+	outline: none;
729
+}
730
+
731
+.navpath li.navelem a:hover
732
+{
733
+	color:#6884BD;
734
+}
735
+
736
+.navpath li.footer
737
+{
738
+        list-style-type:none;
739
+        float:right;
740
+        padding-left:10px;
741
+        padding-right:15px;
742
+        background-image:none;
743
+        background-repeat:no-repeat;
744
+        background-position:right;
745
+        color:#364D7C;
746
+        font-size: 8pt;
747
+}
748
+
749
+
750
+div.summary
751
+{
752
+	float: right;
753
+	font-size: 8pt;
754
+	padding-right: 5px;
755
+	width: 50%;
756
+	text-align: right;
757
+}       
758
+
759
+div.summary a
760
+{
761
+	white-space: nowrap;
762
+}
763
+
764
+div.ingroups
765
+{
766
+	margin-left: 5px;
767
+	font-size: 8pt;
768
+	padding-left: 5px;
769
+	width: 50%;
770
+	text-align: left;
771
+}
772
+
773
+div.ingroups a
774
+{
775
+	white-space: nowrap;
776
+}
777
+
778
+div.header
779
+{
780
+        background-image:url('nav_h.png');
781
+        background-repeat:repeat-x;
782
+	background-color: #F9FAFC;
783
+	margin:  0px;
784
+	border-bottom: 1px solid #C4CFE5;
785
+}
786
+
787
+div.headertitle
788
+{
789
+	padding: 5px 5px 5px 7px;
790
+}
791
+
792
+dl
793
+{
794
+        padding: 0 0 0 10px;
795
+}
796
+
797
+dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug
798
+{
799
+        border-left:4px solid;
800
+        padding: 0 0 0 6px;
801
+}
802
+
803
+dl.note
804
+{
805
+        border-color: #D0C000;
806
+}
807
+
808
+dl.warning, dl.attention
809
+{
810
+        border-color: #FF0000;
811
+}
812
+
813
+dl.pre, dl.post, dl.invariant
814
+{
815
+        border-color: #00D000;
816
+}
817
+
818
+dl.deprecated
819
+{
820
+        border-color: #505050;
821
+}
822
+
823
+dl.todo
824
+{
825
+        border-color: #00C0E0;
826
+}
827
+
828
+dl.test
829
+{
830
+        border-color: #3030E0;
831
+}
832
+
833
+dl.bug
834
+{
835
+        border-color: #C08050;
836
+}
837
+
838
+#projectlogo
839
+{
840
+	text-align: center;
841
+	vertical-align: bottom;
842
+	border-collapse: separate;
843
+}
844
+ 
845
+#projectlogo img
846
+{ 
847
+	border: 0px none;
848
+}
849
+ 
850
+#projectname
851
+{
852
+	font: 300% Tahoma, Arial,sans-serif;
853
+	margin: 0px;
854
+	padding: 2px 0px;
855
+}
856
+    
857
+#projectbrief
858
+{
859
+	font: 120% Tahoma, Arial,sans-serif;
860
+	margin: 0px;
861
+	padding: 0px;
862
+}
863
+
864
+#projectnumber
865
+{
866
+	font: 50% Tahoma, Arial,sans-serif;
867
+	margin: 0px;
868
+	padding: 0px;
869
+}
870
+
871
+#titlearea
872
+{
873
+	padding: 0px;
874
+	margin: 0px;
875
+	width: 100%;
876
+	border-bottom: 1px solid #5373B4;
877
+}
878
+
879
+.image
880
+{
881
+        text-align: center;
882
+}
883
+
884
+.dotgraph
885
+{
886
+        text-align: center;
887
+}
888
+
889
+.mscgraph
890
+{
891
+        text-align: center;
892
+}
893
+
894
+.caption
895
+{
896
+	font-weight: bold;
897
+}
898
+
899
+div.zoom
900
+{
901
+	border: 1px solid #90A5CE;
902
+}
903
+
904
+dl.citelist {
905
+        margin-bottom:50px;
906
+}
907
+
908
+dl.citelist dt {
909
+        color:#334975;
910
+        float:left;
911
+        font-weight:bold;
912
+        margin-right:10px;
913
+        padding:5px;
914
+}
915
+
916
+dl.citelist dd {
917
+        margin:2px 0;
918
+        padding:5px 0;
919
+}
920
+
921
+@media print
922
+{
923
+  #top { display: none; }
924
+  #side-nav { display: none; }
925
+  #nav-path { display: none; }
926
+  body { overflow:visible; }
927
+  h1, h2, h3, h4, h5, h6 { page-break-after: avoid; }
928
+  .summary { display: none; }
929
+  .memitem { page-break-inside: avoid; }
930
+  #doc-content
931
+  {
932
+    margin-left:0 !important;
933
+    height:auto !important;
934
+    width:auto !important;
935
+    overflow:inherit;
936
+    display:inline;
937
+  }
938
+  pre.fragment
939
+  {
940
+    overflow: visible;
941
+    text-wrap: unrestricted;
942
+    white-space: -moz-pre-wrap; /* Moz */
943
+    white-space: -pre-wrap; /* Opera 4-6 */
944
+    white-space: -o-pre-wrap; /* Opera 7 */
945
+    white-space: pre-wrap; /* CSS3  */
946
+    word-wrap: break-word; /* IE 5.5+ */
947
+  }
948
+}
949
+

BIN
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/doxygen.png View File


+ 72
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/files.html View File

@@ -0,0 +1,72 @@
1
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
+<html xmlns="http://www.w3.org/1999/xhtml">
3
+<head>
4
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
6
+<title>Trinamic TMC26X Stepper Driver for Arduino: File List</title>
7
+
8
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
9
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
10
+
11
+
12
+
13
+</head>
14
+<body>
15
+<div id="top"><!-- do not remove this div! -->
16
+
17
+
18
+<div id="titlearea">
19
+<table cellspacing="0" cellpadding="0">
20
+ <tbody>
21
+ <tr style="height: 56px;">
22
+  
23
+  
24
+  <td style="padding-left: 0.5em;">
25
+   <div id="projectname">Trinamic TMC26X Stepper Driver for Arduino
26
+   
27
+   </div>
28
+   
29
+  </td>
30
+  
31
+  
32
+  
33
+ </tr>
34
+ </tbody>
35
+</table>
36
+</div>
37
+
38
+<!-- Generated by Doxygen 1.7.6.1 -->
39
+  <div id="navrow1" class="tabs">
40
+    <ul class="tablist">
41
+      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
42
+      <li><a href="annotated.html"><span>Classes</span></a></li>
43
+      <li class="current"><a href="files.html"><span>Files</span></a></li>
44
+    </ul>
45
+  </div>
46
+  <div id="navrow2" class="tabs2">
47
+    <ul class="tablist">
48
+      <li class="current"><a href="files.html"><span>File&#160;List</span></a></li>
49
+      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
50
+    </ul>
51
+  </div>
52
+</div>
53
+<div class="header">
54
+  <div class="headertitle">
55
+<div class="title">File List</div>  </div>
56
+</div><!--header-->
57
+<div class="contents">
58
+<div class="textblock">Here is a list of all files with brief descriptions:</div><table>
59
+  <tr><td class="indexkey"><a class="el" href="_t_m_c26_x_stepper_8cpp.html">TMC26XStepper.cpp</a> <a href="_t_m_c26_x_stepper_8cpp_source.html">[code]</a></td><td class="indexvalue"></td></tr>
60
+  <tr><td class="indexkey"><a class="el" href="_t_m_c26_x_stepper_8h.html">TMC26XStepper.h</a> <a href="_t_m_c26_x_stepper_8h_source.html">[code]</a></td><td class="indexvalue"></td></tr>
61
+</table>
62
+</div><!-- contents -->
63
+
64
+
65
+<hr class="footer"/><address class="footer"><small>
66
+Generated on Mon Nov 19 2012 20:26:21 for Trinamic TMC26X Stepper Driver for Arduino by &#160;<a href="http://www.doxygen.org/index.html">
67
+<img class="footer" src="doxygen.png" alt="doxygen"/>
68
+</a> 1.7.6.1
69
+</small></address>
70
+
71
+</body>
72
+</html>

+ 261
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/functions.html View File

@@ -0,0 +1,261 @@
1
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
+<html xmlns="http://www.w3.org/1999/xhtml">
3
+<head>
4
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
6
+<title>Trinamic TMC26X Stepper Driver for Arduino: Class Members</title>
7
+
8
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
9
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
10
+
11
+
12
+
13
+</head>
14
+<body>
15
+<div id="top"><!-- do not remove this div! -->
16
+
17
+
18
+<div id="titlearea">
19
+<table cellspacing="0" cellpadding="0">
20
+ <tbody>
21
+ <tr style="height: 56px;">
22
+  
23
+  
24
+  <td style="padding-left: 0.5em;">
25
+   <div id="projectname">Trinamic TMC26X Stepper Driver for Arduino
26
+   
27
+   </div>
28
+   
29
+  </td>
30
+  
31
+  
32
+  
33
+ </tr>
34
+ </tbody>
35
+</table>
36
+</div>
37
+
38
+<!-- Generated by Doxygen 1.7.6.1 -->
39
+  <div id="navrow1" class="tabs">
40
+    <ul class="tablist">
41
+      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
42
+      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
43
+      <li><a href="files.html"><span>Files</span></a></li>
44
+    </ul>
45
+  </div>
46
+  <div id="navrow2" class="tabs2">
47
+    <ul class="tablist">
48
+      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
49
+      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
50
+      <li class="current"><a href="functions.html"><span>Class&#160;Members</span></a></li>
51
+    </ul>
52
+  </div>
53
+  <div id="navrow3" class="tabs2">
54
+    <ul class="tablist">
55
+      <li class="current"><a href="functions.html"><span>All</span></a></li>
56
+      <li><a href="functions_func.html"><span>Functions</span></a></li>
57
+    </ul>
58
+  </div>
59
+  <div id="navrow4" class="tabs3">
60
+    <ul class="tablist">
61
+      <li><a href="#index_d"><span>d</span></a></li>
62
+      <li><a href="#index_g"><span>g</span></a></li>
63
+      <li><a href="#index_i"><span>i</span></a></li>
64
+      <li><a href="#index_m"><span>m</span></a></li>
65
+      <li><a href="#index_r"><span>r</span></a></li>
66
+      <li><a href="#index_s"><span>s</span></a></li>
67
+      <li><a href="#index_t"><span>t</span></a></li>
68
+      <li><a href="#index_u"><span>u</span></a></li>
69
+      <li><a href="#index_v"><span>v</span></a></li>
70
+    </ul>
71
+  </div>
72
+</div>
73
+<div class="contents">
74
+<div class="textblock">Here is a list of all class members with links to the classes they belong to:</div>
75
+
76
+<h3><a class="anchor" id="index_d"></a>- d -</h3><ul>
77
+<li>debugLastStatus()
78
+: <a class="el" href="class_t_m_c26_x_stepper.html#ad5e5b1bf5a46d02577dd548083877ec3">TMC26XStepper</a>
79
+</li>
80
+</ul>
81
+
82
+
83
+<h3><a class="anchor" id="index_g"></a>- g -</h3><ul>
84
+<li>getCoolStepCurrentIncrementSize()
85
+: <a class="el" href="class_t_m_c26_x_stepper.html#ababe688a15f087d23d4ff2094fcee883">TMC26XStepper</a>
86
+</li>
87
+<li>getCoolStepLowerCurrentLimit()
88
+: <a class="el" href="class_t_m_c26_x_stepper.html#a0c7e8541abc120a3910e35c6fbf2167c">TMC26XStepper</a>
89
+</li>
90
+<li>getCoolStepLowerSgThreshold()
91
+: <a class="el" href="class_t_m_c26_x_stepper.html#aa7469949deaa39a58038b3ddef532bc8">TMC26XStepper</a>
92
+</li>
93
+<li>getCoolStepNumberOfSGReadings()
94
+: <a class="el" href="class_t_m_c26_x_stepper.html#aad44ee5ae73bf8e69af05674a304ba46">TMC26XStepper</a>
95
+</li>
96
+<li>getCoolStepUpperSgThreshold()
97
+: <a class="el" href="class_t_m_c26_x_stepper.html#ac61298fd658773c28823d33ab04e970f">TMC26XStepper</a>
98
+</li>
99
+<li>getCurrent()
100
+: <a class="el" href="class_t_m_c26_x_stepper.html#a0c544e23efe3e4a912aacf57de84b71f">TMC26XStepper</a>
101
+</li>
102
+<li>getCurrentCSReading()
103
+: <a class="el" href="class_t_m_c26_x_stepper.html#a1a939fb495d747c2c11be99a740371e1">TMC26XStepper</a>
104
+</li>
105
+<li>getCurrentCurrent()
106
+: <a class="el" href="class_t_m_c26_x_stepper.html#aa00741168a7def0a7a9d2f2c9d3b99d7">TMC26XStepper</a>
107
+</li>
108
+<li>getCurrentStallGuardReading()
109
+: <a class="el" href="class_t_m_c26_x_stepper.html#aed570ce3eea640e087b046333015de1e">TMC26XStepper</a>
110
+</li>
111
+<li>getMicrosteps()
112
+: <a class="el" href="class_t_m_c26_x_stepper.html#a5808551ced98b79c09bbb4bf47ecfec3">TMC26XStepper</a>
113
+</li>
114
+<li>getMotorPosition()
115
+: <a class="el" href="class_t_m_c26_x_stepper.html#a1019f6f889acfd3176eecd60a0a20125">TMC26XStepper</a>
116
+</li>
117
+<li>getOverTemperature()
118
+: <a class="el" href="class_t_m_c26_x_stepper.html#a7662c2fbc03d1f5a7da5cabcc153b2d7">TMC26XStepper</a>
119
+</li>
120
+<li>getResistor()
121
+: <a class="el" href="class_t_m_c26_x_stepper.html#ae1db5ec2ec9bfbfaea83c659e006692e">TMC26XStepper</a>
122
+</li>
123
+<li>getSpeed()
124
+: <a class="el" href="class_t_m_c26_x_stepper.html#aa564f5cc0218d30ef897c2830c768c29">TMC26XStepper</a>
125
+</li>
126
+<li>getStallGuardFilter()
127
+: <a class="el" href="class_t_m_c26_x_stepper.html#a47e3443e3e786314c1099b8f14a91b8a">TMC26XStepper</a>
128
+</li>
129
+<li>getStallGuardThreshold()
130
+: <a class="el" href="class_t_m_c26_x_stepper.html#a056661f444725c3ae15696d1e8d91def">TMC26XStepper</a>
131
+</li>
132
+<li>getStepsLeft()
133
+: <a class="el" href="class_t_m_c26_x_stepper.html#aa6c3211f85301ca0fb2e7b73cb8142a7">TMC26XStepper</a>
134
+</li>
135
+</ul>
136
+
137
+
138
+<h3><a class="anchor" id="index_i"></a>- i -</h3><ul>
139
+<li>isCoolStepEnabled()
140
+: <a class="el" href="class_t_m_c26_x_stepper.html#a6de2306b6d8dc1fa2e50fccb66d8e66d">TMC26XStepper</a>
141
+</li>
142
+<li>isCurrentScalingHalfed()
143
+: <a class="el" href="class_t_m_c26_x_stepper.html#ad435db189ebb101fb2de90a484f33905">TMC26XStepper</a>
144
+</li>
145
+<li>isEnabled()
146
+: <a class="el" href="class_t_m_c26_x_stepper.html#a15796c0cbdeab23a343c3f25327283b6">TMC26XStepper</a>
147
+</li>
148
+<li>isMoving()
149
+: <a class="el" href="class_t_m_c26_x_stepper.html#a880d602be8414b7b965287c1790cd50e">TMC26XStepper</a>
150
+</li>
151
+<li>isOpenLoadA()
152
+: <a class="el" href="class_t_m_c26_x_stepper.html#af97b2ab9d1ba36765ac6f17cf25ec45c">TMC26XStepper</a>
153
+</li>
154
+<li>isOpenLoadB()
155
+: <a class="el" href="class_t_m_c26_x_stepper.html#a303590124f5ac6d6a06d0ec60d0b5303">TMC26XStepper</a>
156
+</li>
157
+<li>isShortToGroundA()
158
+: <a class="el" href="class_t_m_c26_x_stepper.html#ad329fa4693d3139dea241ebe3d0f33cf">TMC26XStepper</a>
159
+</li>
160
+<li>isShortToGroundB()
161
+: <a class="el" href="class_t_m_c26_x_stepper.html#a0ccb54d40cce0d802aa56ff6261f9f3b">TMC26XStepper</a>
162
+</li>
163
+<li>isStallGuardOverThreshold()
164
+: <a class="el" href="class_t_m_c26_x_stepper.html#aea4c6e1fac909116c6b55f902d6cff41">TMC26XStepper</a>
165
+</li>
166
+<li>isStallGuardReached()
167
+: <a class="el" href="class_t_m_c26_x_stepper.html#afdeded501ec2cabeffde33d31b6573f7">TMC26XStepper</a>
168
+</li>
169
+<li>isStandStill()
170
+: <a class="el" href="class_t_m_c26_x_stepper.html#ab26602f360a4fb6ec6d262011675b2b0">TMC26XStepper</a>
171
+</li>
172
+</ul>
173
+
174
+
175
+<h3><a class="anchor" id="index_m"></a>- m -</h3><ul>
176
+<li>move()
177
+: <a class="el" href="class_t_m_c26_x_stepper.html#aed5d81f1549615529c723600a68ba415">TMC26XStepper</a>
178
+</li>
179
+</ul>
180
+
181
+
182
+<h3><a class="anchor" id="index_r"></a>- r -</h3><ul>
183
+<li>readStatus()
184
+: <a class="el" href="class_t_m_c26_x_stepper.html#af95a824bfdf49ef979b5354798e52967">TMC26XStepper</a>
185
+</li>
186
+</ul>
187
+
188
+
189
+<h3><a class="anchor" id="index_s"></a>- s -</h3><ul>
190
+<li>setConstantOffTimeChopper()
191
+: <a class="el" href="class_t_m_c26_x_stepper.html#ac2d8a2bbae2aba3ed7c98e3ff1a06649">TMC26XStepper</a>
192
+</li>
193
+<li>setCoolStepConfiguration()
194
+: <a class="el" href="class_t_m_c26_x_stepper.html#a381fbcce7c586ca2f1da8f9e704df14e">TMC26XStepper</a>
195
+</li>
196
+<li>setCoolStepEnabled()
197
+: <a class="el" href="class_t_m_c26_x_stepper.html#a15bf0ed5a166a5d9a41f90f3ccbc6157">TMC26XStepper</a>
198
+</li>
199
+<li>setCurrent()
200
+: <a class="el" href="class_t_m_c26_x_stepper.html#aaa35fac83417c16b3a941fa168e4a4d2">TMC26XStepper</a>
201
+</li>
202
+<li>setEnabled()
203
+: <a class="el" href="class_t_m_c26_x_stepper.html#a4472cd86ad5b65dec5ec45ce69158305">TMC26XStepper</a>
204
+</li>
205
+<li>setMicrosteps()
206
+: <a class="el" href="class_t_m_c26_x_stepper.html#a21041579c7f9284567ee2e2a55a3afd0">TMC26XStepper</a>
207
+</li>
208
+<li>setRandomOffTime()
209
+: <a class="el" href="class_t_m_c26_x_stepper.html#a7ffd602cf4bf385847cba034417d5f0a">TMC26XStepper</a>
210
+</li>
211
+<li>setSpeed()
212
+: <a class="el" href="class_t_m_c26_x_stepper.html#a9478f43090995c8d5cdb4d4e8c07cdbd">TMC26XStepper</a>
213
+</li>
214
+<li>setSpreadCycleChopper()
215
+: <a class="el" href="class_t_m_c26_x_stepper.html#aa152bb7ddb72a2bc8465553a39232df2">TMC26XStepper</a>
216
+</li>
217
+<li>setStallGuardThreshold()
218
+: <a class="el" href="class_t_m_c26_x_stepper.html#af1a5abc23757860baf8ff421689a425a">TMC26XStepper</a>
219
+</li>
220
+<li>start()
221
+: <a class="el" href="class_t_m_c26_x_stepper.html#aad1ed82b3e05940bde5a6c7ed3d3e8f7">TMC26XStepper</a>
222
+</li>
223
+<li>step()
224
+: <a class="el" href="class_t_m_c26_x_stepper.html#ac073a742496885f1f60751f9fb9c395d">TMC26XStepper</a>
225
+</li>
226
+<li>stop()
227
+: <a class="el" href="class_t_m_c26_x_stepper.html#a6315c18eadbc6bf4f3d81a6f80296123">TMC26XStepper</a>
228
+</li>
229
+</ul>
230
+
231
+
232
+<h3><a class="anchor" id="index_t"></a>- t -</h3><ul>
233
+<li>TMC26XStepper()
234
+: <a class="el" href="class_t_m_c26_x_stepper.html#a3ef40763b8b8ab2b6ed4978c0647906c">TMC26XStepper</a>
235
+</li>
236
+</ul>
237
+
238
+
239
+<h3><a class="anchor" id="index_u"></a>- u -</h3><ul>
240
+<li>un_start()
241
+: <a class="el" href="class_t_m_c26_x_stepper.html#af968e70a13068f1e71ac0fa6865630c5">TMC26XStepper</a>
242
+</li>
243
+</ul>
244
+
245
+
246
+<h3><a class="anchor" id="index_v"></a>- v -</h3><ul>
247
+<li>version()
248
+: <a class="el" href="class_t_m_c26_x_stepper.html#ab040d9df1e85d6fb0c105205a36b0215">TMC26XStepper</a>
249
+</li>
250
+</ul>
251
+</div><!-- contents -->
252
+
253
+
254
+<hr class="footer"/><address class="footer"><small>
255
+Generated on Mon Nov 19 2012 20:26:21 for Trinamic TMC26X Stepper Driver for Arduino by &#160;<a href="http://www.doxygen.org/index.html">
256
+<img class="footer" src="doxygen.png" alt="doxygen"/>
257
+</a> 1.7.6.1
258
+</small></address>
259
+
260
+</body>
261
+</html>

+ 261
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/functions_func.html View File

@@ -0,0 +1,261 @@
1
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
+<html xmlns="http://www.w3.org/1999/xhtml">
3
+<head>
4
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
6
+<title>Trinamic TMC26X Stepper Driver for Arduino: Class Members - Functions</title>
7
+
8
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
9
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
10
+
11
+
12
+
13
+</head>
14
+<body>
15
+<div id="top"><!-- do not remove this div! -->
16
+
17
+
18
+<div id="titlearea">
19
+<table cellspacing="0" cellpadding="0">
20
+ <tbody>
21
+ <tr style="height: 56px;">
22
+  
23
+  
24
+  <td style="padding-left: 0.5em;">
25
+   <div id="projectname">Trinamic TMC26X Stepper Driver for Arduino
26
+   
27
+   </div>
28
+   
29
+  </td>
30
+  
31
+  
32
+  
33
+ </tr>
34
+ </tbody>
35
+</table>
36
+</div>
37
+
38
+<!-- Generated by Doxygen 1.7.6.1 -->
39
+  <div id="navrow1" class="tabs">
40
+    <ul class="tablist">
41
+      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
42
+      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
43
+      <li><a href="files.html"><span>Files</span></a></li>
44
+    </ul>
45
+  </div>
46
+  <div id="navrow2" class="tabs2">
47
+    <ul class="tablist">
48
+      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
49
+      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
50
+      <li class="current"><a href="functions.html"><span>Class&#160;Members</span></a></li>
51
+    </ul>
52
+  </div>
53
+  <div id="navrow3" class="tabs2">
54
+    <ul class="tablist">
55
+      <li><a href="functions.html"><span>All</span></a></li>
56
+      <li class="current"><a href="functions_func.html"><span>Functions</span></a></li>
57
+    </ul>
58
+  </div>
59
+  <div id="navrow4" class="tabs3">
60
+    <ul class="tablist">
61
+      <li><a href="#index_d"><span>d</span></a></li>
62
+      <li><a href="#index_g"><span>g</span></a></li>
63
+      <li><a href="#index_i"><span>i</span></a></li>
64
+      <li><a href="#index_m"><span>m</span></a></li>
65
+      <li><a href="#index_r"><span>r</span></a></li>
66
+      <li><a href="#index_s"><span>s</span></a></li>
67
+      <li><a href="#index_t"><span>t</span></a></li>
68
+      <li><a href="#index_u"><span>u</span></a></li>
69
+      <li><a href="#index_v"><span>v</span></a></li>
70
+    </ul>
71
+  </div>
72
+</div>
73
+<div class="contents">
74
+&#160;
75
+
76
+<h3><a class="anchor" id="index_d"></a>- d -</h3><ul>
77
+<li>debugLastStatus()
78
+: <a class="el" href="class_t_m_c26_x_stepper.html#ad5e5b1bf5a46d02577dd548083877ec3">TMC26XStepper</a>
79
+</li>
80
+</ul>
81
+
82
+
83
+<h3><a class="anchor" id="index_g"></a>- g -</h3><ul>
84
+<li>getCoolStepCurrentIncrementSize()
85
+: <a class="el" href="class_t_m_c26_x_stepper.html#ababe688a15f087d23d4ff2094fcee883">TMC26XStepper</a>
86
+</li>
87
+<li>getCoolStepLowerCurrentLimit()
88
+: <a class="el" href="class_t_m_c26_x_stepper.html#a0c7e8541abc120a3910e35c6fbf2167c">TMC26XStepper</a>
89
+</li>
90
+<li>getCoolStepLowerSgThreshold()
91
+: <a class="el" href="class_t_m_c26_x_stepper.html#aa7469949deaa39a58038b3ddef532bc8">TMC26XStepper</a>
92
+</li>
93
+<li>getCoolStepNumberOfSGReadings()
94
+: <a class="el" href="class_t_m_c26_x_stepper.html#aad44ee5ae73bf8e69af05674a304ba46">TMC26XStepper</a>
95
+</li>
96
+<li>getCoolStepUpperSgThreshold()
97
+: <a class="el" href="class_t_m_c26_x_stepper.html#ac61298fd658773c28823d33ab04e970f">TMC26XStepper</a>
98
+</li>
99
+<li>getCurrent()
100
+: <a class="el" href="class_t_m_c26_x_stepper.html#a0c544e23efe3e4a912aacf57de84b71f">TMC26XStepper</a>
101
+</li>
102
+<li>getCurrentCSReading()
103
+: <a class="el" href="class_t_m_c26_x_stepper.html#a1a939fb495d747c2c11be99a740371e1">TMC26XStepper</a>
104
+</li>
105
+<li>getCurrentCurrent()
106
+: <a class="el" href="class_t_m_c26_x_stepper.html#aa00741168a7def0a7a9d2f2c9d3b99d7">TMC26XStepper</a>
107
+</li>
108
+<li>getCurrentStallGuardReading()
109
+: <a class="el" href="class_t_m_c26_x_stepper.html#aed570ce3eea640e087b046333015de1e">TMC26XStepper</a>
110
+</li>
111
+<li>getMicrosteps()
112
+: <a class="el" href="class_t_m_c26_x_stepper.html#a5808551ced98b79c09bbb4bf47ecfec3">TMC26XStepper</a>
113
+</li>
114
+<li>getMotorPosition()
115
+: <a class="el" href="class_t_m_c26_x_stepper.html#a1019f6f889acfd3176eecd60a0a20125">TMC26XStepper</a>
116
+</li>
117
+<li>getOverTemperature()
118
+: <a class="el" href="class_t_m_c26_x_stepper.html#a7662c2fbc03d1f5a7da5cabcc153b2d7">TMC26XStepper</a>
119
+</li>
120
+<li>getResistor()
121
+: <a class="el" href="class_t_m_c26_x_stepper.html#ae1db5ec2ec9bfbfaea83c659e006692e">TMC26XStepper</a>
122
+</li>
123
+<li>getSpeed()
124
+: <a class="el" href="class_t_m_c26_x_stepper.html#aa564f5cc0218d30ef897c2830c768c29">TMC26XStepper</a>
125
+</li>
126
+<li>getStallGuardFilter()
127
+: <a class="el" href="class_t_m_c26_x_stepper.html#a47e3443e3e786314c1099b8f14a91b8a">TMC26XStepper</a>
128
+</li>
129
+<li>getStallGuardThreshold()
130
+: <a class="el" href="class_t_m_c26_x_stepper.html#a056661f444725c3ae15696d1e8d91def">TMC26XStepper</a>
131
+</li>
132
+<li>getStepsLeft()
133
+: <a class="el" href="class_t_m_c26_x_stepper.html#aa6c3211f85301ca0fb2e7b73cb8142a7">TMC26XStepper</a>
134
+</li>
135
+</ul>
136
+
137
+
138
+<h3><a class="anchor" id="index_i"></a>- i -</h3><ul>
139
+<li>isCoolStepEnabled()
140
+: <a class="el" href="class_t_m_c26_x_stepper.html#a6de2306b6d8dc1fa2e50fccb66d8e66d">TMC26XStepper</a>
141
+</li>
142
+<li>isCurrentScalingHalfed()
143
+: <a class="el" href="class_t_m_c26_x_stepper.html#ad435db189ebb101fb2de90a484f33905">TMC26XStepper</a>
144
+</li>
145
+<li>isEnabled()
146
+: <a class="el" href="class_t_m_c26_x_stepper.html#a15796c0cbdeab23a343c3f25327283b6">TMC26XStepper</a>
147
+</li>
148
+<li>isMoving()
149
+: <a class="el" href="class_t_m_c26_x_stepper.html#a880d602be8414b7b965287c1790cd50e">TMC26XStepper</a>
150
+</li>
151
+<li>isOpenLoadA()
152
+: <a class="el" href="class_t_m_c26_x_stepper.html#af97b2ab9d1ba36765ac6f17cf25ec45c">TMC26XStepper</a>
153
+</li>
154
+<li>isOpenLoadB()
155
+: <a class="el" href="class_t_m_c26_x_stepper.html#a303590124f5ac6d6a06d0ec60d0b5303">TMC26XStepper</a>
156
+</li>
157
+<li>isShortToGroundA()
158
+: <a class="el" href="class_t_m_c26_x_stepper.html#ad329fa4693d3139dea241ebe3d0f33cf">TMC26XStepper</a>
159
+</li>
160
+<li>isShortToGroundB()
161
+: <a class="el" href="class_t_m_c26_x_stepper.html#a0ccb54d40cce0d802aa56ff6261f9f3b">TMC26XStepper</a>
162
+</li>
163
+<li>isStallGuardOverThreshold()
164
+: <a class="el" href="class_t_m_c26_x_stepper.html#aea4c6e1fac909116c6b55f902d6cff41">TMC26XStepper</a>
165
+</li>
166
+<li>isStallGuardReached()
167
+: <a class="el" href="class_t_m_c26_x_stepper.html#afdeded501ec2cabeffde33d31b6573f7">TMC26XStepper</a>
168
+</li>
169
+<li>isStandStill()
170
+: <a class="el" href="class_t_m_c26_x_stepper.html#ab26602f360a4fb6ec6d262011675b2b0">TMC26XStepper</a>
171
+</li>
172
+</ul>
173
+
174
+
175
+<h3><a class="anchor" id="index_m"></a>- m -</h3><ul>
176
+<li>move()
177
+: <a class="el" href="class_t_m_c26_x_stepper.html#aed5d81f1549615529c723600a68ba415">TMC26XStepper</a>
178
+</li>
179
+</ul>
180
+
181
+
182
+<h3><a class="anchor" id="index_r"></a>- r -</h3><ul>
183
+<li>readStatus()
184
+: <a class="el" href="class_t_m_c26_x_stepper.html#af95a824bfdf49ef979b5354798e52967">TMC26XStepper</a>
185
+</li>
186
+</ul>
187
+
188
+
189
+<h3><a class="anchor" id="index_s"></a>- s -</h3><ul>
190
+<li>setConstantOffTimeChopper()
191
+: <a class="el" href="class_t_m_c26_x_stepper.html#ac2d8a2bbae2aba3ed7c98e3ff1a06649">TMC26XStepper</a>
192
+</li>
193
+<li>setCoolStepConfiguration()
194
+: <a class="el" href="class_t_m_c26_x_stepper.html#a381fbcce7c586ca2f1da8f9e704df14e">TMC26XStepper</a>
195
+</li>
196
+<li>setCoolStepEnabled()
197
+: <a class="el" href="class_t_m_c26_x_stepper.html#a15bf0ed5a166a5d9a41f90f3ccbc6157">TMC26XStepper</a>
198
+</li>
199
+<li>setCurrent()
200
+: <a class="el" href="class_t_m_c26_x_stepper.html#aaa35fac83417c16b3a941fa168e4a4d2">TMC26XStepper</a>
201
+</li>
202
+<li>setEnabled()
203
+: <a class="el" href="class_t_m_c26_x_stepper.html#a4472cd86ad5b65dec5ec45ce69158305">TMC26XStepper</a>
204
+</li>
205
+<li>setMicrosteps()
206
+: <a class="el" href="class_t_m_c26_x_stepper.html#a21041579c7f9284567ee2e2a55a3afd0">TMC26XStepper</a>
207
+</li>
208
+<li>setRandomOffTime()
209
+: <a class="el" href="class_t_m_c26_x_stepper.html#a7ffd602cf4bf385847cba034417d5f0a">TMC26XStepper</a>
210
+</li>
211
+<li>setSpeed()
212
+: <a class="el" href="class_t_m_c26_x_stepper.html#a9478f43090995c8d5cdb4d4e8c07cdbd">TMC26XStepper</a>
213
+</li>
214
+<li>setSpreadCycleChopper()
215
+: <a class="el" href="class_t_m_c26_x_stepper.html#aa152bb7ddb72a2bc8465553a39232df2">TMC26XStepper</a>
216
+</li>
217
+<li>setStallGuardThreshold()
218
+: <a class="el" href="class_t_m_c26_x_stepper.html#af1a5abc23757860baf8ff421689a425a">TMC26XStepper</a>
219
+</li>
220
+<li>start()
221
+: <a class="el" href="class_t_m_c26_x_stepper.html#aad1ed82b3e05940bde5a6c7ed3d3e8f7">TMC26XStepper</a>
222
+</li>
223
+<li>step()
224
+: <a class="el" href="class_t_m_c26_x_stepper.html#ac073a742496885f1f60751f9fb9c395d">TMC26XStepper</a>
225
+</li>
226
+<li>stop()
227
+: <a class="el" href="class_t_m_c26_x_stepper.html#a6315c18eadbc6bf4f3d81a6f80296123">TMC26XStepper</a>
228
+</li>
229
+</ul>
230
+
231
+
232
+<h3><a class="anchor" id="index_t"></a>- t -</h3><ul>
233
+<li>TMC26XStepper()
234
+: <a class="el" href="class_t_m_c26_x_stepper.html#a3ef40763b8b8ab2b6ed4978c0647906c">TMC26XStepper</a>
235
+</li>
236
+</ul>
237
+
238
+
239
+<h3><a class="anchor" id="index_u"></a>- u -</h3><ul>
240
+<li>un_start()
241
+: <a class="el" href="class_t_m_c26_x_stepper.html#af968e70a13068f1e71ac0fa6865630c5">TMC26XStepper</a>
242
+</li>
243
+</ul>
244
+
245
+
246
+<h3><a class="anchor" id="index_v"></a>- v -</h3><ul>
247
+<li>version()
248
+: <a class="el" href="class_t_m_c26_x_stepper.html#ab040d9df1e85d6fb0c105205a36b0215">TMC26XStepper</a>
249
+</li>
250
+</ul>
251
+</div><!-- contents -->
252
+
253
+
254
+<hr class="footer"/><address class="footer"><small>
255
+Generated on Mon Nov 19 2012 20:26:21 for Trinamic TMC26X Stepper Driver for Arduino by &#160;<a href="http://www.doxygen.org/index.html">
256
+<img class="footer" src="doxygen.png" alt="doxygen"/>
257
+</a> 1.7.6.1
258
+</small></address>
259
+
260
+</body>
261
+</html>

+ 289
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/globals.html View File

@@ -0,0 +1,289 @@
1
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
+<html xmlns="http://www.w3.org/1999/xhtml">
3
+<head>
4
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
6
+<title>Trinamic TMC26X Stepper Driver for Arduino: File Members</title>
7
+
8
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
9
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
10
+
11
+
12
+
13
+</head>
14
+<body>
15
+<div id="top"><!-- do not remove this div! -->
16
+
17
+
18
+<div id="titlearea">
19
+<table cellspacing="0" cellpadding="0">
20
+ <tbody>
21
+ <tr style="height: 56px;">
22
+  
23
+  
24
+  <td style="padding-left: 0.5em;">
25
+   <div id="projectname">Trinamic TMC26X Stepper Driver for Arduino
26
+   
27
+   </div>
28
+   
29
+  </td>
30
+  
31
+  
32
+  
33
+ </tr>
34
+ </tbody>
35
+</table>
36
+</div>
37
+
38
+<!-- Generated by Doxygen 1.7.6.1 -->
39
+  <div id="navrow1" class="tabs">
40
+    <ul class="tablist">
41
+      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
42
+      <li><a href="annotated.html"><span>Classes</span></a></li>
43
+      <li class="current"><a href="files.html"><span>Files</span></a></li>
44
+    </ul>
45
+  </div>
46
+  <div id="navrow2" class="tabs2">
47
+    <ul class="tablist">
48
+      <li><a href="files.html"><span>File&#160;List</span></a></li>
49
+      <li class="current"><a href="globals.html"><span>File&#160;Members</span></a></li>
50
+    </ul>
51
+  </div>
52
+  <div id="navrow3" class="tabs2">
53
+    <ul class="tablist">
54
+      <li class="current"><a href="globals.html"><span>All</span></a></li>
55
+      <li><a href="globals_defs.html"><span>Defines</span></a></li>
56
+    </ul>
57
+  </div>
58
+  <div id="navrow4" class="tabs3">
59
+    <ul class="tablist">
60
+      <li><a href="#index_b"><span>b</span></a></li>
61
+      <li><a href="#index_c"><span>c</span></a></li>
62
+      <li><a href="#index_d"><span>d</span></a></li>
63
+      <li><a href="#index_h"><span>h</span></a></li>
64
+      <li><a href="#index_i"><span>i</span></a></li>
65
+      <li><a href="#index_m"><span>m</span></a></li>
66
+      <li><a href="#index_r"><span>r</span></a></li>
67
+      <li><a href="#index_s"><span>s</span></a></li>
68
+      <li><a href="#index_t"><span>t</span></a></li>
69
+      <li><a href="#index_v"><span>v</span></a></li>
70
+    </ul>
71
+  </div>
72
+</div>
73
+<div class="contents">
74
+<div class="textblock">Here is a list of all file members with links to the files they belong to:</div>
75
+
76
+<h3><a class="anchor" id="index_b"></a>- b -</h3><ul>
77
+<li>BLANK_TIMING_PATTERN
78
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a42cb2ce84258587d514ec3268548ba89">TMC26XStepper.cpp</a>
79
+</li>
80
+<li>BLANK_TIMING_SHIFT
81
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#abdac78f7f2c506972265a8e5883e1eae">TMC26XStepper.cpp</a>
82
+</li>
83
+</ul>
84
+
85
+
86
+<h3><a class="anchor" id="index_c"></a>- c -</h3><ul>
87
+<li>CHOPPER_CONFIG_REGISTER
88
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a70a540d1090b989b8600b5e4776659fe">TMC26XStepper.cpp</a>
89
+</li>
90
+<li>CHOPPER_MODE_STANDARD
91
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a57418a67ff726d540b813230bca1d536">TMC26XStepper.cpp</a>
92
+</li>
93
+<li>CHOPPER_MODE_T_OFF_FAST_DECAY
94
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#aaf1b564ced7de8ff3245c964e3775826">TMC26XStepper.cpp</a>
95
+</li>
96
+<li>COOL_STEP_HALF_CS_LIMIT
97
+: <a class="el" href="_t_m_c26_x_stepper_8h.html#a28b1774bd4aa854fb5e4b6dc7db96ecb">TMC26XStepper.h</a>
98
+</li>
99
+<li>COOL_STEP_QUARTDER_CS_LIMIT
100
+: <a class="el" href="_t_m_c26_x_stepper_8h.html#a1a4db5eafd0a9247677153cb4c8b7d54">TMC26XStepper.h</a>
101
+</li>
102
+<li>COOL_STEP_REGISTER
103
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ab9828bfaa075a0a8647c709136016317">TMC26XStepper.cpp</a>
104
+</li>
105
+<li>CURRENT_DOWN_STEP_SPEED_PATTERN
106
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#adbe13a0464355e42fbe786ca5f58ed8d">TMC26XStepper.cpp</a>
107
+</li>
108
+<li>CURRENT_SCALING_PATTERN
109
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a99dcb8c6d98b0b54c23699a3f90450e4">TMC26XStepper.cpp</a>
110
+</li>
111
+</ul>
112
+
113
+
114
+<h3><a class="anchor" id="index_d"></a>- d -</h3><ul>
115
+<li>DEFAULT_MICROSTEPPING_VALUE
116
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a6560b3471273e99e280ba795e3469ede">TMC26XStepper.cpp</a>
117
+</li>
118
+<li>DOUBLE_EDGE_STEP
119
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a770601bf0153e4bc639b9c3005b15af7">TMC26XStepper.cpp</a>
120
+</li>
121
+<li>DRIVER_CONFIG_REGISTER
122
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#af35f569d42ea3b1d634901a3b6a908ee">TMC26XStepper.cpp</a>
123
+</li>
124
+<li>DRIVER_CONTROL_REGISTER
125
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a108f18bf4a30a0e0f0991ac0e4ce0579">TMC26XStepper.cpp</a>
126
+</li>
127
+</ul>
128
+
129
+
130
+<h3><a class="anchor" id="index_h"></a>- h -</h3><ul>
131
+<li>HYSTERESIS_DECREMENT_PATTERN
132
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a424c248097b38c1e29e6a58ad48e6bd9">TMC26XStepper.cpp</a>
133
+</li>
134
+<li>HYSTERESIS_DECREMENT_SHIFT
135
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a36e554a87785ce6ba998b79aae9e74e0">TMC26XStepper.cpp</a>
136
+</li>
137
+<li>HYSTERESIS_LOW_SHIFT
138
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a38ce0bb0fa20db28351ac9167f28db98">TMC26XStepper.cpp</a>
139
+</li>
140
+<li>HYSTERESIS_LOW_VALUE_PATTERN
141
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ad9d2302f6d61cd84a612a2e2bcdeb56e">TMC26XStepper.cpp</a>
142
+</li>
143
+<li>HYSTERESIS_START_VALUE_PATTERN
144
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a0de4e98b412dced62c3a4452b7483af3">TMC26XStepper.cpp</a>
145
+</li>
146
+<li>HYSTERESIS_START_VALUE_SHIFT
147
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ac2c1c939256126e605396c4aaee3c804">TMC26XStepper.cpp</a>
148
+</li>
149
+</ul>
150
+
151
+
152
+<h3><a class="anchor" id="index_i"></a>- i -</h3><ul>
153
+<li>INITIAL_MICROSTEPPING
154
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a54a6d12e96d851361974b10614a00e45">TMC26XStepper.cpp</a>
155
+</li>
156
+</ul>
157
+
158
+
159
+<h3><a class="anchor" id="index_m"></a>- m -</h3><ul>
160
+<li>MICROSTEPPING_PATTERN
161
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a8f5cb0c066109ffb18cefc0e85ee1d1b">TMC26XStepper.cpp</a>
162
+</li>
163
+<li>MINIMUM_CURRENT_FOURTH
164
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a8a261a77d198b85f6dd8416387b354b3">TMC26XStepper.cpp</a>
165
+</li>
166
+</ul>
167
+
168
+
169
+<h3><a class="anchor" id="index_r"></a>- r -</h3><ul>
170
+<li>RANDOM_TOFF_TIME
171
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a64520580cffd416668f3b91bd60f84e1">TMC26XStepper.cpp</a>
172
+</li>
173
+<li>READ_MICROSTEP_POSTION
174
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a143b7757272f07866d9655bde8303d9a">TMC26XStepper.cpp</a>
175
+</li>
176
+<li>READ_SELECTION_PATTERN
177
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a88a4b45fa6385eba8aa4f0342334b832">TMC26XStepper.cpp</a>
178
+</li>
179
+<li>READ_STALL_GUARD_AND_COOL_STEP
180
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#aef62b7fdcbac0b33b2d6e9cea4b5f9b2">TMC26XStepper.cpp</a>
181
+</li>
182
+<li>READ_STALL_GUARD_READING
183
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ac1bd4da94fab7ce1049be2f866211819">TMC26XStepper.cpp</a>
184
+</li>
185
+<li>READOUT_VALUE_PATTERN
186
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a5c3d76da63f585e37813c32be2e11ab7">TMC26XStepper.cpp</a>
187
+</li>
188
+<li>REGISTER_BIT_PATTERN
189
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a3b02ee1f518b0c90c16488f937abd443">TMC26XStepper.cpp</a>
190
+</li>
191
+</ul>
192
+
193
+
194
+<h3><a class="anchor" id="index_s"></a>- s -</h3><ul>
195
+<li>SE_CURRENT_STEP_WIDTH_PATTERN
196
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#aba6c07e5672e34e618bb3a550ab0d2bc">TMC26XStepper.cpp</a>
197
+</li>
198
+<li>SE_MAX_PATTERN
199
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ac8f748bf735c447dbed7dd4c7b631a87">TMC26XStepper.cpp</a>
200
+</li>
201
+<li>SE_MIN_PATTERN
202
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ae1862dfb958c03698b0abd95fda033ea">TMC26XStepper.cpp</a>
203
+</li>
204
+<li>STALL_GUARD2_LOAD_MEASURE_REGISTER
205
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a478d9bde09a6528eef6af6ffeeb6caba">TMC26XStepper.cpp</a>
206
+</li>
207
+<li>STALL_GUARD_CONFIG_PATTERN
208
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a99ac04f0615556fc13c0c9f3e1c1b49d">TMC26XStepper.cpp</a>
209
+</li>
210
+<li>STALL_GUARD_FILTER_ENABLED
211
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#afdbbefabd0c29c4b6e403c4663d0f0be">TMC26XStepper.cpp</a>
212
+</li>
213
+<li>STALL_GUARD_TRESHHOLD_VALUE_PATTERN
214
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ae631457932894a974334892704550ecc">TMC26XStepper.cpp</a>
215
+</li>
216
+<li>STALL_GUARD_VALUE_PATTERN
217
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a6a1cb1fd61cf7c570f94376fa11fe55b">TMC26XStepper.cpp</a>
218
+</li>
219
+<li>STATUS_OPEN_LOAD_A
220
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ae9cbbe5af7188e6bff8fe412f8e42f59">TMC26XStepper.cpp</a>
221
+</li>
222
+<li>STATUS_OPEN_LOAD_B
223
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ab29dc5cd6c6c4e5bf99e71bd563e1be1">TMC26XStepper.cpp</a>
224
+</li>
225
+<li>STATUS_OVER_TEMPERATURE_SHUTDOWN
226
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#adbb23d2f055c9eab55eac29d1a75deb4">TMC26XStepper.cpp</a>
227
+</li>
228
+<li>STATUS_OVER_TEMPERATURE_WARNING
229
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#aa317fd77f2f26fdfbfd331e21d9069e8">TMC26XStepper.cpp</a>
230
+</li>
231
+<li>STATUS_SHORT_TO_GROUND_A
232
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a8e03041302a092174fa33b3cf837dca2">TMC26XStepper.cpp</a>
233
+</li>
234
+<li>STATUS_SHORT_TO_GROUND_B
235
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a903c3eba99695a32c6736463dcfd93ae">TMC26XStepper.cpp</a>
236
+</li>
237
+<li>STATUS_STALL_GUARD_STATUS
238
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#aa09ef662fd19bf2d063d6bd0f48eca14">TMC26XStepper.cpp</a>
239
+</li>
240
+<li>STATUS_STAND_STILL
241
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ab96ed1635faee6650e9cce73598a2773">TMC26XStepper.cpp</a>
242
+</li>
243
+<li>STEP_INTERPOLATION
244
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#aa64245f223209654c60588e4558e0bab">TMC26XStepper.cpp</a>
245
+</li>
246
+</ul>
247
+
248
+
249
+<h3><a class="anchor" id="index_t"></a>- t -</h3><ul>
250
+<li>T_OFF_PATTERN
251
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#aa4e49237f2671e7f28aa34ae0e89da8d">TMC26XStepper.cpp</a>
252
+</li>
253
+<li>T_OFF_TIMING_PATERN
254
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a7659d842c803e47ba911a2a6e26327f3">TMC26XStepper.cpp</a>
255
+</li>
256
+<li>TMC26X_OVERTEMPERATURE_PREWARING
257
+: <a class="el" href="_t_m_c26_x_stepper_8h.html#add42eee34f674f92c19bcd5266d2445f">TMC26XStepper.h</a>
258
+</li>
259
+<li>TMC26X_OVERTEMPERATURE_SHUTDOWN
260
+: <a class="el" href="_t_m_c26_x_stepper_8h.html#adae814ce848677abd87758c7ac79a436">TMC26XStepper.h</a>
261
+</li>
262
+<li>TMC26X_READOUT_CURRENT
263
+: <a class="el" href="_t_m_c26_x_stepper_8h.html#a01760ad15e3846536526a990efe47094">TMC26XStepper.h</a>
264
+</li>
265
+<li>TMC26X_READOUT_POSITION
266
+: <a class="el" href="_t_m_c26_x_stepper_8h.html#aff05d4a47ef8821322ccc2a20785fbee">TMC26XStepper.h</a>
267
+</li>
268
+<li>TMC26X_READOUT_STALLGUARD
269
+: <a class="el" href="_t_m_c26_x_stepper_8h.html#ac864ff8886123039c7d2d3c617f7ef87">TMC26XStepper.h</a>
270
+</li>
271
+</ul>
272
+
273
+
274
+<h3><a class="anchor" id="index_v"></a>- v -</h3><ul>
275
+<li>VSENSE
276
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a4fb1c008e2ff76eee9362600eed112e1">TMC26XStepper.cpp</a>
277
+</li>
278
+</ul>
279
+</div><!-- contents -->
280
+
281
+
282
+<hr class="footer"/><address class="footer"><small>
283
+Generated on Mon Nov 19 2012 20:26:21 for Trinamic TMC26X Stepper Driver for Arduino by &#160;<a href="http://www.doxygen.org/index.html">
284
+<img class="footer" src="doxygen.png" alt="doxygen"/>
285
+</a> 1.7.6.1
286
+</small></address>
287
+
288
+</body>
289
+</html>

+ 289
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/globals_defs.html View File

@@ -0,0 +1,289 @@
1
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
+<html xmlns="http://www.w3.org/1999/xhtml">
3
+<head>
4
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
6
+<title>Trinamic TMC26X Stepper Driver for Arduino: File Members</title>
7
+
8
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
9
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
10
+
11
+
12
+
13
+</head>
14
+<body>
15
+<div id="top"><!-- do not remove this div! -->
16
+
17
+
18
+<div id="titlearea">
19
+<table cellspacing="0" cellpadding="0">
20
+ <tbody>
21
+ <tr style="height: 56px;">
22
+  
23
+  
24
+  <td style="padding-left: 0.5em;">
25
+   <div id="projectname">Trinamic TMC26X Stepper Driver for Arduino
26
+   
27
+   </div>
28
+   
29
+  </td>
30
+  
31
+  
32
+  
33
+ </tr>
34
+ </tbody>
35
+</table>
36
+</div>
37
+
38
+<!-- Generated by Doxygen 1.7.6.1 -->
39
+  <div id="navrow1" class="tabs">
40
+    <ul class="tablist">
41
+      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
42
+      <li><a href="annotated.html"><span>Classes</span></a></li>
43
+      <li class="current"><a href="files.html"><span>Files</span></a></li>
44
+    </ul>
45
+  </div>
46
+  <div id="navrow2" class="tabs2">
47
+    <ul class="tablist">
48
+      <li><a href="files.html"><span>File&#160;List</span></a></li>
49
+      <li class="current"><a href="globals.html"><span>File&#160;Members</span></a></li>
50
+    </ul>
51
+  </div>
52
+  <div id="navrow3" class="tabs2">
53
+    <ul class="tablist">
54
+      <li><a href="globals.html"><span>All</span></a></li>
55
+      <li class="current"><a href="globals_defs.html"><span>Defines</span></a></li>
56
+    </ul>
57
+  </div>
58
+  <div id="navrow4" class="tabs3">
59
+    <ul class="tablist">
60
+      <li><a href="#index_b"><span>b</span></a></li>
61
+      <li><a href="#index_c"><span>c</span></a></li>
62
+      <li><a href="#index_d"><span>d</span></a></li>
63
+      <li><a href="#index_h"><span>h</span></a></li>
64
+      <li><a href="#index_i"><span>i</span></a></li>
65
+      <li><a href="#index_m"><span>m</span></a></li>
66
+      <li><a href="#index_r"><span>r</span></a></li>
67
+      <li><a href="#index_s"><span>s</span></a></li>
68
+      <li><a href="#index_t"><span>t</span></a></li>
69
+      <li><a href="#index_v"><span>v</span></a></li>
70
+    </ul>
71
+  </div>
72
+</div>
73
+<div class="contents">
74
+&#160;
75
+
76
+<h3><a class="anchor" id="index_b"></a>- b -</h3><ul>
77
+<li>BLANK_TIMING_PATTERN
78
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a42cb2ce84258587d514ec3268548ba89">TMC26XStepper.cpp</a>
79
+</li>
80
+<li>BLANK_TIMING_SHIFT
81
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#abdac78f7f2c506972265a8e5883e1eae">TMC26XStepper.cpp</a>
82
+</li>
83
+</ul>
84
+
85
+
86
+<h3><a class="anchor" id="index_c"></a>- c -</h3><ul>
87
+<li>CHOPPER_CONFIG_REGISTER
88
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a70a540d1090b989b8600b5e4776659fe">TMC26XStepper.cpp</a>
89
+</li>
90
+<li>CHOPPER_MODE_STANDARD
91
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a57418a67ff726d540b813230bca1d536">TMC26XStepper.cpp</a>
92
+</li>
93
+<li>CHOPPER_MODE_T_OFF_FAST_DECAY
94
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#aaf1b564ced7de8ff3245c964e3775826">TMC26XStepper.cpp</a>
95
+</li>
96
+<li>COOL_STEP_HALF_CS_LIMIT
97
+: <a class="el" href="_t_m_c26_x_stepper_8h.html#a28b1774bd4aa854fb5e4b6dc7db96ecb">TMC26XStepper.h</a>
98
+</li>
99
+<li>COOL_STEP_QUARTDER_CS_LIMIT
100
+: <a class="el" href="_t_m_c26_x_stepper_8h.html#a1a4db5eafd0a9247677153cb4c8b7d54">TMC26XStepper.h</a>
101
+</li>
102
+<li>COOL_STEP_REGISTER
103
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ab9828bfaa075a0a8647c709136016317">TMC26XStepper.cpp</a>
104
+</li>
105
+<li>CURRENT_DOWN_STEP_SPEED_PATTERN
106
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#adbe13a0464355e42fbe786ca5f58ed8d">TMC26XStepper.cpp</a>
107
+</li>
108
+<li>CURRENT_SCALING_PATTERN
109
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a99dcb8c6d98b0b54c23699a3f90450e4">TMC26XStepper.cpp</a>
110
+</li>
111
+</ul>
112
+
113
+
114
+<h3><a class="anchor" id="index_d"></a>- d -</h3><ul>
115
+<li>DEFAULT_MICROSTEPPING_VALUE
116
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a6560b3471273e99e280ba795e3469ede">TMC26XStepper.cpp</a>
117
+</li>
118
+<li>DOUBLE_EDGE_STEP
119
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a770601bf0153e4bc639b9c3005b15af7">TMC26XStepper.cpp</a>
120
+</li>
121
+<li>DRIVER_CONFIG_REGISTER
122
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#af35f569d42ea3b1d634901a3b6a908ee">TMC26XStepper.cpp</a>
123
+</li>
124
+<li>DRIVER_CONTROL_REGISTER
125
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a108f18bf4a30a0e0f0991ac0e4ce0579">TMC26XStepper.cpp</a>
126
+</li>
127
+</ul>
128
+
129
+
130
+<h3><a class="anchor" id="index_h"></a>- h -</h3><ul>
131
+<li>HYSTERESIS_DECREMENT_PATTERN
132
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a424c248097b38c1e29e6a58ad48e6bd9">TMC26XStepper.cpp</a>
133
+</li>
134
+<li>HYSTERESIS_DECREMENT_SHIFT
135
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a36e554a87785ce6ba998b79aae9e74e0">TMC26XStepper.cpp</a>
136
+</li>
137
+<li>HYSTERESIS_LOW_SHIFT
138
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a38ce0bb0fa20db28351ac9167f28db98">TMC26XStepper.cpp</a>
139
+</li>
140
+<li>HYSTERESIS_LOW_VALUE_PATTERN
141
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ad9d2302f6d61cd84a612a2e2bcdeb56e">TMC26XStepper.cpp</a>
142
+</li>
143
+<li>HYSTERESIS_START_VALUE_PATTERN
144
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a0de4e98b412dced62c3a4452b7483af3">TMC26XStepper.cpp</a>
145
+</li>
146
+<li>HYSTERESIS_START_VALUE_SHIFT
147
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ac2c1c939256126e605396c4aaee3c804">TMC26XStepper.cpp</a>
148
+</li>
149
+</ul>
150
+
151
+
152
+<h3><a class="anchor" id="index_i"></a>- i -</h3><ul>
153
+<li>INITIAL_MICROSTEPPING
154
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a54a6d12e96d851361974b10614a00e45">TMC26XStepper.cpp</a>
155
+</li>
156
+</ul>
157
+
158
+
159
+<h3><a class="anchor" id="index_m"></a>- m -</h3><ul>
160
+<li>MICROSTEPPING_PATTERN
161
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a8f5cb0c066109ffb18cefc0e85ee1d1b">TMC26XStepper.cpp</a>
162
+</li>
163
+<li>MINIMUM_CURRENT_FOURTH
164
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a8a261a77d198b85f6dd8416387b354b3">TMC26XStepper.cpp</a>
165
+</li>
166
+</ul>
167
+
168
+
169
+<h3><a class="anchor" id="index_r"></a>- r -</h3><ul>
170
+<li>RANDOM_TOFF_TIME
171
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a64520580cffd416668f3b91bd60f84e1">TMC26XStepper.cpp</a>
172
+</li>
173
+<li>READ_MICROSTEP_POSTION
174
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a143b7757272f07866d9655bde8303d9a">TMC26XStepper.cpp</a>
175
+</li>
176
+<li>READ_SELECTION_PATTERN
177
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a88a4b45fa6385eba8aa4f0342334b832">TMC26XStepper.cpp</a>
178
+</li>
179
+<li>READ_STALL_GUARD_AND_COOL_STEP
180
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#aef62b7fdcbac0b33b2d6e9cea4b5f9b2">TMC26XStepper.cpp</a>
181
+</li>
182
+<li>READ_STALL_GUARD_READING
183
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ac1bd4da94fab7ce1049be2f866211819">TMC26XStepper.cpp</a>
184
+</li>
185
+<li>READOUT_VALUE_PATTERN
186
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a5c3d76da63f585e37813c32be2e11ab7">TMC26XStepper.cpp</a>
187
+</li>
188
+<li>REGISTER_BIT_PATTERN
189
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a3b02ee1f518b0c90c16488f937abd443">TMC26XStepper.cpp</a>
190
+</li>
191
+</ul>
192
+
193
+
194
+<h3><a class="anchor" id="index_s"></a>- s -</h3><ul>
195
+<li>SE_CURRENT_STEP_WIDTH_PATTERN
196
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#aba6c07e5672e34e618bb3a550ab0d2bc">TMC26XStepper.cpp</a>
197
+</li>
198
+<li>SE_MAX_PATTERN
199
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ac8f748bf735c447dbed7dd4c7b631a87">TMC26XStepper.cpp</a>
200
+</li>
201
+<li>SE_MIN_PATTERN
202
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ae1862dfb958c03698b0abd95fda033ea">TMC26XStepper.cpp</a>
203
+</li>
204
+<li>STALL_GUARD2_LOAD_MEASURE_REGISTER
205
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a478d9bde09a6528eef6af6ffeeb6caba">TMC26XStepper.cpp</a>
206
+</li>
207
+<li>STALL_GUARD_CONFIG_PATTERN
208
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a99ac04f0615556fc13c0c9f3e1c1b49d">TMC26XStepper.cpp</a>
209
+</li>
210
+<li>STALL_GUARD_FILTER_ENABLED
211
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#afdbbefabd0c29c4b6e403c4663d0f0be">TMC26XStepper.cpp</a>
212
+</li>
213
+<li>STALL_GUARD_TRESHHOLD_VALUE_PATTERN
214
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ae631457932894a974334892704550ecc">TMC26XStepper.cpp</a>
215
+</li>
216
+<li>STALL_GUARD_VALUE_PATTERN
217
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a6a1cb1fd61cf7c570f94376fa11fe55b">TMC26XStepper.cpp</a>
218
+</li>
219
+<li>STATUS_OPEN_LOAD_A
220
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ae9cbbe5af7188e6bff8fe412f8e42f59">TMC26XStepper.cpp</a>
221
+</li>
222
+<li>STATUS_OPEN_LOAD_B
223
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ab29dc5cd6c6c4e5bf99e71bd563e1be1">TMC26XStepper.cpp</a>
224
+</li>
225
+<li>STATUS_OVER_TEMPERATURE_SHUTDOWN
226
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#adbb23d2f055c9eab55eac29d1a75deb4">TMC26XStepper.cpp</a>
227
+</li>
228
+<li>STATUS_OVER_TEMPERATURE_WARNING
229
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#aa317fd77f2f26fdfbfd331e21d9069e8">TMC26XStepper.cpp</a>
230
+</li>
231
+<li>STATUS_SHORT_TO_GROUND_A
232
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a8e03041302a092174fa33b3cf837dca2">TMC26XStepper.cpp</a>
233
+</li>
234
+<li>STATUS_SHORT_TO_GROUND_B
235
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a903c3eba99695a32c6736463dcfd93ae">TMC26XStepper.cpp</a>
236
+</li>
237
+<li>STATUS_STALL_GUARD_STATUS
238
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#aa09ef662fd19bf2d063d6bd0f48eca14">TMC26XStepper.cpp</a>
239
+</li>
240
+<li>STATUS_STAND_STILL
241
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#ab96ed1635faee6650e9cce73598a2773">TMC26XStepper.cpp</a>
242
+</li>
243
+<li>STEP_INTERPOLATION
244
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#aa64245f223209654c60588e4558e0bab">TMC26XStepper.cpp</a>
245
+</li>
246
+</ul>
247
+
248
+
249
+<h3><a class="anchor" id="index_t"></a>- t -</h3><ul>
250
+<li>T_OFF_PATTERN
251
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#aa4e49237f2671e7f28aa34ae0e89da8d">TMC26XStepper.cpp</a>
252
+</li>
253
+<li>T_OFF_TIMING_PATERN
254
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a7659d842c803e47ba911a2a6e26327f3">TMC26XStepper.cpp</a>
255
+</li>
256
+<li>TMC26X_OVERTEMPERATURE_PREWARING
257
+: <a class="el" href="_t_m_c26_x_stepper_8h.html#add42eee34f674f92c19bcd5266d2445f">TMC26XStepper.h</a>
258
+</li>
259
+<li>TMC26X_OVERTEMPERATURE_SHUTDOWN
260
+: <a class="el" href="_t_m_c26_x_stepper_8h.html#adae814ce848677abd87758c7ac79a436">TMC26XStepper.h</a>
261
+</li>
262
+<li>TMC26X_READOUT_CURRENT
263
+: <a class="el" href="_t_m_c26_x_stepper_8h.html#a01760ad15e3846536526a990efe47094">TMC26XStepper.h</a>
264
+</li>
265
+<li>TMC26X_READOUT_POSITION
266
+: <a class="el" href="_t_m_c26_x_stepper_8h.html#aff05d4a47ef8821322ccc2a20785fbee">TMC26XStepper.h</a>
267
+</li>
268
+<li>TMC26X_READOUT_STALLGUARD
269
+: <a class="el" href="_t_m_c26_x_stepper_8h.html#ac864ff8886123039c7d2d3c617f7ef87">TMC26XStepper.h</a>
270
+</li>
271
+</ul>
272
+
273
+
274
+<h3><a class="anchor" id="index_v"></a>- v -</h3><ul>
275
+<li>VSENSE
276
+: <a class="el" href="_t_m_c26_x_stepper_8cpp.html#a4fb1c008e2ff76eee9362600eed112e1">TMC26XStepper.cpp</a>
277
+</li>
278
+</ul>
279
+</div><!-- contents -->
280
+
281
+
282
+<hr class="footer"/><address class="footer"><small>
283
+Generated on Mon Nov 19 2012 20:26:21 for Trinamic TMC26X Stepper Driver for Arduino by &#160;<a href="http://www.doxygen.org/index.html">
284
+<img class="footer" src="doxygen.png" alt="doxygen"/>
285
+</a> 1.7.6.1
286
+</small></address>
287
+
288
+</body>
289
+</html>

+ 72
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/index.html View File

@@ -0,0 +1,72 @@
1
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
+<html xmlns="http://www.w3.org/1999/xhtml">
3
+<head>
4
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
6
+<title>Trinamic TMC26X Stepper Driver for Arduino: TMC 260, 261, 262 Stepper Driver for Arduino</title>
7
+
8
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
9
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
10
+
11
+
12
+
13
+</head>
14
+<body>
15
+<div id="top"><!-- do not remove this div! -->
16
+
17
+
18
+<div id="titlearea">
19
+<table cellspacing="0" cellpadding="0">
20
+ <tbody>
21
+ <tr style="height: 56px;">
22
+  
23
+  
24
+  <td style="padding-left: 0.5em;">
25
+   <div id="projectname">Trinamic TMC26X Stepper Driver for Arduino
26
+   
27
+   </div>
28
+   
29
+  </td>
30
+  
31
+  
32
+  
33
+ </tr>
34
+ </tbody>
35
+</table>
36
+</div>
37
+
38
+<!-- Generated by Doxygen 1.7.6.1 -->
39
+  <div id="navrow1" class="tabs">
40
+    <ul class="tablist">
41
+      <li class="current"><a href="index.html"><span>Main&#160;Page</span></a></li>
42
+      <li><a href="annotated.html"><span>Classes</span></a></li>
43
+      <li><a href="files.html"><span>Files</span></a></li>
44
+    </ul>
45
+  </div>
46
+</div>
47
+<div class="header">
48
+  <div class="headertitle">
49
+<div class="title">TMC 260, 261, 262 Stepper Driver for Arduino </div>  </div>
50
+</div><!--header-->
51
+<div class="contents">
52
+<div class="textblock"><dl class="author"><dt><b>Author:</b></dt><dd>Interactive MAtter, MArcus Nowotny, <a href="mailto:marcus@interactive-matter.eu">marcus@interactive-matter.eu</a> </dd></dl>
53
+<h2><a class="anchor" id="HOWTO"></a>
54
+How to use the driver</h2>
55
+<p>Here we go with aminial how to description</p>
56
+<h2><a class="anchor" id="COPYRIGHT_NOTIFICATION"></a>
57
+COPYRIGHT NOTIFICATION</h2>
58
+<dl class="user"><dt><b>(c) 2011 Interactive MAtter, Marcus Nowotny </b></dt><dd></dd></dl>
59
+<dl class="user"><dt><b></b></dt><dd>Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:</dd></dl>
60
+<p>The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.</p>
61
+<p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. </p>
62
+</div></div><!-- contents -->
63
+
64
+
65
+<hr class="footer"/><address class="footer"><small>
66
+Generated on Mon Nov 19 2012 20:26:21 for Trinamic TMC26X Stepper Driver for Arduino by &#160;<a href="http://www.doxygen.org/index.html">
67
+<img class="footer" src="doxygen.png" alt="doxygen"/>
68
+</a> 1.7.6.1
69
+</small></address>
70
+
71
+</body>
72
+</html>

+ 64
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/jquery.js
File diff suppressed because it is too large
View File


+ 68
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/mainpage_8dox.html View File

@@ -0,0 +1,68 @@
1
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
+<html xmlns="http://www.w3.org/1999/xhtml">
3
+<head>
4
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
6
+<title>Trinamic TMC26X Stepper Driver for Arduino: mainpage.dox File Reference</title>
7
+
8
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
9
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
10
+
11
+
12
+
13
+</head>
14
+<body>
15
+<div id="top"><!-- do not remove this div! -->
16
+
17
+
18
+<div id="titlearea">
19
+<table cellspacing="0" cellpadding="0">
20
+ <tbody>
21
+ <tr style="height: 56px;">
22
+  
23
+  
24
+  <td style="padding-left: 0.5em;">
25
+   <div id="projectname">Trinamic TMC26X Stepper Driver for Arduino
26
+   
27
+   </div>
28
+   
29
+  </td>
30
+  
31
+  
32
+  
33
+ </tr>
34
+ </tbody>
35
+</table>
36
+</div>
37
+
38
+<!-- Generated by Doxygen 1.7.6.1 -->
39
+  <div id="navrow1" class="tabs">
40
+    <ul class="tablist">
41
+      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
42
+      <li><a href="annotated.html"><span>Classes</span></a></li>
43
+      <li class="current"><a href="files.html"><span>Files</span></a></li>
44
+    </ul>
45
+  </div>
46
+  <div id="navrow2" class="tabs2">
47
+    <ul class="tablist">
48
+      <li><a href="files.html"><span>File&#160;List</span></a></li>
49
+      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
50
+    </ul>
51
+  </div>
52
+</div>
53
+<div class="header">
54
+  <div class="headertitle">
55
+<div class="title">mainpage.dox File Reference</div>  </div>
56
+</div><!--header-->
57
+<div class="contents">
58
+</div><!-- contents -->
59
+
60
+
61
+<hr class="footer"/><address class="footer"><small>
62
+Generated on Mon Nov 19 2012 20:26:21 for Trinamic TMC26X Stepper Driver for Arduino by &#160;<a href="http://www.doxygen.org/index.html">
63
+<img class="footer" src="doxygen.png" alt="doxygen"/>
64
+</a> 1.7.6.1
65
+</small></address>
66
+
67
+</body>
68
+</html>

BIN
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/nav_f.png View File


BIN
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/nav_h.png View File


BIN
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/open.png View File


BIN
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/tab_a.png View File


BIN
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/tab_b.png View File


BIN
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/tab_h.png View File


BIN
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/tab_s.png View File


+ 59
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/documentation/html/tabs.css View File

@@ -0,0 +1,59 @@
1
+.tabs, .tabs2, .tabs3 {
2
+    background-image: url('tab_b.png');
3
+    width: 100%;
4
+    z-index: 101;
5
+    font-size: 13px;
6
+}
7
+
8
+.tabs2 {
9
+    font-size: 10px;
10
+}
11
+.tabs3 {
12
+    font-size: 9px;
13
+}
14
+
15
+.tablist {
16
+    margin: 0;
17
+    padding: 0;
18
+    display: table;
19
+}
20
+
21
+.tablist li {
22
+    float: left;
23
+    display: table-cell;
24
+    background-image: url('tab_b.png');
25
+    line-height: 36px;
26
+    list-style: none;
27
+}
28
+
29
+.tablist a {
30
+    display: block;
31
+    padding: 0 20px;
32
+    font-weight: bold;
33
+    background-image:url('tab_s.png');
34
+    background-repeat:no-repeat;
35
+    background-position:right;
36
+    color: #283A5D;
37
+    text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);
38
+    text-decoration: none;
39
+    outline: none;
40
+}
41
+
42
+.tabs3 .tablist a {
43
+    padding: 0 10px;
44
+}
45
+
46
+.tablist a:hover {
47
+    background-image: url('tab_h.png');
48
+    background-repeat:repeat-x;
49
+    color: #fff;
50
+    text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0);
51
+    text-decoration: none;
52
+}
53
+
54
+.tablist li.current a {
55
+    background-image: url('tab_a.png');
56
+    background-repeat:repeat-x;
57
+    color: #fff;
58
+    text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0);
59
+}

+ 82
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/examples/TMC26XExample/TMC26XExample.ino View File

@@ -0,0 +1,82 @@
1
+/*
2
+ TMC26XExample.ino - - TMC26X Stepper library Example for Wiring/Arduino
3
+ 
4
+ Copyright (c) 2011, Interactive Matter, Marcus Nowotny
5
+ 
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+ 
13
+ The above copyright notice and this permission notice shall be included in
14
+ all copies or substantial portions of the Software.
15
+ 
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
+ THE SOFTWARE.
23
+ 
24
+ */
25
+#include <SPI.h>
26
+#include <TMC26XStepper.h>
27
+
28
+//we have a stepper motor with 200 steps per rotation, CS pin 2, dir pin 6, step pin 7 and a current of 300mA
29
+TMC26XStepper tmc26XStepper = TMC26XStepper(200,2,6,7,700);
30
+int curr_step;
31
+int speed =  0;
32
+int speedDirection = 100;
33
+int maxSpeed = 1000;
34
+
35
+void setup() {
36
+  Serial.begin(9600);
37
+  Serial.println("==============================");
38
+  Serial.println("TMC26X Stepper Driver Demo App");
39
+  Serial.println("==============================");
40
+  //set this according to you stepper
41
+  Serial.println("Configuring stepper driver");
42
+  //char constant_off_time, char blank_time, char hysteresis_start, char hysteresis_end, char hysteresis_decrement
43
+  tmc26XStepper.setSpreadCycleChopper(2,24,8,6,0);
44
+  tmc26XStepper.setRandomOffTime(0);
45
+  
46
+  tmc26XStepper.setMicrosteps(32);
47
+  tmc26XStepper.setStallGuardThreshold(4,0);
48
+  Serial.println("config finished, starting");
49
+  tmc26XStepper.start();
50
+  Serial.println("started");
51
+}
52
+
53
+void loop() {
54
+  if (!tmc26XStepper.isMoving()) {
55
+    speed+=speedDirection;
56
+    if (speed>maxSpeed) {
57
+      speed = maxSpeed;
58
+      speedDirection = -speedDirection;
59
+    } else if (speed<0) {
60
+      speedDirection = -speedDirection;
61
+      speed=speedDirection;
62
+    }
63
+    //setting the speed
64
+    Serial.print("setting speed to ");
65
+    Serial.println(speed);
66
+    tmc26XStepper.setSpeed(speed);
67
+    //we want some kind of constant running time - so the length is just a product of speed
68
+    Serial.print("Going ");
69
+    Serial.print(10*speed);
70
+    Serial.println(" steps");
71
+    tmc26XStepper.step(10*speed);
72
+  } else {
73
+    //we put out the status every 100 steps
74
+    if (tmc26XStepper.getStepsLeft()%100==0) {
75
+      Serial.print("Stall Guard: ");
76
+      Serial.println(tmc26XStepper.getCurrentStallGuardReading());
77
+    }    
78
+  }  
79
+  tmc26XStepper.move();
80
+}
81
+
82
+

+ 176
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/examples/TMC26XMotorTester/Motor.ino View File

@@ -0,0 +1,176 @@
1
+/*
2
+ TMC26XMotorTest.ino - - TMC26X Stepper library tester for Wiring/Arduino
3
+ 
4
+ Copyright (c) 2011, Interactive Matter, Marcus Nowotny
5
+ 
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+ 
13
+ The above copyright notice and this permission notice shall be included in
14
+ all copies or substantial portions of the Software.
15
+ 
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
+ THE SOFTWARE.
23
+ 
24
+ */
25
+ unsigned int motor_counter = 0;
26
+unsigned char motor_moved = 0;
27
+int sgThreshold = 4;
28
+int sgFilter = 0;
29
+int direction = 1;
30
+
31
+unsigned int lower_SG_threshold = 0;
32
+unsigned int upper_SG_threshold = 0;
33
+unsigned char number_of_SG_readings=0;
34
+unsigned char current_increment_step_size=0;
35
+unsigned char lower_current_limit=0;
36
+
37
+
38
+char chopperMode = 0; //0 for spread, 1 for constant off
39
+char t_off = 2;
40
+char t_blank = 24;
41
+char h_start = 8;
42
+char h_end = 6;
43
+char h_decrement = 0;
44
+
45
+
46
+void startMotor() {
47
+  Serial.println(F("Configuring stepper driver"));
48
+  //char constant_off_time, char blank_time, char hysteresis_start, char hysteresis_end, char hysteresis_decrement
49
+  tmc26XStepper.setSpreadCycleChopper(t_off,t_blank,h_start,h_end,h_decrement);
50
+  tmc26XStepper.setRandomOffTime(0);
51
+
52
+  tmc26XStepper.setMicrosteps(32);
53
+  tmc26XStepper.setStallGuardThreshold(sgThreshold,sgFilter);
54
+  //  Serial.println("config finished, starting");
55
+  digitalWrite(ENABLE_PIN,LOW);
56
+  tmc26XStepper.start();
57
+  tmc26XStepper.setSpeed(10);
58
+  TCNT2=setupTimer2(10000);
59
+  sei();
60
+}
61
+
62
+void runMotor() {
63
+  if (running && !tmc26XStepper.isMoving()) {
64
+    tmc26XStepper.step(direction*10000);
65
+    Serial.println("run");
66
+  }
67
+  if (!running & tmc26XStepper.isMoving()) {
68
+    tmc26XStepper.stop();
69
+    Serial.println("stop");
70
+  }
71
+}
72
+
73
+void setSpeed(unsigned int targetSpeed) {
74
+  if (targetSpeed>0 && targetSpeed<MAX_SPEED) {
75
+    Serial.print(F("Setting speed: ")); 
76
+    Serial.println(targetSpeed);
77
+    tmc26XStepper.setSpeed(targetSpeed);
78
+  } 
79
+  else {
80
+    Serial.print(F("improper speed "));
81
+    Serial.println(targetSpeed);
82
+  }
83
+}
84
+
85
+void setMicrostepping(int microstepping) {
86
+  if (microstepping<1 || microstepping>256) {
87
+    Serial.print(F("Improperd microstepping setting [1...256]: "));
88
+    Serial.print(microstepping);
89
+  } 
90
+  else {
91
+    tmc26XStepper.setMicrosteps(microstepping);
92
+  }
93
+}
94
+
95
+void setStallGuardThreshold(int threshold) {
96
+  if (threshold<-64 || threshold > 63) {
97
+    Serial.print(F("Improper Stall Guard Threshold [-64...63]: "));
98
+    Serial.println(threshold);
99
+  } 
100
+  else {
101
+    sgThreshold = threshold;
102
+    tmc26XStepper.setStallGuardThreshold(threshold,sgFilter);
103
+  }
104
+}
105
+
106
+void setStallGuardFilter(int filter) {
107
+  if (filter) {
108
+    sgFilter=1;
109
+  } 
110
+  else {
111
+    sgFilter=0;
112
+  }
113
+  tmc26XStepper.setStallGuardThreshold(sgThreshold,sgFilter);
114
+}
115
+
116
+void setCurrent(int current) {
117
+  if (current>0 && current <1700) {
118
+    tmc26XStepper.setCurrent(current);
119
+  } 
120
+  else {
121
+    Serial.print(F("Improper current {0 ... 1200}: "));
122
+    Serial.print(current);
123
+  }
124
+}
125
+
126
+void updateChopper() {
127
+  //we can do only spread now
128
+  if (chopperMode==0) {
129
+    tmc26XStepper.setSpreadCycleChopper(t_off,t_blank,h_start,h_end,h_decrement);
130
+  }    
131
+}
132
+
133
+void updateCoolStep() {
134
+  tmc26XStepper.setCoolStepConfiguration(
135
+    lower_SG_threshold, upper_SG_threshold, number_of_SG_readings,
136
+    current_increment_step_size, lower_current_limit);
137
+}
138
+
139
+//from http://www.uchobby.com/index.php/2007/11/24/arduino-interrupts/
140
+//Setup Timer2.s
141
+//Configures the ATMega168 8-Bit Timer2 to generate an interrupt
142
+//at the specified frequency.
143
+//Returns the timer load value which must be loaded into TCNT2
144
+//inside your ISR routine.
145
+//See the example usage below.
146
+unsigned char setupTimer2(float timeoutFrequency){
147
+  unsigned char result; //The timer load value.
148
+
149
+  //Calculate the timer load value
150
+  result=(int)((257.0-(TIMER_CLOCK_FREQ/timeoutFrequency))+0.5);
151
+  //The 257 really should be 256 but I get better results with 257.
152
+
153
+  //Timer2 Settings: Timer Prescaler /8, mode 0
154
+  //Timer clock = 16MHz/8 = 2Mhz or 0.5us
155
+  //The /8 prescale gives us a good range to work with
156
+  //so we just hard code this for now.
157
+  TCCR2A = 0;
158
+  TCCR2B = 0<<CS22 | 1<<CS21 | 0<<CS20;
159
+
160
+  //Timer2 Overflow Interrupt Enable
161
+  TIMSK2 = 1<<TOIE2;
162
+
163
+  //load the timer for its first cycle
164
+  TCNT2=result;
165
+
166
+  return(result);
167
+}
168
+
169
+ISR(TIMER2_OVF_vect) {
170
+  motor_moved = tmc26XStepper.move();
171
+  motor_counter++;
172
+}
173
+
174
+
175
+
176
+

+ 369
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/examples/TMC26XMotorTester/Serial.ino View File

@@ -0,0 +1,369 @@
1
+/*
2
+ TMC26XMotorTest.ino - - TMC26X Stepper library tester for Wiring/Arduino
3
+ 
4
+ Copyright (c) 2011, Interactive Matter, Marcus Nowotny
5
+ 
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+ 
13
+ The above copyright notice and this permission notice shall be included in
14
+ all copies or substantial portions of the Software.
15
+ 
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
+ THE SOFTWARE.
23
+ 
24
+ */
25
+ #define INPUT_BUFFER_LENGTH 32
26
+
27
+#define SERIAL_SPEED 115200
28
+#define STATUS_COUNTER 100
29
+
30
+char inputBuffer[INPUT_BUFFER_LENGTH+1]; //ad on character to keep the trainling 0
31
+unsigned char inputBufferPosition;
32
+
33
+void startSerial() {
34
+  Serial.begin(SERIAL_SPEED);
35
+  Serial.println(F("================================="));
36
+  Serial.println(F("TMC26X Stepper Driver Motor Tester"));
37
+  Serial.println(F("================================="));
38
+  //empty the input buffer
39
+  for (unsigned char i=0; i< INPUT_BUFFER_LENGTH+1; i++) {
40
+    inputBuffer[i]=0;
41
+  }
42
+  inputBufferPosition=0;
43
+}
44
+
45
+void loopSerial() {
46
+  if (Serial.available()>0 && inputBufferPosition<INPUT_BUFFER_LENGTH) {
47
+    char c = Serial.read();
48
+    //Read the char
49
+    inputBuffer[inputBufferPosition]=c;
50
+    inputBufferPosition++;
51
+    //always terminate the string
52
+    inputBuffer[inputBufferPosition]=0;
53
+    //and if the line ended we execute the command
54
+    if (c=='\n') {
55
+      executeSerialCommand();   
56
+    }
57
+  }
58
+  if (motor_moved) {
59
+    Serial.print("#sg");
60
+    Serial.print(tmc26XStepper.getCurrentStallGuardReading(),DEC);
61
+    Serial.print(",p");
62
+    Serial.print(tmc26XStepper.getMotorPosition(),DEC);
63
+    Serial.print(",k");
64
+    Serial.print(tmc26XStepper.getCurrentCurrent(),DEC);
65
+    Serial.println(',');
66
+    motor_moved=0;
67
+  }
68
+  if (motor_counter>STATUS_COUNTER) {
69
+    motor_counter=0;
70
+    char moving = tmc26XStepper.isMoving();
71
+    Serial.print('#');
72
+    if (moving) {
73
+      Serial.print('r');
74
+    } 
75
+    else {
76
+      Serial.print('s');
77
+    }
78
+    Serial.print(',');
79
+    Serial.print('d');
80
+    Serial.print(direction);
81
+    Serial.print(',');
82
+    Serial.print("c");
83
+    Serial.print(tmc26XStepper.getCurrent(),DEC);
84
+    Serial.print(',');
85
+    Serial.print('S');
86
+    Serial.print(tmc26XStepper.getSpeed(),DEC);
87
+    Serial.print(',');
88
+    Serial.print('m');
89
+    Serial.print(tmc26XStepper.getMicrosteps(),DEC);
90
+    Serial.print(',');
91
+    Serial.print("t");
92
+    Serial.print(tmc26XStepper.getStallGuardThreshold(),DEC);
93
+    Serial.print(',');
94
+    Serial.print('f');
95
+    Serial.print(tmc26XStepper.getStallGuardFilter(),DEC);
96
+    Serial.print(',');
97
+    //print out the general cool step config
98
+    if (tmc26XStepper.isCoolStepEnabled()) {
99
+      Serial.print("Ke+,");
100
+    } 
101
+    else {
102
+      Serial.print("Ke-,");
103
+    }
104
+    Serial.print("Kl");
105
+    Serial.print(tmc26XStepper.getCoolStepLowerSgThreshold(),DEC);
106
+    Serial.print(",Ku");
107
+    Serial.print(tmc26XStepper.getCoolStepUpperSgThreshold(),DEC);
108
+    Serial.print(",Kn");
109
+    Serial.print(tmc26XStepper.getCoolStepNumberOfSGReadings(),DEC);
110
+    Serial.print(",Ki");
111
+    Serial.print(tmc26XStepper.getCoolStepCurrentIncrementSize(),DEC);
112
+    Serial.print(",Km");
113
+    Serial.print(tmc26XStepper.getCoolStepLowerCurrentLimit(),DEC);
114
+    Serial.print(',');
115
+    //detect the winding status
116
+    if (tmc26XStepper.isOpenLoadA()) {
117
+      Serial.print("ao,");
118
+    } 
119
+    else if(tmc26XStepper.isShortToGroundA()) {
120
+      Serial.print("ag,");
121
+    } 
122
+    else {
123
+      Serial.print("a-,");
124
+    }
125
+    //detect the winding status
126
+    if (tmc26XStepper.isOpenLoadB()) {
127
+      Serial.print("bo,");
128
+    } 
129
+    else if(tmc26XStepper.isShortToGroundB()) {
130
+      Serial.print("bg,");
131
+    } 
132
+    else {
133
+      Serial.print("b-,");
134
+    }
135
+    char temperature = tmc26XStepper.getOverTemperature();
136
+    if (temperature==0) {
137
+      Serial.print("x-,");
138
+    } 
139
+    else if (temperature==TMC26X_OVERTEMPERATURE_PREWARING) {
140
+      Serial.print("xw,");
141
+    } 
142
+    else {
143
+      Serial.print("xe,");
144
+    }
145
+    if (tmc26XStepper.isEnabled()) {
146
+      Serial.print("e1,");
147
+    } 
148
+    else {
149
+      Serial.print("e0,");
150
+    }
151
+    //write out the current chopper config
152
+    Serial.print("Cm");
153
+    Serial.print(chopperMode,DEC);
154
+    Serial.print(",Co");
155
+    Serial.print(t_off,DEC);
156
+    Serial.print(",Cb");
157
+    Serial.print(t_blank,DEC);
158
+    if (chopperMode==0) {
159
+      Serial.print(",Cs");
160
+      Serial.print(h_start,DEC);
161
+      Serial.print(",Ce");
162
+      Serial.print(h_end,DEC);
163
+      Serial.print(",Cd");
164
+      Serial.print(h_decrement,DEC);
165
+    }
166
+    Serial.print(',');
167
+    Serial.println();
168
+  }
169
+}
170
+
171
+void executeSerialCommand() {
172
+  Serial.print("Executing ");
173
+  Serial.println(inputBuffer);
174
+  //stimple runn & stop commands
175
+  switch(inputBuffer[0]) {
176
+  case 's':
177
+    running = 0;
178
+    break;
179
+  case 'r':
180
+    running = -1;
181
+    break;
182
+  case 'S':
183
+    {
184
+      int targetSpeed = decode(1);
185
+      setSpeed(targetSpeed);
186
+    }
187
+    break;
188
+  case 'm':
189
+    {
190
+      int microstepping = decode(1);
191
+      setMicrostepping(microstepping);
192
+    }
193
+    break;
194
+  case 't':
195
+    {
196
+      int threshold = decode(1);
197
+      setStallGuardThreshold(threshold);
198
+    }
199
+    break;
200
+  case 'f':
201
+    {
202
+      int filter = decode(1);
203
+      setStallGuardFilter(filter);
204
+    }
205
+    break;
206
+  case 'd':
207
+    {
208
+      int value = decode(1);
209
+      tmc26XStepper.stop();
210
+      if (value<0) {
211
+        direction=-1;
212
+      } 
213
+      else {
214
+        direction=1;
215
+      }
216
+    }
217
+    break;
218
+  case 'c':
219
+    {
220
+      int current = decode(1);
221
+      setCurrent(current);
222
+    }
223
+    break;
224
+  case 'e':
225
+    {
226
+      int enabled = decode(1);
227
+      if (enabled) {
228
+        tmc26XStepper.setEnabled(true);
229
+      } 
230
+      else {
231
+        tmc26XStepper.setEnabled(false);
232
+      }
233
+    }
234
+    break;
235
+  case 'C':
236
+    switch(inputBuffer[1]) {
237
+    case 'o':
238
+      {
239
+        int value = decode(2);
240
+        if (value>0 && value<16) {
241
+          t_off=value;
242
+          updateChopper();
243
+        }
244
+      }
245
+      break;
246
+    case 'b':
247
+      {
248
+        int value = decode(2);
249
+        if (value>=0 && value<=3) {
250
+          t_blank=value;
251
+          updateChopper();
252
+        }
253
+      }
254
+      break;
255
+    case 's':
256
+      {
257
+        int value = decode(2);
258
+        if (value>=0 && value<=8) {
259
+          h_start=value;
260
+          updateChopper();
261
+        }
262
+      }
263
+      break;
264
+    case 'e':
265
+      {
266
+        int value = decode(2);
267
+        if (value>=-3 && value<=12) {
268
+          h_end=value;
269
+          updateChopper();
270
+        }
271
+      }
272
+      break;
273
+    case 'd':
274
+      {
275
+        int value = decode(2);
276
+        if (value>=0 && value<=3) {
277
+          h_decrement=value;
278
+          updateChopper();
279
+        }
280
+      }
281
+      break;
282
+    }
283
+    break;
284
+  case 'K':
285
+    switch(inputBuffer[1]) {
286
+    case '+':
287
+      tmc26XStepper.setCoolStepEnabled(true);
288
+      break;
289
+    case '-':
290
+      tmc26XStepper.setCoolStepEnabled(false);
291
+      break;
292
+    case 'l':
293
+      {
294
+        int value = decode(2);
295
+        if (value>=0 && value<480) {
296
+          lower_SG_threshold=value;
297
+          updateCoolStep();
298
+        }
299
+      }
300
+      break;
301
+    case 'u':
302
+      {
303
+        int value = decode(2);
304
+        if (value>=0 && value<480) {
305
+          upper_SG_threshold=value;
306
+          updateCoolStep();
307
+        }
308
+      }
309
+      break;
310
+    case 'n':
311
+      {
312
+        int value = decode(2);
313
+        if (value>=0 && value<4) {
314
+          number_of_SG_readings=value;
315
+          updateCoolStep();
316
+        }
317
+      }
318
+      break;
319
+    case 'i':
320
+      {
321
+        int value = decode(2);
322
+        if (value>=0 && value<4) {
323
+          current_increment_step_size=value;
324
+          updateCoolStep();
325
+        }
326
+      }
327
+      break;
328
+    case 'm':
329
+      {
330
+        int value = decode(2);
331
+        if (value>=0 && value<2) {
332
+          lower_current_limit=value;
333
+          updateCoolStep();
334
+        }
335
+      }
336
+      break;
337
+    }
338
+    break;
339
+  }
340
+  //at the end delete buffer
341
+  inputBufferPosition=0;
342
+  inputBuffer[0]=0;
343
+}
344
+
345
+int decode(unsigned char startPosition) {
346
+  int result=0;
347
+  boolean negative = false;
348
+  if (inputBuffer[startPosition]=='-') {
349
+    negative=true;
350
+    startPosition++;
351
+  }
352
+  for (unsigned char i=startPosition; i< (INPUT_BUFFER_LENGTH+1) && inputBuffer[i]!=0; i++) {
353
+    char number = inputBuffer[i];
354
+    //this very dumb approac can lead to errors, but we expect only numbers after the command anyway
355
+    if (number <= '9' && number >='0') {
356
+      result *= 10;
357
+      result += number - '0';
358
+    } 
359
+  }
360
+  if (negative) {
361
+    return -result;
362
+  } 
363
+  else {
364
+    return result;
365
+  }
366
+}
367
+
368
+
369
+

+ 61
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/examples/TMC26XMotorTester/TMC26XMotorTester.ino View File

@@ -0,0 +1,61 @@
1
+/*
2
+ TMC26XMotorTest.ino - - TMC26X Stepper library Example for Wiring/Arduino
3
+ 
4
+ Copyright (c) 2011, Interactive Matter, Marcus Nowotny
5
+ 
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+ 
13
+ The above copyright notice and this permission notice shall be included in
14
+ all copies or substantial portions of the Software.
15
+ 
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
+ THE SOFTWARE.
23
+ 
24
+ */
25
+#include <SPI.h>
26
+#include <TMC26XStepper.h>
27
+
28
+//you may adapt this to your shield or breakout board connection
29
+#define CS_PIN 2
30
+#define DIR_PIN 6
31
+#define STEP_PIN 7
32
+#define ENABLE_PIN 8 //if it is not connected it won't be a problem
33
+
34
+
35
+#define TIMER_CLOCK_FREQ 2000000.0 //2MHz for /8 prescale from 16MHz
36
+#define INITIAL_CURRENT 500 //in mA
37
+#define MAX_SPEED 1000
38
+
39
+
40
+//we have a stepper motor with 200 steps per rotation, CS pin 2, dir pin 3, step pin 4 and a current of 300mA
41
+TMC26XStepper tmc26XStepper = TMC26XStepper(200,CS_PIN,DIR_PIN,STEP_PIN,INITIAL_CURRENT);
42
+char running;
43
+
44
+void setup() {
45
+  //configure the enable pin
46
+  pinMode(ENABLE_PIN, OUTPUT);
47
+  digitalWrite(ENABLE_PIN,HIGH);
48
+
49
+  startSerial();
50
+  startMotor();
51
+  //set this according to you stepper
52
+  Serial.println(F("started"));
53
+}
54
+
55
+void loop() {
56
+  loopSerial();
57
+  runMotor();
58
+}
59
+
60
+
61
+

+ 306
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/examples/TMC26XMotorTester/processing/TMC26XMotorTest/Arduino.pde View File

@@ -0,0 +1,306 @@
1
+/*
2
+ TMC26XMotorTest.pde - - TMC26X Stepper Tester for Processing
3
+ 
4
+ Copyright (c) 2011, Interactive Matter, Marcus Nowotny
5
+ 
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+ 
13
+ The above copyright notice and this permission notice shall be included in
14
+ all copies or substantial portions of the Software.
15
+ 
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
+ THE SOFTWARE.
23
+ 
24
+ */
25
+
26
+String channelAStatus=null;
27
+String channelBStatus=null;
28
+String temperatureStatus=null;
29
+boolean motor_connected = false;
30
+
31
+RadioButton serialButtons;
32
+Button serialOkButton;
33
+Button helpButton;
34
+Textarea statusArea;
35
+String[] ports;
36
+int activePortIndex = -1;
37
+
38
+String identString="TMC26X Stepper Driver Motor Tester";
39
+int connectTimeout=10*1000; //how long do we wait until the Arduino is connected
40
+
41
+StringBuilder serialStringBuilder = new StringBuilder();
42
+
43
+void setupSerialConfig() {
44
+  Tab defaultTab = controlP5.getTab("default");
45
+  //add the list of serial interfaces - it get's populated later
46
+  serialButtons = controlP5.addRadioButton("serialport", 200, 100+TMCLogo.height*2+50);
47
+  serialConfigElements.add(serialButtons);
48
+  serialButtons.captionLabel().set("Select Serial Port");
49
+  serialButtons.showBar();
50
+  serialButtons.moveTo(defaultTab);
51
+  //ad the ok button
52
+  serialOkButton = controlP5.addButton("serialOk", 1, 200, height-300, 30, 30);
53
+  serialConfigElements.add(serialOkButton);
54
+  serialOkButton.setCaptionLabel("OK");
55
+  runToggle.moveTo(defaultTab);
56
+  //add the status area
57
+  statusArea = controlP5.addTextarea("statusArea","",200,height-250,300,50);
58
+  serialConfigElements.add(statusArea);
59
+  statusArea.moveTo(defaultTab);
60
+  
61
+  helpButton =  controlP5.addButton("help", 1, 200, height-250, 80, 30);
62
+  serialConfigElements.add(helpButton);
63
+  helpButton.moveTo(defaultTab);
64
+  
65
+
66
+  //finally update the list of serial ports
67
+  updateSerialPortList();
68
+}
69
+
70
+void updateSerialPortList() {
71
+  //first remove all present serial ports
72
+  List items = serialButtons.getItems();
73
+  for (Object i:items) {
74
+    Toggle item = (Toggle) i;
75
+    serialButtons.removeItem(item.getName());
76
+  }
77
+  //add the serial ports
78
+  ports = Serial.list();
79
+  for (int i=0; i< ports.length; i++) {
80
+    serialButtons.addItem(ports[i],i);
81
+  }
82
+  serialButtons.setValue(-1);
83
+  serialOkButton.setVisible(false);
84
+}
85
+
86
+void serialport(int value) {
87
+  //ok button is only active if a serial port is selected
88
+  serialOkButton.setVisible(value>-1);
89
+  if (value>-1) {
90
+    statusArea.setText("");
91
+  }
92
+  activePortIndex = value;
93
+}
94
+
95
+void serialOk(int value) {
96
+  String error = null;
97
+  if (value!=0 && activePortIndex>-1) {
98
+    try {
99
+      arduinoPort = new Serial(this, ports[activePortIndex], 115200);
100
+      int timeStarted = millis();
101
+      StringBuilder identBuffer = new StringBuilder();
102
+      while (!motor_connected && (millis()-timeStarted)<connectTimeout) {
103
+        if (arduinoPort.available ()>0) {
104
+          char c = arduinoPort.readChar();
105
+          identBuffer.append(c);
106
+          if (c=='\n') {
107
+            if (identString.contains(identString)) {
108
+              motor_connected = true;
109
+              toggleUi(true);
110
+              return;
111
+            }
112
+            identBuffer = new StringBuilder();
113
+          }
114
+        } 
115
+      }
116
+    } catch (RuntimeException e) {
117
+      //we simply do nothing
118
+      //TODO set status label
119
+      error = "There was a problem with serial port "+ports[activePortIndex]+": "+e.getMessage();
120
+    }
121
+    //ok appearantly we did not find an motor tester - so lets deselect that port
122
+    if (error == null) {
123
+      error = "Could not find TMC26XMotorTester on serial port "+ports[activePortIndex];
124
+    }
125
+    statusArea.setText(error);
126
+    Toggle selected = serialButtons.getItem(activePortIndex);
127
+    selected.setState(false);
128
+    serialOkButton.setVisible(false);
129
+  }
130
+}
131
+
132
+
133
+void decodeSerial() {
134
+  if (motor_connected) {
135
+    while (arduinoPort.available ()>0) {
136
+      char c = arduinoPort.readChar();
137
+      serialStringBuilder.append(c);
138
+      if (c=='\n') {
139
+        decodeSerial(serialStringBuilder.toString());
140
+        serialStringBuilder = new StringBuilder();
141
+      }
142
+    }
143
+  }
144
+}
145
+
146
+void sendCommand(String command) {
147
+  if (motor_connected) {
148
+    arduinoPort.write(command+"\n");
149
+  }
150
+}
151
+
152
+void decodeSerial(String line) {
153
+  settingStatus=true;
154
+  if (line.startsWith("#")) {
155
+    String status = line.substring(1);
156
+    StringTokenizer statusTokenizer = new StringTokenizer(status, ",");
157
+    while (statusTokenizer.hasMoreTokens ()) {
158
+      String statusToken = statusTokenizer.nextToken();
159
+      if ("s".equals(statusToken)) {
160
+        runToggle.setValue(0);
161
+      } 
162
+      else if ("r".equals(statusToken)) {
163
+        runToggle.setValue(1);
164
+      } 
165
+      else if (statusToken.startsWith("e")) {
166
+        int enabled = getValueOfToken(statusToken, 1);
167
+        if (enabled!=0) {
168
+          enabledToggle.setValue(1);
169
+        } 
170
+        else {
171
+          enabledToggle.setValue(0);
172
+        }
173
+      }
174
+      else if (statusToken.startsWith("S")) {
175
+        speedSlider.setValue(getValueOfToken(statusToken, 1));
176
+      } 
177
+      else if (statusToken.startsWith("m")) {
178
+        microsteppingButtons.activate("m_1/"+String.valueOf(getValueOfToken(statusToken, 1)));
179
+      } 
180
+      else if (statusToken.startsWith("sg")) {
181
+        addStallGuardReading(getValueOfToken(statusToken, 2));
182
+      } 
183
+      else if (statusToken.startsWith("p")) {
184
+        addPositionReading(getValueOfToken(statusToken, 1));
185
+      } 
186
+      else if (statusToken.startsWith("k")) {
187
+        addCurrentReading(getValueOfToken(statusToken, 1));
188
+      } 
189
+      else if (statusToken.startsWith("t")) {
190
+        sgtSlider.setValue(getValueOfToken(statusToken, 1));
191
+      } 
192
+      else if (statusToken.startsWith("f")) {
193
+        sgFilterToggle.setValue(getValueOfToken(statusToken, 1));
194
+      } 
195
+      else if (statusToken.startsWith("d")) {
196
+        setDirection(getValueOfToken(statusToken, 1));
197
+      }
198
+      else if (statusToken.startsWith("c")) {
199
+        setCurrent(getValueOfToken(statusToken, 1));
200
+      } 
201
+      else if (statusToken.startsWith("a")) {
202
+        if (statusToken.charAt(1)=='o') {
203
+          channelAStatus="Open Load";
204
+        } 
205
+        else if (statusToken.charAt(1)=='g') {
206
+          channelAStatus="Short to Ground!";
207
+        } 
208
+        else {
209
+          channelAStatus=null;
210
+        }
211
+      } 
212
+      else if (statusToken.startsWith("b")) {
213
+        if (statusToken.charAt(1)=='o') {
214
+          channelBStatus="Open Load";
215
+        } 
216
+        else if (statusToken.charAt(1)=='g') {
217
+          channelBStatus="Short to Ground!";
218
+        } 
219
+        else {
220
+          channelBStatus=null;
221
+        }
222
+      } 
223
+      else if (statusToken.startsWith("x")) {
224
+        if (statusToken.charAt(1)=='w') {
225
+          temperatureStatus="Prewarning!";
226
+        } 
227
+        else if (statusToken.charAt(1)=='e') {
228
+          temperatureStatus="Error";
229
+        } 
230
+        else {
231
+          temperatureStatus=null;
232
+        }
233
+      }
234
+      else if (statusToken.startsWith("Cm")) {
235
+        //chopper mode is currently ignored
236
+      } 
237
+      else if (statusToken.startsWith("Co")) {
238
+        constantOffSlider.setValue(getValueOfToken(statusToken, 2));
239
+      }  
240
+      else if (statusToken.startsWith("Cb")) {
241
+        blankTimeSlider.setValue(getValueOfToken(statusToken, 2));
242
+      } 
243
+      else if (statusToken.startsWith("Cs")) {
244
+        hysteresisStartSlider.setValue(getValueOfToken(statusToken, 2));
245
+      } 
246
+      else if (statusToken.startsWith("Ce")) {
247
+        hysteresisEndSlider.setValue(getValueOfToken(statusToken, 2));
248
+      } 
249
+      else if (statusToken.startsWith("Cd")) {
250
+        setHystDecrement(getValueOfToken(statusToken, 2));
251
+      } 
252
+      else if ("Ke+".equals(statusToken)) {
253
+        coolStepActiveToggle.setValue(1);
254
+      } 
255
+      else if ("Ke-".equals(statusToken)) {
256
+        coolStepActiveToggle.setValue(0);
257
+      } 
258
+      else if (statusToken.startsWith("Kl")) {
259
+        coolStepMinSlider.setValue(getValueOfToken(statusToken, 2));
260
+      } 
261
+      else if (statusToken.startsWith("Ku")) {
262
+        coolStepMaxSlider.setValue(getValueOfToken(statusToken, 2));
263
+      }
264
+      else if (statusToken.startsWith("Kn")) {
265
+        coolStepDecrementButtons.activate(getValueOfToken(statusToken, 2));
266
+      } 
267
+      else if (statusToken.startsWith("Ki")) {
268
+        coolStepIncrementButtons.activate(getValueOfToken(statusToken, 2));
269
+      }
270
+      else if (statusToken.startsWith("Km")) {
271
+        coolStepMinButtons.activate(getValueOfToken(statusToken, 2));
272
+      }
273
+    }
274
+  }
275
+  else {
276
+    println(line);
277
+  }
278
+  settingStatus=false;
279
+}
280
+
281
+int getValueOfToken(String token, int position) {
282
+  String value = token.substring(position);
283
+  try {
284
+    return Integer.valueOf(value);
285
+  } 
286
+  catch (NumberFormatException e) {
287
+    println("Unable to decode '"+value+"'of '"+token+"' !");
288
+    return 0;
289
+  }
290
+}
291
+
292
+void drawSerial() {
293
+  //draw the logo and some epxlaining text while setting up the serial port
294
+  if (!motor_connected) {
295
+    image(TMCLogo,200, 100);
296
+    fill(uiTextColor);
297
+    text("Select the serial port where your Arduino is connected\nIf in doubt check it in the Arduino IDE.\nThe Motor Tester will automatically verify if it can find an Motor tester ath the port.",200,100+TMCLogo.height+50);
298
+  }
299
+}
300
+
301
+void help(float value) {
302
+  if (value!=0) {
303
+    link(helpUrl);
304
+  }
305
+}
306
+

+ 175
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/examples/TMC26XMotorTester/processing/TMC26XMotorTest/ChopperConfiguration.pde View File

@@ -0,0 +1,175 @@
1
+/*
2
+ TMC26XMotorTest.pde - - TMC26X Stepper Tester for Processing
3
+ 
4
+ Copyright (c) 2011, Interactive Matter, Marcus Nowotny
5
+ 
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+ 
13
+ The above copyright notice and this permission notice shall be included in
14
+ all copies or substantial portions of the Software.
15
+ 
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
+ THE SOFTWARE.
23
+ 
24
+ */
25
+
26
+Slider constantOffSlider;
27
+Slider blankTimeSlider;
28
+Toggle randomOffTimeToggle;
29
+RadioButton ChopperModeButtons;
30
+//for constant off time chopeer
31
+Slider fastDecaySlider;
32
+Slider sineWaveOffsetSlider;
33
+Toggle currentComparatorToggle;
34
+//for spread chopper
35
+Slider hysteresisStartSlider;
36
+Slider hysteresisEndSlider;
37
+Numberbox motorVoltageBox;
38
+Numberbox motorCurrentBox;
39
+Numberbox motorResistanceBox;
40
+Numberbox motorInductanceBox;
41
+
42
+RadioButton hysteresisDecrementButtons;
43
+
44
+PImage spreadChopperImage;
45
+
46
+void setupChooperConfig() {
47
+  //add input fields for the various motor parameters
48
+  motorVoltageBox = controlP5.addNumberbox("motorvoltage",12.0,20,40,100,20);
49
+  motorVoltageBox.setCaptionLabel("Motor Voltage (V)");
50
+  motorVoltageBox.setMultiplier(0.025);
51
+  motorVoltageBox.setMin(0);
52
+  motorVoltageBox.setMax(40.0);
53
+  motorVoltageBox.moveTo(configureTab);
54
+  
55
+  motorCurrentBox = controlP5.addNumberbox("motorcurrent",0.5,140,40,100,20);
56
+  motorCurrentBox.setCaptionLabel("Motor Current (A)");
57
+  motorCurrentBox.setMultiplier(0.025);
58
+  motorCurrentBox.setMin(0.46);
59
+  motorCurrentBox.setMax(1.7);
60
+  motorCurrentBox.moveTo(configureTab);
61
+  
62
+  motorResistanceBox = controlP5.addNumberbox("motorresistance",2,260,40,100,20);
63
+  motorResistanceBox.setCaptionLabel("Motor Resistance (Ohm)");
64
+  motorResistanceBox.setMultiplier(0.1);
65
+  motorResistanceBox.setMin(0);
66
+  motorResistanceBox.setMax(250);
67
+  motorResistanceBox.moveTo(configureTab);
68
+  
69
+  motorInductanceBox = controlP5.addNumberbox("motorinductance",2,380,40,100,20);
70
+  motorInductanceBox.setMultiplier(0.1);
71
+  motorInductanceBox.setMin(0);
72
+  motorInductanceBox.setMax(250);
73
+  motorInductanceBox.setCaptionLabel("Motor Inductance (mH)");
74
+  motorInductanceBox.moveTo(configureTab);
75
+  // add a vertical slider for speed  
76
+  constantOffSlider = controlP5.addSlider("constantoff", 1, 15, 1, 20, 80, 400, 20);
77
+  constantOffSlider.setCaptionLabel("Constant Off Time");
78
+  constantOffSlider.setSliderMode(Slider.FIX);
79
+  constantOffSlider.moveTo(configureTab);
80
+
81
+  blankTimeSlider =  controlP5.addSlider("blanktime", 0, 3, 2, 20, 120, 400, 20);
82
+  blankTimeSlider.setCaptionLabel("Blank Time");
83
+  blankTimeSlider.moveTo(configureTab);
84
+
85
+  hysteresisStartSlider =  controlP5.addSlider("hysteresisstart", 0, 8, 2, 20, 160, 400, 20);
86
+  hysteresisStartSlider.setCaptionLabel("Hysteresis Start");
87
+  hysteresisStartSlider.moveTo(configureTab);
88
+
89
+  hysteresisEndSlider =  controlP5.addSlider("hysteresisend", -3, 12, 2, 20, 200, 400, 20);
90
+  hysteresisEndSlider.setCaptionLabel("Hysteresis End");
91
+  hysteresisEndSlider.moveTo(configureTab);
92
+
93
+  hysteresisDecrementButtons =controlP5.addRadioButton("decrement", 20, 240);
94
+  hysteresisDecrementButtons.addItem("fastest", 0);
95
+  hysteresisDecrementButtons.addItem("fast", 1);
96
+  hysteresisDecrementButtons.addItem("medium", 2);
97
+  hysteresisDecrementButtons.addItem("slow", 3);
98
+  hysteresisDecrementButtons.showBar();
99
+  hysteresisDecrementButtons.moveTo(configureTab);
100
+
101
+  spreadChopperImage = loadImage("hysteresis.png");
102
+}
103
+
104
+void drawChopper() {
105
+  if (activeTab!=null && configureTab.equals(activeTab)) {
106
+    image(spreadChopperImage, 200, 400);
107
+  }
108
+}
109
+
110
+void constantoff(int theValue) {
111
+  if (!settingStatus) {
112
+    if (theValue>0 && theValue<16) {
113
+      println("Constant off "+theValue);
114
+      sendCommand("cO"+theValue);
115
+    } 
116
+    else {
117
+      println("invalid blank time of "+theValue);
118
+    }
119
+  }
120
+}
121
+
122
+void blanktime(int theValue) {
123
+  if (!settingStatus) {
124
+    if (theValue>=0 && theValue<=3) {
125
+      println("blank time "+theValue);
126
+      sendCommand("Cb"+theValue);
127
+    }
128
+  }
129
+}
130
+
131
+void hysteresisstart(int start) {
132
+  if (!settingStatus) {
133
+    if (start>=1 && start<=8) {
134
+      println("hystereis start "+start);
135
+      sendCommand("Cs"+start);
136
+    }
137
+  }
138
+}
139
+
140
+void hysteresisend(int end) {
141
+  if (!settingStatus) {
142
+    if (end>=-3 && end<=12) {
143
+      println("hystereis end "+end);
144
+      sendCommand("Ce"+end);
145
+    }
146
+  }
147
+}
148
+
149
+void setHysteresisDecrement(int theValue) {
150
+  if (!settingStatus) {
151
+    if (theValue>=0 && theValue<=3) {
152
+      println("Hysteresis decrement "+theValue);
153
+      sendCommand("Cd"+theValue);
154
+    } 
155
+    else {
156
+      println("cannot set decrement to "+theValue);
157
+    }
158
+  }
159
+}
160
+
161
+void setHystDecrement(int value) {
162
+  if (value>=0 && value<=3) {
163
+    hysteresisDecrementButtons.activate(value);
164
+  } 
165
+  else {
166
+    println("this is no proper hysteresis decerement value: "+value);
167
+  }
168
+}
169
+
170
+void motorcurrent(float value) {
171
+  if (activeTab!=null && "default".equals(activeTab.name())) {
172
+    currentSlider.setValue(value);
173
+  }
174
+}
175
+

+ 327
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/examples/TMC26XMotorTester/processing/TMC26XMotorTest/DataRendering.pde View File

@@ -0,0 +1,327 @@
1
+/*
2
+ TMC26XMotorTest.pde - - TMC26X Stepper Tester for Processing
3
+ 
4
+ Copyright (c) 2011, Interactive Matter, Marcus Nowotny
5
+ 
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+ 
13
+ The above copyright notice and this permission notice shall be included in
14
+ all copies or substantial portions of the Software.
15
+ 
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
+ THE SOFTWARE.
23
+ 
24
+ */
25
+
26
+//our graph dimensions
27
+int plotBottom, plotTop;
28
+int plotLeft, plotRight;
29
+
30
+
31
+//we already know the minima and maxima of certain dates
32
+int stallGuardMin =  0;
33
+int stallGuardMax =1024;
34
+
35
+int positionMin = 0;
36
+int positionMax = 1024;
37
+
38
+int dataPointsWidth = 3;
39
+int dataLineWidth = 2;
40
+int highLightWidth = 7;
41
+
42
+int numberOfDataPoints=1000;
43
+
44
+int legendTitleSize = 10;
45
+int legendTextSize = 10;
46
+int currentLabelInterval = 500;
47
+int currentMinorTickInterval = 25;
48
+DecimalFormat currentLabelFormat = new DecimalFormat("#0.0A");
49
+
50
+int stallGuardLabelInterval = 100;
51
+int stallGuardMinorTickInterval = 10;
52
+int positionLabelInterval = 64;
53
+int positionMinorTickInterval = 8;
54
+
55
+int coolStepActiveStroke = 2;
56
+int coolStepInactiveStroke = 1;
57
+int stallGuardHighLightDistance = 1;
58
+int positionHighLightDistance = 3;
59
+int currentHighLightDistance = 3;
60
+
61
+DataTable stallGuardTable = new DataTable(numberOfDataPoints);
62
+DataTable positionTable = new DataTable(numberOfDataPoints);
63
+DataTable currentTable =  new DataTable(numberOfDataPoints);
64
+
65
+int logoLeft = 10;
66
+int logoTop = 50;
67
+int logoWidth = 75;
68
+int logoHeight = 75;
69
+
70
+void setupData() {
71
+  plotBottom = height-50;
72
+  plotTop = 300;
73
+
74
+  plotLeft = 150;
75
+  plotRight= width-50;
76
+  //recalculate the image dimension for the Logo
77
+  logoHeight = (int)((float)logoWidth/(float)TMCLogo.width*(float)TMCLogo.height);
78
+  logoTop = height - 10 - logoHeight;
79
+}
80
+
81
+void drawData() {
82
+
83
+  if (motor_connected && activeTab!=null && runTab.equals(activeTab)) {
84
+    fill(diagramBackgroundColor);
85
+    noStroke();
86
+    rect(plotLeft, plotTop, plotRight, plotBottom);
87
+    noFill();
88
+    rectMode(CORNERS);
89
+    noStroke();
90
+    //rect(plotLeft, plotBottom, plotRight, plotTop);
91
+
92
+    strokeWeight(dataLineWidth);
93
+    stroke(positionColor);
94
+    drawDataLine(positionTable, positionMin, positionMax);
95
+    drawDataHighLight(positionTable, positionMin, positionMax, positionHighLightDistance, labelColor, "Microstep Position", false);
96
+
97
+    strokeWeight(dataLineWidth);
98
+    stroke(coolStepColor);
99
+    drawCurrentLine(currentTable);
100
+    drawCurrentHighLight(positionTable, currentHighLightDistance, labelColor, "Current Ratio", false);
101
+
102
+    strokeWeight(dataPointsWidth);
103
+    stroke(stallGuardColor);
104
+    drawDataPoints(stallGuardTable, stallGuardMin, stallGuardMax);
105
+    drawDataHighLight(stallGuardTable, stallGuardMin, stallGuardMax, stallGuardHighLightDistance, labelColor, "Stall Guard", true);
106
+    
107
+    if (coolStepActive) {
108
+      strokeWeight(coolStepActiveStroke); 
109
+    } else {
110
+      strokeWeight(coolStepInactiveStroke);
111
+    }
112
+    stroke(coolStepColor);
113
+    float coolStepMinHeight = map(coolStepMin, 0, stallGuardMax, plotBottom, plotTop);
114
+    line(plotLeft,coolStepMinHeight, plotRight, coolStepMinHeight);
115
+    float coolStepMaxHeight = map(coolStepMin+coolStepMax+1, 0, stallGuardMax, plotBottom, plotTop);
116
+    line(plotLeft,coolStepMaxHeight, plotRight, coolStepMaxHeight);
117
+
118
+    textSize(legendTitleSize);
119
+    textAlign(RIGHT);
120
+    fill(coolStepColor);
121
+    text("Motor Current", plotLeft - 50, plotTop - 10);
122
+    textSize(legendTextSize);
123
+    textAlign(RIGHT);
124
+    strokeWeight(1);
125
+    stroke(coolStepColor);
126
+    int currentScaleMax = (int)(maxCurrent*1000.0);
127
+    for (int i=0; i<=currentScaleMax; i++) {
128
+      float y = map(i, 0, currentScaleMax, plotBottom, plotTop);
129
+      if (i % currentLabelInterval == 0) {
130
+        if (i==0) {
131
+          textAlign(RIGHT, BOTTOM);
132
+        } 
133
+        else if (i==currentScaleMax) {
134
+          textAlign(RIGHT, TOP);
135
+        } 
136
+        else {
137
+          textAlign(RIGHT, CENTER);
138
+        }        
139
+        text(currentLabelFormat.format((float)i/1000.0), plotLeft-58, y);
140
+        line (plotLeft-55, y, plotLeft-50, y);
141
+      } 
142
+      else if (i % currentMinorTickInterval == 0) {
143
+        line (plotLeft-53, y, plotLeft-50, y);
144
+      }
145
+      
146
+    }
147
+
148
+    textSize(legendTitleSize);
149
+    textAlign(LEFT);
150
+    fill(stallGuardColor);
151
+    text("Stall Guard Reading", plotLeft - 30, plotTop - 10);
152
+    textSize(legendTextSize);
153
+    textAlign(RIGHT);
154
+    strokeWeight(1);
155
+    stroke(stallGuardColor);
156
+    for (int i=stallGuardMin; i<=stallGuardMax; i++) {
157
+      float y = map(i, stallGuardMin, stallGuardMax, plotBottom, plotTop);
158
+      if (i % stallGuardLabelInterval == 0) {
159
+        if (i==stallGuardMin) {
160
+          textAlign(RIGHT, BOTTOM);
161
+        } 
162
+        else if (i==stallGuardMax) {
163
+          textAlign(RIGHT, TOP);
164
+        } 
165
+        else {
166
+          textAlign(RIGHT, CENTER);
167
+        }        
168
+        text(i, plotLeft-8, y);
169
+        line (plotLeft-5, y, plotLeft, y);
170
+      } 
171
+      else if (i % stallGuardMinorTickInterval == 0) {
172
+        line (plotLeft-3, y, plotLeft, y);
173
+      }
174
+    }
175
+
176
+    textSize(legendTitleSize);
177
+    fill(positionColor);
178
+    textAlign(RIGHT);
179
+    text("Position", plotRight + 30, plotTop - 10);
180
+    textSize(legendTextSize);
181
+    textAlign(LEFT);
182
+    strokeWeight(1);
183
+    stroke(positionColor);
184
+    for (int i=positionMin; i<=positionMax; i++) {
185
+      float y = map(i, positionMin, positionMax, plotBottom, plotTop);
186
+      if (i % positionLabelInterval == 0) {
187
+        if (i==positionMin) {
188
+          textAlign(LEFT, BOTTOM);
189
+        } 
190
+        else if (i==stallGuardMax) {
191
+          textAlign(LEFT, TOP);
192
+        } 
193
+        else {
194
+          textAlign(LEFT, CENTER);
195
+        }        
196
+        text(i, plotRight+8, y);
197
+        line (plotRight, y, plotRight+5, y);
198
+      } 
199
+      else if (i % positionMinorTickInterval == 0) {
200
+        line (plotRight, y, plotRight+3, y);
201
+      }
202
+    }
203
+    //draw the channel status
204
+    textSize(legendTextSize);
205
+    textAlign(CENTER);
206
+    strokeWeight(1);
207
+    int statusY = height - 20;
208
+    int channelAX = width/4;
209
+    int temperatureX = width/2;
210
+    int channelBX = width/4*3;
211
+    if (channelAStatus==null) {
212
+      fill(goodStatusColor);
213
+      text("Channel A: OK", channelAX, statusY);
214
+    } 
215
+    else {
216
+      fill(badStatusColor);
217
+      text("Channel A: "+channelAStatus, channelAX, statusY);
218
+    }    
219
+    if (channelBStatus==null) {
220
+      fill(goodStatusColor);
221
+      text("Channel B: OK", channelBX, statusY);
222
+    } 
223
+    else {
224
+      fill(badStatusColor);
225
+      text("Channel B: "+channelBStatus, channelBX, statusY);
226
+    }    
227
+    if (temperatureStatus==null) {
228
+      fill(goodStatusColor);
229
+      text("Temperature: OK", temperatureX, statusY);
230
+    } 
231
+    else {
232
+      fill(badStatusColor);
233
+      text("Temperature: "+temperatureStatus, temperatureX, statusY);
234
+    }
235
+  }
236
+}
237
+void drawDataPoints(DataTable table, int minValue, int maxValue) {
238
+  int dataCount = table.getSize();
239
+  for (int i=0; i<dataCount; i++) {
240
+    int value = table.getEntry(i);
241
+    float x = map(i, 0, numberOfDataPoints-1, plotLeft+dataPointsWidth, plotRight-dataPointsWidth);
242
+    float y = map(value, minValue, maxValue, plotBottom-dataPointsWidth, plotTop+dataPointsWidth);
243
+    point(x, y);
244
+  }
245
+}
246
+
247
+void drawDataLine(DataTable table, int minValue, int maxValue) {
248
+  beginShape();
249
+  int dataCount = table.getSize();
250
+  for (int i=0; i<dataCount; i++) {
251
+    int value = table.getEntry(i);
252
+    float x = map(i, 0, numberOfDataPoints-1, plotLeft+dataPointsWidth, plotRight-dataPointsWidth);
253
+    float y = map(value, minValue, maxValue, plotBottom-dataPointsWidth, plotTop+dataPointsWidth);
254
+    vertex(x, y);
255
+  }
256
+  endShape();
257
+}
258
+
259
+void drawDataHighLight(DataTable table, int minValue, int maxValue, int distance, color textColor, String name, boolean top) {
260
+  int dataCount = table.getSize();
261
+  for (int i=0; i<dataCount; i++) {
262
+    int value = table.getEntry(i);
263
+    float x = map(i, 0, numberOfDataPoints-1, plotLeft+dataPointsWidth, plotRight-dataPointsWidth);
264
+    float y = map(value, minValue, maxValue, plotBottom-dataPointsWidth, plotTop+dataPointsWidth);
265
+    if (dist(mouseX, mouseY, x, y) < distance) {
266
+      strokeWeight(highLightWidth);
267
+      point(x, y);
268
+      fill(textColor);
269
+      textSize(10);
270
+      textAlign(CENTER);
271
+      if (top) {
272
+        text(name+": "+value, x, y-8);
273
+      } 
274
+      else {
275
+        text(name+": "+value, x, y+8);
276
+      }
277
+    }
278
+  }
279
+}
280
+
281
+void drawCurrentLine(DataTable table) {
282
+  noFill();
283
+  beginShape();
284
+  int dataCount = table.getSize();
285
+  for (int i=0; i<dataCount; i++) {
286
+    float value = (table.getEntry(i)+1)/1000.0;
287
+    float x = map(i, 0, numberOfDataPoints-1, plotLeft+dataPointsWidth, plotRight-dataPointsWidth);
288
+    float y = map(value, 0.0, maxCurrent, (float)plotBottom-dataPointsWidth, (float)plotTop+dataPointsWidth);
289
+    vertex(x, y);
290
+  }
291
+  endShape();
292
+}
293
+
294
+void drawCurrentHighLight(DataTable table, int distance, color textColor, String name, boolean top) {
295
+  int dataCount = table.getSize();
296
+  for (int i=0; i<dataCount; i++) {
297
+    float value = (table.getEntry(i)+1)/1000.0;
298
+    float x = map(i, 0, numberOfDataPoints-1, plotLeft+dataPointsWidth, plotRight-dataPointsWidth);
299
+    float y = map(value, 0.0, maxCurrent, plotBottom-dataPointsWidth, plotTop+dataPointsWidth);
300
+    if (dist(mouseX, mouseY, x, y) < distance) {
301
+      strokeWeight(highLightWidth);
302
+      point(x, y);
303
+      fill(textColor);
304
+      textSize(10);
305
+      textAlign(CENTER);
306
+      if (top) {
307
+        text(name+": "+value, x, y-8);
308
+      } 
309
+      else {
310
+        text(name+": "+value, x, y+8);
311
+      }
312
+    }
313
+  }
314
+}
315
+
316
+void addStallGuardReading(int value) {
317
+  stallGuardTable.addData(value);
318
+}
319
+
320
+void addPositionReading(int value) {
321
+  positionTable.addData(value);
322
+}
323
+
324
+void addCurrentReading(int value) {
325
+  currentTable.addData(value);
326
+}
327
+

+ 49
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/examples/TMC26XMotorTester/processing/TMC26XMotorTest/DataTable.pde View File

@@ -0,0 +1,49 @@
1
+/*
2
+ TMC26XMotorTest.pde - - TMC26X Stepper Tester for Processing
3
+ 
4
+ Copyright (c) 2011, Interactive Matter, Marcus Nowotny
5
+ 
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+ 
13
+ The above copyright notice and this permission notice shall be included in
14
+ all copies or substantial portions of the Software.
15
+ 
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
+ THE SOFTWARE.
23
+ 
24
+ */
25
+
26
+class DataTable {
27
+  
28
+  LinkedList<Integer> dataList = new LinkedList<Integer>();
29
+  int maxEntries;
30
+  
31
+  DataTable(int maxEntries) {
32
+    this.maxEntries = maxEntries;
33
+  }
34
+  
35
+  void addData(int value) {
36
+    dataList.add(value);
37
+    if (dataList.size()>maxEntries) {
38
+      dataList.remove();
39
+    }
40
+  }
41
+  
42
+  int getSize() {
43
+    return dataList.size();
44
+  }
45
+  
46
+  int getEntry(int position) {
47
+    return dataList.get(position);
48
+  }
49
+}

+ 335
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/examples/TMC26XMotorTester/processing/TMC26XMotorTest/RunConfiguration.pde View File

@@ -0,0 +1,335 @@
1
+/*
2
+ TMC26XMotorTest.pde - - TMC26X Stepper Tester for Processing
3
+ 
4
+ Copyright (c) 2011, Interactive Matter, Marcus Nowotny
5
+ 
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+ 
13
+ The above copyright notice and this permission notice shall be included in
14
+ all copies or substantial portions of the Software.
15
+ 
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
+ THE SOFTWARE.
23
+ 
24
+ */
25
+
26
+Slider speedSlider;
27
+Toggle runToggle;
28
+RadioButton directionButtons;
29
+Toggle enabledToggle;
30
+RadioButton microsteppingButtons;
31
+Slider sgtSlider;
32
+Button sgtPlus;
33
+Button sgtMinus;
34
+Toggle sgFilterToggle;
35
+Slider currentSlider;
36
+Slider coolStepMinSlider;
37
+Slider coolStepMaxSlider;
38
+Toggle coolStepActiveToggle;
39
+RadioButton coolStepIncrementButtons;
40
+RadioButton coolStepDecrementButtons;
41
+RadioButton coolStepMinButtons;
42
+List runControls = new LinkedList();
43
+
44
+Button trinamicButton;
45
+Button motionControlButton;
46
+
47
+void setupRunConfig() {
48
+  //the run configuration
49
+  //controlP5.getControlFont().setSize(10); - the font is too small, try to increase it!
50
+  //add a button te let the motor run
51
+  runToggle = controlP5.addToggle("run", false, 20, 40, 30, 30);
52
+  controlElements.add(runToggle);
53
+  runToggle.moveTo(runTab);
54
+  //add some directions buttons
55
+  directionButtons = controlP5.addRadioButton("direction", 20, 90);
56
+  controlElements.add(directionButtons);
57
+  directionButtons.addItem("forward", 1);
58
+  directionButtons.addItem("backward", -1);
59
+  directionButtons.activate(0);
60
+  directionButtons.moveTo(runTab);
61
+  enabledToggle = controlP5.addToggle("enabled", false, 20, 220, 30, 30);
62
+  controlElements.add(enabledToggle);
63
+  enabledToggle.moveTo(runTab);
64
+
65
+  // add a vertical slider for speed  
66
+  speedSlider = controlP5.addSlider("speed", 1, 100, 10, 85, 40, 20, 210);
67
+  controlElements.add(speedSlider);
68
+  speedSlider.moveTo(runTab);
69
+
70
+  //ad a multilist for the microstepping setting
71
+  microsteppingButtons = controlP5.addRadioButton("microstepping", 150, 40);
72
+  controlElements.add(microsteppingButtons);
73
+  microsteppingButtons.addItem("m_1/1", 1);
74
+  microsteppingButtons.addItem("m_1/2", 2);
75
+  microsteppingButtons.addItem("m_1/4", 4);
76
+  microsteppingButtons.addItem("m_1/8", 8);
77
+  microsteppingButtons.addItem("m_1/16", 16);
78
+  microsteppingButtons.addItem("m_1/32", 32);
79
+  microsteppingButtons.addItem("m_1/64", 64);
80
+  microsteppingButtons.addItem("m_1/128", 128);
81
+  microsteppingButtons.addItem("m_1/256", 256);
82
+  for (Object o:microsteppingButtons.getItems()) {
83
+    Toggle t = (Toggle) o;
84
+    t.setCaptionLabel(t.getName().substring(2));
85
+  }
86
+  microsteppingButtons.showBar();
87
+  microsteppingButtons.moveTo(runTab);
88
+
89
+
90
+
91
+  currentSlider = controlP5.addSlider("current", 0.46, maxCurrent, 0.4, 250, 40, 20, 210);
92
+  controlElements.add(currentSlider);
93
+  currentSlider.moveTo(runTab);
94
+
95
+  // add a vertical slider for stallGuard threshold  
96
+  sgtPlus = controlP5.addButton("sgtplus", 0, 400, 40, 20, 20);
97
+  controlElements.add(sgtPlus);
98
+  sgtPlus.setCaptionLabel("+");
99
+  sgtPlus.moveTo(runTab);
100
+  sgtMinus = controlP5.addButton("sgtminus", 1, 400, 70, 20, 20);
101
+  controlElements.add(sgtMinus);
102
+  sgtMinus.setCaptionLabel("-");
103
+  sgtMinus.moveTo(runTab);
104
+  sgtSlider = controlP5.addSlider("stallguardthreshold", -64, 63, 0, 350, 40, 20, 150);
105
+  controlElements.add(sgtSlider);
106
+  sgtSlider.setSliderMode(Slider.FIX);
107
+  sgtSlider.setCaptionLabel("Stall Guard Threshold");
108
+  sgtSlider.moveTo(runTab);
109
+  //ading some buttons to have finer sg control
110
+  //adding a button for the filter
111
+  sgFilterToggle = controlP5.addToggle("sgfilter", false, 350, 220, 30, 30);
112
+  controlElements.add(sgFilterToggle);
113
+  sgFilterToggle.setCaptionLabel("Stall GuardFilter");
114
+  sgFilterToggle.moveTo(runTab);
115
+  
116
+  //add the coolstep sliders
117
+  coolStepMaxSlider = controlP5.addSlider("coolStepUpper", 0, 480, 0, 500, 40, 20, 90);
118
+  controlElements.add(coolStepMaxSlider);
119
+  coolStepMaxSlider.setCaptionLabel("Cool Step Hysteresis");
120
+  coolStepMaxSlider.moveTo(runTab);
121
+
122
+  coolStepMinSlider = controlP5.addSlider("coolStepLower", 0, 480, 0, 500, 160, 20, 90);
123
+  controlElements.add(coolStepMinSlider);
124
+  coolStepMinSlider.setCaptionLabel("Cool Step Minimum");
125
+  coolStepMinSlider.moveTo(runTab);
126
+  
127
+  coolStepActiveToggle = controlP5.addToggle("coolStepActive", false, 600, 220, 30, 30);  
128
+  controlElements.add(coolStepActiveToggle);
129
+  coolStepActiveToggle.setCaptionLabel("Enable CoolStep");
130
+  coolStepActiveToggle.moveTo(runTab);
131
+
132
+  coolStepIncrementButtons = controlP5.addRadioButton("coolStepIncrement", 600, 40);
133
+  controlElements.add(coolStepIncrementButtons);
134
+  coolStepIncrementButtons.captionLabel().set("Cool Step  Increment");
135
+  coolStepIncrementButtons.addItem("i_1", 0);
136
+  coolStepIncrementButtons.addItem("i_2", 1);
137
+  coolStepIncrementButtons.addItem("i_4", 2);
138
+  coolStepIncrementButtons.addItem("i_8", 3);
139
+  for (Object o:coolStepIncrementButtons.getItems()) {
140
+    Toggle t = (Toggle) o;
141
+    t.setCaptionLabel(t.getName().substring(2));
142
+  }
143
+  coolStepIncrementButtons.showBar();
144
+  coolStepIncrementButtons.moveTo(runTab);
145
+
146
+  coolStepDecrementButtons = controlP5.addRadioButton("coolStepDecrement", 600, 110);
147
+  controlElements.add(coolStepDecrementButtons);
148
+  coolStepDecrementButtons.captionLabel().set("Cool Step Decrement");
149
+  coolStepDecrementButtons.addItem("d_32", 0);
150
+  coolStepDecrementButtons.addItem("d_8", 1);
151
+  coolStepDecrementButtons.addItem("d_2", 2);
152
+  coolStepDecrementButtons.addItem("d_1", 3);
153
+  for (Object o:coolStepDecrementButtons.getItems()) {
154
+    Toggle t = (Toggle) o;
155
+    t.setCaptionLabel(t.getName().substring(2));
156
+  }
157
+  coolStepDecrementButtons.showBar();
158
+  coolStepDecrementButtons.moveTo(runTab);
159
+
160
+  coolStepMinButtons = controlP5.addRadioButton("coolStepMin", 600, 180);
161
+  controlElements.add(coolStepMinButtons);
162
+  coolStepMinButtons.addItem("s_1/2", 0);
163
+  coolStepMinButtons.addItem("s_1/4", 1);
164
+  for (Object o:coolStepMinButtons.getItems()) {
165
+    Toggle t = (Toggle) o;
166
+    t.setCaptionLabel(t.getName().substring(2));
167
+  }
168
+  coolStepMinButtons.showBar();
169
+  coolStepMinButtons.moveTo(runTab);
170
+  
171
+  trinamicButton = controlP5.addButton("trinamicLogo", 1.0, 750, 40, 200, 100);
172
+  trinamicButton.setImage(TMCLogo);
173
+  trinamicButton.moveTo(runTab);
174
+  controlElements.add(trinamicButton);
175
+  
176
+  motionControlButton = controlP5.addButton("mcLogo", 1.0, 750, 150, 200, 100);
177
+  motionControlButton.setImage(MCLogo);
178
+  motionControlButton.moveTo(runTab);
179
+  controlElements.add(motionControlButton);
180
+}
181
+
182
+void speed(int theSpeed) {
183
+  if (!settingStatus) {
184
+    int speed = (int) theSpeed;
185
+    println("setting speed to "+speed);
186
+    sendCommand("S"+speed);
187
+  }
188
+}
189
+
190
+void run(int value) {
191
+  if (!settingStatus) {
192
+    println("button pressed");
193
+    if (running) {
194
+      println("stopping motor");
195
+      sendCommand("s");
196
+      running = false;
197
+    } 
198
+    else {
199
+      println("starting motor");
200
+      sendCommand("r");
201
+      running = true;
202
+    }
203
+  }
204
+}
205
+
206
+void enabled(int value) {
207
+  if (!settingStatus) {
208
+    println("enabled: "+value);
209
+    sendCommand("e"+value);
210
+  }
211
+}
212
+
213
+void microstepping(int value) {
214
+  if (!settingStatus) {
215
+    println("microstepping: "+value);
216
+    sendCommand("m"+value);
217
+  }
218
+}
219
+
220
+void stallguardthreshold(int value) {
221
+  if (!settingStatus) {
222
+    println("stall guard threshold: "+value);
223
+    sendCommand("t"+value);
224
+  }
225
+  if (value==sgtSlider.max()) {
226
+    sgtPlus.lock();
227
+  } 
228
+  else {
229
+    sgtPlus.unlock();
230
+  }
231
+  if (value==sgtSlider.min()) {
232
+    sgtMinus.lock();
233
+  } 
234
+  else {
235
+    sgtMinus.unlock();
236
+  }
237
+}
238
+
239
+void sgtplus(int value) {
240
+  sgtSlider.setValue(sgtSlider.value()+1);
241
+}
242
+
243
+void sgtminus(int value) {
244
+  sgtSlider.setValue(sgtSlider.value()-1);
245
+}
246
+
247
+void sgfilter(int value) {
248
+  if (!settingStatus) {
249
+    println("filter: "+value);
250
+    sendCommand("f"+value);
251
+  }
252
+}  
253
+
254
+void current(float value) {
255
+  if (!settingStatus) {
256
+    int realValue=(int)(value*1000.0);
257
+    println("current: "+((float)realValue/1000.0)+" = "+realValue);
258
+    sendCommand("c"+realValue);
259
+    if (activeTab!=null && "run".equals(activeTab.name())) {
260
+      motorCurrentBox.setValue(value);
261
+    }
262
+  }
263
+}
264
+
265
+void coolStepUpper(int value) {
266
+  coolStepMax=value;
267
+  if (!settingStatus) {
268
+    sendCommand("Ku"+value);
269
+  }
270
+}
271
+
272
+void coolStepLower(int value) {
273
+  coolStepMin = value;
274
+  if (!settingStatus) {
275
+    sendCommand("Kl"+value);
276
+  }
277
+}
278
+
279
+
280
+void setCoolStepIncrement(int value) {
281
+  if (!settingStatus) {
282
+    println("cool step increment :"+value);
283
+    sendCommand("Ki"+value);
284
+  }
285
+}
286
+
287
+void setCoolStepDecrement(int value) {
288
+  if (!settingStatus) {
289
+    println("cool step decrement :"+value);
290
+    sendCommand("Kn"+value);
291
+  }
292
+}
293
+
294
+void setCoolStepMin(int value) {
295
+  if (!settingStatus) {
296
+    println("cool step minimum :"+value);
297
+    sendCommand("Km"+value);
298
+  }
299
+}
300
+
301
+void coolStepActive(int value) {
302
+  if (!settingStatus) {
303
+    coolStepActive = (value!=0);
304
+    sendCommand(coolStepActive? "K+":"K-");
305
+  }
306
+}
307
+
308
+void setCurrent(int current) {
309
+  currentSlider.setValue((float)current/1000.0);
310
+}
311
+
312
+void setDirection(int direction) {
313
+  if (!settingStatus) {
314
+    if (direction<0) {
315
+      println("back");
316
+      sendCommand("d-1");
317
+    } 
318
+    else {
319
+      sendCommand("d1");
320
+    }
321
+  }
322
+}
323
+
324
+void trinamicLogo(float value){
325
+  if (value!=0) {
326
+    link(trinamicUrl);
327
+  }
328
+}
329
+
330
+void mcLogo(float value) {
331
+  if (value!=0) {
332
+    link(mcUrl);
333
+  }
334
+}
335
+

+ 156
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/examples/TMC26XMotorTester/processing/TMC26XMotorTest/TMC26XMotorTest.pde View File

@@ -0,0 +1,156 @@
1
+/*
2
+ TMC26XMotorTest.pde - - TMC26X Stepper Tester for Processing
3
+ 
4
+ Copyright (c) 2011, Interactive Matter, Marcus Nowotny
5
+ 
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+ 
13
+ The above copyright notice and this permission notice shall be included in
14
+ all copies or substantial portions of the Software.
15
+ 
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
+ THE SOFTWARE.
23
+ 
24
+ */
25
+import controlP5.*;
26
+import processing.serial.*;
27
+import java.util.*;
28
+import java.text.*;
29
+
30
+ControlP5 controlP5;
31
+
32
+Serial arduinoPort;
33
+
34
+String helpUrl = "http://www.motioncontrol-community.org/";
35
+String trinamicUrl = "http://trinamic.com";
36
+String mcUrl = "http://www.motioncontrol-community.org/";
37
+
38
+//TODO comde up with a nice color scheme
39
+color activeColor = #01ADF1;
40
+color foreGroundColor = #01ADF1; 
41
+color uiTextColor = #4D4D4F;
42
+color uiElementColor = #ffffff;
43
+color labelColor = #f0f0f0;
44
+color valueColor = #f0f0f0;
45
+color backgroundColor = #EDEEEF;
46
+color stallGuardColor = #969696;
47
+color positionColor = #01ADF1;
48
+color goodStatusColor = labelColor;
49
+color badStatusColor = stallGuardColor;
50
+color coolStepColor = #4D4D4F;
51
+color diagramBackgroundColor = #ffffff;
52
+
53
+CColor uiColor = new CColor( foreGroundColor, uiElementColor, activeColor, uiTextColor, uiTextColor);
54
+
55
+Tab configureTab;
56
+Tab runTab;
57
+Tab activeTab;
58
+
59
+boolean settingStatus=false;
60
+
61
+boolean running = false;
62
+int coolStepMin = 0;
63
+int coolStepMax = 0;
64
+boolean coolStepActive = false;
65
+
66
+float maxCurrent = 1.7;
67
+
68
+List controlElements = new LinkedList();
69
+List serialConfigElements = new LinkedList();
70
+
71
+PImage TMCLogo;
72
+PImage MCLogo;
73
+
74
+void setup() {
75
+  size(1000, 800);
76
+  //load the logos
77
+  TMCLogo=loadImage("tmc_logo.jpg");
78
+  MCLogo=loadImage("mc_logo.jpg");
79
+  
80
+  //create the UI
81
+  controlP5 = new ControlP5(this);
82
+  controlP5.setColor(uiColor);
83
+  runTab = controlP5.getTab("default");
84
+  configureTab =controlP5.addTab("configure"); 
85
+  //customize the tabs a bit
86
+  configureTab.setLabel("configure");
87
+  controlElements.add(configureTab);
88
+  activeTab =  controlP5.getTab("default");
89
+  controlP5.setTabEventsActive(true);
90
+  configureTab.activateEvent(true);
91
+  runTab.activateEvent(true);
92
+
93
+  //configuring the general UI l&f
94
+  //the configuration UI
95
+
96
+  setupRunConfig();
97
+  setupChooperConfig();
98
+  setupSerialConfig();
99
+  //directly hide the controls again since we are not connected to the Arduino yet
100
+  toggleUi(motor_connected);
101
+
102
+  smooth();
103
+  setupData();
104
+}
105
+
106
+
107
+void toggleUi(boolean show_controls) {
108
+  for (Object c:controlElements) {
109
+    ControllerInterface controller = (ControllerInterface) c;
110
+    if (show_controls) {
111
+      controller.show();
112
+    } else {
113
+      controller.hide();
114
+    }
115
+  }
116
+  for (Object c:serialConfigElements) {
117
+    ControllerInterface controller = (ControllerInterface) c;
118
+    if (show_controls) {
119
+      controller.hide();
120
+    } else {
121
+      controller.show();
122
+    }
123
+  }    
124
+}
125
+
126
+void draw() {
127
+  background(backgroundColor);
128
+  drawSerial();
129
+  drawChopper();
130
+  drawData();
131
+  decodeSerial();
132
+}
133
+
134
+
135
+void controlEvent(ControlEvent theEvent) {
136
+  if (theEvent.isGroup() && !settingStatus) {
137
+    if ("microstepping".equals(theEvent.group().name())) { 
138
+      microstepping((int)theEvent.group().value());
139
+    } else 
140
+    if ("direction".equals(theEvent.group().name())) {
141
+      setDirection((int)theEvent.group().value());
142
+    } else if ("decrement".equals(theEvent.group().name())) {
143
+      setHysteresisDecrement((int)theEvent.group().value());
144
+    } else if ("coolStepIncrement".equals(theEvent.group().name())) {
145
+      setCoolStepIncrement((int)theEvent.group().value());
146
+    } else if ("coolStepDecrement".equals(theEvent.group().name())) {
147
+      setCoolStepDecrement((int)theEvent.group().value());
148
+    } else if ("coolStepMin".equals(theEvent.group().name())) {
149
+      setCoolStepMin((int)theEvent.group().value());
150
+    }
151
+  } 
152
+  else if (theEvent.isTab()) {
153
+    activeTab = theEvent.tab();
154
+    println("Tab: "+activeTab.name());
155
+  } 
156
+}

BIN
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/examples/TMC26XMotorTester/processing/TMC26XMotorTest/data/mc_logo.jpg View File


BIN
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/examples/TMC26XMotorTester/processing/TMC26XMotorTest/data/tmc_logo.jpg View File


BIN
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/examples/TMC26XMotorTester/processing/TMC26XMotorTest/hysteresis.png View File


+ 2
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/examples/TMC26XMotorTester/processing/TMC26XMotorTest/sketch.properties View File

@@ -0,0 +1,2 @@
1
+mode.id=processing.mode.java.JavaMode
2
+mode=Java

+ 75
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/keywords.txt View File

@@ -0,0 +1,75 @@
1
+#######################################
2
+# Syntax Coloring Map For Test
3
+#######################################
4
+
5
+#######################################
6
+# Datatypes (KEYWORD1)
7
+#######################################
8
+
9
+Stepper	TMC26XStepper
10
+
11
+#######################################
12
+# Methods and Functions (KEYWORD2)
13
+#######################################
14
+
15
+start				KEYWORD2
16
+step				KEYWORD2
17
+setSpeed			KEYWORD2
18
+getSpeed			KEYWORD2
19
+setMicrosteps			KEYWORD2
20
+getMicrosteps			KEYWORD2
21
+move				KEYWORD2
22
+isMoving			KEYWORD2
23
+getStepsLeft			KEYWORD2
24
+stop				KEYWORD2
25
+setConstantOffTimeChopper	KEYWORD2
26
+setSpreadCycleChopper		KEYWORD2
27
+setRandomOffTime		KEYWORD2
28
+setCurrent			KEYWORD2
29
+getCurrent			KEYWORD2
30
+setStallGuardThreshold		KEYWORD2
31
+getStallGuardThreshold		KEYWORD2
32
+getStallGuardFilter		KEYWORD2
33
+setCoolStepConfiguration	KEYWORD2
34
+setCoolStepEnabled		KEYWORD2
35
+isCoolStepEnabled		KEYWORD2
36
+getCoolStepLowerSgThreshold	KEYWORD2
37
+getCoolStepUpperSgThreshold	KEYWORD2
38
+getCoolStepNumberOfSGReadings	KEYWORD2
39
+getCoolStepCurrentIncrementSize	KEYWORD2
40
+getCoolStepLowerCurrentLimit	KEYWORD2
41
+getMotorPosition		KEYWORD2
42
+getCurrentStallGuardReading	KEYWORD2
43
+getCurrentCSReading		KEYWORD2
44
+isCurrentScalingHalfed		KEYWORD2
45
+getCurrentCurrent		KEYWORD2
46
+isStallGuardOverThreshold	KEYWORD2
47
+getOverTemperature		KEYWORD2
48
+isShortToGroundA		KEYWORD2
49
+isShortToGroundB		KEYWORD2
50
+isOpenLoadA			KEYWORD2
51
+isOpenLoadB			KEYWORD2
52
+isStandStill			KEYWORD2
53
+isStallGuardReached		KEYWORD2
54
+setEnabled			KEYWORD2
55
+isEnabled			KEYWORD2
56
+readStatus			KEYWORD2
57
+getResistor			KEYWORD2
58
+debugLastStatus			KEYWORD2
59
+version				KEYWORD2
60
+
61
+######################################
62
+# Instances (KEYWORD2)
63
+#######################################
64
+
65
+#######################################
66
+# Constants (LITERAL1)
67
+#######################################
68
+
69
+TMC262_OVERTEMPERATURE_PREWARING	LITERAL1
70
+TMC262_OVERTEMPERATURE_SHUTDOWN 	LITERAL1
71
+TMC262_READOUT_POSITION 		LITERAL1
72
+TMC262_READOUT_STALLGUARD 		LITERAL1
73
+TMC262_READOUT_CURRENT 		LITERAL1
74
+COOL_STEP_HALF_CS_LIMIT		LITERAL1
75
+COOL_STEP_QUARTDER_CS_LIMIT		LITERAL1

+ 30
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/mainpage.dox View File

@@ -0,0 +1,30 @@
1
+/*!
2
+ * \mainpage TMC 260, 261, 262 Stepper Driver for Arduino
3
+ * \author Interactive MAtter, MArcus Nowotny, marcus@interactive-matter.eu
4
+ * \section HOWTO How to use the driver
5
+ * Here we go with aminial how to description
6
+ *
7
+ *
8
+ * \section  COPYRIGHT_NOTIFICATION COPYRIGHT NOTIFICATION
9
+ * \par (c) 2011 Interactive MAtter, Marcus Nowotny 
10
+ *
11
+ * \par
12
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
13
+ * of this software and associated documentation files (the "Software"), to deal
14
+ *  in the Software without restriction, including without limitation the rights
15
+ *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16
+ *  copies of the Software, and to permit persons to whom the Software is
17
+ *  furnished to do so, subject to the following conditions:
18
+ *  
19
+ *  The above copyright notice and this permission notice shall be included in
20
+ *  all copies or substantial portions of the Software.
21
+ 
22
+ *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23
+ *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24
+ *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25
+ *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26
+ *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27
+ *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
28
+ *  THE SOFTWARE.
29
+ *
30
+ */

+ 9797
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/schematics/tmc-260-shield.brd
File diff suppressed because it is too large
View File


+ 11079
- 0
ArduinoAddons/Arduino_1.x.x/libraries/TMC26XStepper/schematics/tmc-260-shield.sch
File diff suppressed because it is too large
View File


+ 135
- 0
Marlin/Configuration_adv.h View File

@@ -462,6 +462,141 @@ const unsigned int dropsegments=5; //everything with less than this number of st
462 462
   #endif
463 463
 #endif
464 464
 
465
+
466
+/******************************************************************************\
467
+ * enable this section if you have TMC26X motor drivers. 
468
+ * you need to import the TMC26XStepper library into the arduino IDE for this
469
+ ******************************************************************************/
470
+
471
+//#define HAVE_TMCDRIVER
472
+#ifdef HAVE_TMCDRIVER
473
+
474
+//	#define X_IS_TMC
475
+	#define X_MAX_CURRENT 1000  //in mA
476
+	#define X_SENSE_RESISTOR 91 //in mOhms
477
+	#define X_MICROSTEPS 16     //number of microsteps
478
+	
479
+//	#define X2_IS_TMC
480
+	#define X2_MAX_CURRENT 1000  //in mA
481
+	#define X2_SENSE_RESISTOR 91 //in mOhms
482
+	#define X2_MICROSTEPS 16     //number of microsteps
483
+	
484
+//	#define Y_IS_TMC
485
+	#define Y_MAX_CURRENT 1000  //in mA
486
+	#define Y_SENSE_RESISTOR 91 //in mOhms
487
+	#define Y_MICROSTEPS 16     //number of microsteps
488
+	
489
+//	#define Y2_IS_TMC
490
+	#define Y2_MAX_CURRENT 1000  //in mA
491
+	#define Y2_SENSE_RESISTOR 91 //in mOhms
492
+	#define Y2_MICROSTEPS 16     //number of microsteps	
493
+	
494
+//	#define Z_IS_TMC
495
+	#define Z_MAX_CURRENT 1000  //in mA
496
+	#define Z_SENSE_RESISTOR 91 //in mOhms
497
+	#define Z_MICROSTEPS 16     //number of microsteps
498
+	
499
+//	#define Z2_IS_TMC
500
+	#define Z2_MAX_CURRENT 1000  //in mA
501
+	#define Z2_SENSE_RESISTOR 91 //in mOhms
502
+	#define Z2_MICROSTEPS 16     //number of microsteps
503
+	
504
+//	#define E0_IS_TMC
505
+	#define E0_MAX_CURRENT 1000  //in mA
506
+	#define E0_SENSE_RESISTOR 91 //in mOhms
507
+	#define E0_MICROSTEPS 16     //number of microsteps
508
+	
509
+//	#define E1_IS_TMC
510
+	#define E1_MAX_CURRENT 1000  //in mA
511
+	#define E1_SENSE_RESISTOR 91 //in mOhms
512
+	#define E1_MICROSTEPS 16     //number of microsteps	
513
+	
514
+//	#define E2_IS_TMC
515
+	#define E2_MAX_CURRENT 1000  //in mA
516
+	#define E2_SENSE_RESISTOR 91 //in mOhms
517
+	#define E2_MICROSTEPS 16     //number of microsteps	
518
+	
519
+//	#define E3_IS_TMC
520
+	#define E3_MAX_CURRENT 1000  //in mA
521
+	#define E3_SENSE_RESISTOR 91 //in mOhms
522
+	#define E3_MICROSTEPS 16     //number of microsteps		
523
+
524
+#endif
525
+
526
+/******************************************************************************\
527
+ * enable this section if you have L6470  motor drivers. 
528
+ * you need to import the L6470 library into the arduino IDE for this
529
+ ******************************************************************************/
530
+
531
+//#define HAVE_L6470DRIVER
532
+#ifdef HAVE_L6470DRIVER
533
+
534
+//	#define X_IS_L6470
535
+	#define X_MICROSTEPS 16     //number of microsteps
536
+	#define X_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
537
+	#define X_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
538
+	#define X_STALLCURRENT 1500 //current in mA where the driver will detect a stall
539
+	
540
+//	#define X2_IS_L6470
541
+	#define X2_MICROSTEPS 16     //number of microsteps
542
+	#define X2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
543
+	#define X2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
544
+	#define X2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
545
+	
546
+//	#define Y_IS_L6470
547
+	#define Y_MICROSTEPS 16     //number of microsteps
548
+	#define Y_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
549
+	#define Y_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
550
+	#define Y_STALLCURRENT 1500 //current in mA where the driver will detect a stall
551
+	
552
+//	#define Y2_IS_L6470
553
+	#define Y2_MICROSTEPS 16     //number of microsteps	
554
+	#define Y2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
555
+	#define Y2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
556
+	#define Y2_STALLCURRENT 1500 //current in mA where the driver will detect a stall	
557
+	
558
+//	#define Z_IS_L6470
559
+	#define Z_MICROSTEPS 16     //number of microsteps
560
+	#define Z_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
561
+	#define Z_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
562
+	#define Z_STALLCURRENT 1500 //current in mA where the driver will detect a stall
563
+	
564
+//	#define Z2_IS_L6470
565
+	#define Z2_MICROSTEPS 16     //number of microsteps
566
+	#define Z2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
567
+	#define Z2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
568
+	#define Z2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
569
+	
570
+//	#define E0_IS_L6470
571
+	#define E0_MICROSTEPS 16     //number of microsteps
572
+	#define E0_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
573
+	#define E0_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
574
+	#define E0_STALLCURRENT 1500 //current in mA where the driver will detect a stall
575
+	
576
+//	#define E1_IS_L6470
577
+	#define E1_MICROSTEPS 16     //number of microsteps	
578
+	#define E1_MICROSTEPS 16     //number of microsteps
579
+	#define E1_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
580
+	#define E1_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
581
+	#define E1_STALLCURRENT 1500 //current in mA where the driver will detect a stall
582
+	
583
+//	#define E2_IS_L6470
584
+	#define E2_MICROSTEPS 16     //number of microsteps	
585
+	#define E2_MICROSTEPS 16     //number of microsteps
586
+	#define E2_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
587
+	#define E2_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
588
+	#define E2_STALLCURRENT 1500 //current in mA where the driver will detect a stall
589
+	
590
+//	#define E3_IS_L6470
591
+	#define E3_MICROSTEPS 16     //number of microsteps		
592
+	#define E3_MICROSTEPS 16     //number of microsteps
593
+	#define E3_K_VAL 50          // 0 - 255, Higher values, are higher power. Be carefull not to go too high    
594
+	#define E3_OVERCURRENT 2000  //maxc current in mA. If the current goes over this value, the driver will switch off
595
+	#define E3_STALLCURRENT 1500 //current in mA where the driver will detect a stall
596
+	
597
+#endif
598
+
599
+
465 600
 //===========================================================================
466 601
 //=============================  Define Defines  ============================
467 602
 //===========================================================================

+ 20
- 20
Marlin/Marlin.h View File

@@ -112,11 +112,11 @@ void manage_inactivity(bool ignore_stepper_queue=false);
112 112
 
113 113
 #if defined(DUAL_X_CARRIAGE) && defined(X_ENABLE_PIN) && X_ENABLE_PIN > -1 \
114 114
     && defined(X2_ENABLE_PIN) && X2_ENABLE_PIN > -1
115
-  #define  enable_x() do { WRITE(X_ENABLE_PIN, X_ENABLE_ON); WRITE(X2_ENABLE_PIN, X_ENABLE_ON); } while (0)
116
-  #define disable_x() do { WRITE(X_ENABLE_PIN,!X_ENABLE_ON); WRITE(X2_ENABLE_PIN,!X_ENABLE_ON); axis_known_position[X_AXIS] = false; } while (0)
115
+  #define  enable_x() do { X_ENABLE_WRITE( X_ENABLE_ON); X2_ENABLE_WRITE( X_ENABLE_ON); } while (0)
116
+  #define disable_x() do { X_ENABLE_WRITE(!X_ENABLE_ON); X2_ENABLE_WRITE(!X_ENABLE_ON); axis_known_position[X_AXIS] = false; } while (0)
117 117
 #elif defined(X_ENABLE_PIN) && X_ENABLE_PIN > -1
118
-  #define  enable_x() WRITE(X_ENABLE_PIN, X_ENABLE_ON)
119
-  #define disable_x() { WRITE(X_ENABLE_PIN,!X_ENABLE_ON); axis_known_position[X_AXIS] = false; }
118
+  #define  enable_x() X_ENABLE_WRITE( X_ENABLE_ON)
119
+  #define disable_x() { X_ENABLE_WRITE(!X_ENABLE_ON); axis_known_position[X_AXIS] = false; }
120 120
 #else
121 121
   #define enable_x() ;
122 122
   #define disable_x() ;
@@ -124,11 +124,11 @@ void manage_inactivity(bool ignore_stepper_queue=false);
124 124
 
125 125
 #if defined(Y_ENABLE_PIN) && Y_ENABLE_PIN > -1
126 126
   #ifdef Y_DUAL_STEPPER_DRIVERS
127
-    #define  enable_y() { WRITE(Y_ENABLE_PIN, Y_ENABLE_ON); WRITE(Y2_ENABLE_PIN,  Y_ENABLE_ON); }
128
-    #define disable_y() { WRITE(Y_ENABLE_PIN,!Y_ENABLE_ON); WRITE(Y2_ENABLE_PIN, !Y_ENABLE_ON); axis_known_position[Y_AXIS] = false; }
127
+    #define  enable_y() { Y_ENABLE_WRITE( Y_ENABLE_ON); Y2_ENABLE_WRITE(Y_ENABLE_ON); }
128
+    #define disable_y() { Y_ENABLE_WRITE(!Y_ENABLE_ON); Y2_ENABLE_WRITE(!Y_ENABLE_ON); axis_known_position[Y_AXIS] = false; }
129 129
   #else
130
-    #define  enable_y() WRITE(Y_ENABLE_PIN, Y_ENABLE_ON)
131
-    #define disable_y() { WRITE(Y_ENABLE_PIN,!Y_ENABLE_ON); axis_known_position[Y_AXIS] = false; }
130
+    #define  enable_y() Y_ENABLE_WRITE( Y_ENABLE_ON)
131
+    #define disable_y() { Y_ENABLE_WRITE(!Y_ENABLE_ON); axis_known_position[Y_AXIS] = false; }
132 132
   #endif
133 133
 #else
134 134
   #define enable_y() ;
@@ -137,11 +137,11 @@ void manage_inactivity(bool ignore_stepper_queue=false);
137 137
 
138 138
 #if defined(Z_ENABLE_PIN) && Z_ENABLE_PIN > -1
139 139
   #ifdef Z_DUAL_STEPPER_DRIVERS
140
-    #define  enable_z() { WRITE(Z_ENABLE_PIN, Z_ENABLE_ON); WRITE(Z2_ENABLE_PIN, Z_ENABLE_ON); }
141
-    #define disable_z() { WRITE(Z_ENABLE_PIN,!Z_ENABLE_ON); WRITE(Z2_ENABLE_PIN,!Z_ENABLE_ON); axis_known_position[Z_AXIS] = false; }
140
+    #define  enable_z() { Z_ENABLE_WRITE( Z_ENABLE_ON); Z2_ENABLE_WRITE(Z_ENABLE_ON); }
141
+    #define disable_z() { Z_ENABLE_WRITE(!Z_ENABLE_ON); Z2_ENABLE_WRITE(!Z_ENABLE_ON); axis_known_position[Z_AXIS] = false; }
142 142
   #else
143
-    #define  enable_z() WRITE(Z_ENABLE_PIN, Z_ENABLE_ON)
144
-    #define disable_z() { WRITE(Z_ENABLE_PIN,!Z_ENABLE_ON); axis_known_position[Z_AXIS] = false; }
143
+    #define  enable_z() Z_ENABLE_WRITE( Z_ENABLE_ON)
144
+    #define disable_z() { Z_ENABLE_WRITE(!Z_ENABLE_ON); axis_known_position[Z_AXIS] = false; }
145 145
   #endif
146 146
 #else
147 147
   #define enable_z() ;
@@ -149,32 +149,32 @@ void manage_inactivity(bool ignore_stepper_queue=false);
149 149
 #endif
150 150
 
151 151
 #if defined(E0_ENABLE_PIN) && (E0_ENABLE_PIN > -1)
152
-  #define enable_e0() WRITE(E0_ENABLE_PIN, E_ENABLE_ON)
153
-  #define disable_e0() WRITE(E0_ENABLE_PIN,!E_ENABLE_ON)
152
+  #define enable_e0() E0_ENABLE_WRITE(E_ENABLE_ON)
153
+  #define disable_e0() E0_ENABLE_WRITE(!E_ENABLE_ON)
154 154
 #else
155 155
   #define enable_e0()  /* nothing */
156 156
   #define disable_e0() /* nothing */
157 157
 #endif
158 158
 
159 159
 #if (EXTRUDERS > 1) && defined(E1_ENABLE_PIN) && (E1_ENABLE_PIN > -1)
160
-  #define enable_e1() WRITE(E1_ENABLE_PIN, E_ENABLE_ON)
161
-  #define disable_e1() WRITE(E1_ENABLE_PIN,!E_ENABLE_ON)
160
+  #define enable_e1() E1_ENABLE_WRITE(E_ENABLE_ON)
161
+  #define disable_e1() E1_ENABLE_WRITE(!E_ENABLE_ON)
162 162
 #else
163 163
   #define enable_e1()  /* nothing */
164 164
   #define disable_e1() /* nothing */
165 165
 #endif
166 166
 
167 167
 #if (EXTRUDERS > 2) && defined(E2_ENABLE_PIN) && (E2_ENABLE_PIN > -1)
168
-  #define enable_e2() WRITE(E2_ENABLE_PIN, E_ENABLE_ON)
169
-  #define disable_e2() WRITE(E2_ENABLE_PIN,!E_ENABLE_ON)
168
+  #define enable_e2() E2_ENABLE_WRITE(E_ENABLE_ON)
169
+  #define disable_e2() E2_ENABLE_WRITE(!E_ENABLE_ON)
170 170
 #else
171 171
   #define enable_e2()  /* nothing */
172 172
   #define disable_e2() /* nothing */
173 173
 #endif
174 174
 
175 175
 #if (EXTRUDERS > 3) && defined(E3_ENABLE_PIN) && (E3_ENABLE_PIN > -1)
176
-  #define enable_e3() WRITE(E3_ENABLE_PIN, E_ENABLE_ON)
177
-  #define disable_e3() WRITE(E3_ENABLE_PIN,!E_ENABLE_ON)
176
+  #define enable_e3() E3_ENABLE_WRITE(E_ENABLE_ON)
177
+  #define disable_e3() E3_ENABLE_WRITE(!E_ENABLE_ON)
178 178
 #else
179 179
   #define enable_e3()  /* nothing */
180 180
   #define disable_e3() /* nothing */

+ 10
- 0
Marlin/Marlin.ino View File

@@ -54,3 +54,13 @@
54 54
 #if defined(DIGIPOT_I2C)
55 55
   #include <Wire.h>
56 56
 #endif
57
+
58
+#ifdef HAVE_TMCDRIVER
59
+  #include <SPI.h>
60
+  #include <TMC26XStepper.h>
61
+#endif
62
+
63
+#ifdef HAVE_L6470DRIVER
64
+  #include <SPI.h>
65
+  #include <L6470.h>
66
+#endif

+ 7
- 7
Marlin/Marlin_main.cpp View File

@@ -5120,17 +5120,17 @@ void controllerFan()
5120 5120
   {
5121 5121
     lastMotorCheck = millis();
5122 5122
 	
5123
-    if((READ(X_ENABLE_PIN) == (X_ENABLE_ON)) || (READ(Y_ENABLE_PIN) == (Y_ENABLE_ON)) || (READ(Z_ENABLE_PIN) == (Z_ENABLE_ON)) || (soft_pwm_bed > 0)
5123
+    if((X_ENABLE_READ) == (X_ENABLE_ON)) || (Y_ENABLE_READ) == (Y_ENABLE_ON)) || (Z_ENABLE_READ) == (Z_ENABLE_ON)) || (soft_pwm_bed > 0)
5124 5124
     #if EXTRUDERS > 2
5125
-       || (READ(E2_ENABLE_PIN) == (E_ENABLE_ON))
5125
+       || (E2_ENABLE_READ) == (E_ENABLE_ON))
5126 5126
     #endif
5127 5127
     #if EXTRUDER > 1
5128 5128
       #if defined(X2_ENABLE_PIN) && X2_ENABLE_PIN > -1
5129
-       || (READ(X2_ENABLE_PIN) == (X_ENABLE_ON))
5129
+       || (X2_ENABLE_READ) == (X_ENABLE_ON))
5130 5130
       #endif
5131
-       || (READ(E1_ENABLE_PIN) == (E_ENABLE_ON))
5131
+       || (E1_ENABLE_READ) == (E_ENABLE_ON))
5132 5132
     #endif
5133
-       || (READ(E0_ENABLE_PIN) == (E_ENABLE_ON))) //If any of the drivers are enabled...
5133
+       || (E0_ENABLE_READ) == (E_ENABLE_ON))) //If any of the drivers are enabled...
5134 5134
     {
5135 5135
       lastMotor = millis(); //... set time to NOW so the fan will turn on
5136 5136
     }
@@ -5355,7 +5355,7 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) //default argument s
5355 5355
     if( (millis() - previous_millis_cmd) >  EXTRUDER_RUNOUT_SECONDS*1000 )
5356 5356
     if(degHotend(active_extruder)>EXTRUDER_RUNOUT_MINTEMP)
5357 5357
     {
5358
-     bool oldstatus=READ(E0_ENABLE_PIN);
5358
+     bool oldstatus=E0_ENABLE_READ;
5359 5359
      enable_e0();
5360 5360
      float oldepos=current_position[E_AXIS];
5361 5361
      float oldedes=destination[E_AXIS];
@@ -5367,7 +5367,7 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) //default argument s
5367 5367
      plan_set_e_position(oldepos);
5368 5368
      previous_millis_cmd=millis();
5369 5369
      st_synchronize();
5370
-     WRITE(E0_ENABLE_PIN,oldstatus);
5370
+     E0_ENABLE_WRITE(oldstatus);
5371 5371
     }
5372 5372
   #endif
5373 5373
   #if defined(DUAL_X_CARRIAGE)

+ 165
- 146
Marlin/stepper.cpp View File

@@ -33,7 +33,6 @@
33 33
 #include <SPI.h>
34 34
 #endif
35 35
 
36
-
37 36
 //===========================================================================
38 37
 //=============================public variables  ============================
39 38
 //===========================================================================
@@ -88,6 +87,7 @@ static bool check_endstops = true;
88 87
 volatile long count_position[NUM_AXIS] = { 0, 0, 0, 0};
89 88
 volatile signed char count_direction[NUM_AXIS] = { 1, 1, 1, 1};
90 89
 
90
+
91 91
 //===========================================================================
92 92
 //=============================functions         ============================
93 93
 //===========================================================================
@@ -349,51 +349,51 @@ ISR(TIMER1_COMPA_vect)
349 349
     if((out_bits & (1<<X_AXIS))!=0){
350 350
       #ifdef DUAL_X_CARRIAGE
351 351
         if (extruder_duplication_enabled){
352
-          WRITE(X_DIR_PIN, INVERT_X_DIR);
353
-          WRITE(X2_DIR_PIN, INVERT_X_DIR);
352
+          X_DIR_WRITE(INVERT_X_DIR);
353
+          X2_DIR_WRITE(INVERT_X_DIR);
354 354
         }
355 355
         else{
356 356
           if (current_block->active_extruder != 0)
357
-            WRITE(X2_DIR_PIN, INVERT_X_DIR);
357
+            X2_DIR_WRITE(INVERT_X_DIR);
358 358
           else
359
-            WRITE(X_DIR_PIN, INVERT_X_DIR);
359
+            X_DIR_WRITE(INVERT_X_DIR);
360 360
         }
361 361
       #else
362
-        WRITE(X_DIR_PIN, INVERT_X_DIR);
362
+        X_DIR_WRITE(INVERT_X_DIR);
363 363
       #endif        
364 364
       count_direction[X_AXIS]=-1;
365 365
     }
366 366
     else{
367 367
       #ifdef DUAL_X_CARRIAGE
368 368
         if (extruder_duplication_enabled){
369
-          WRITE(X_DIR_PIN, !INVERT_X_DIR);
370
-          WRITE(X2_DIR_PIN, !INVERT_X_DIR);
369
+          X_DIR_WRITE(!INVERT_X_DIR);
370
+          X2_DIR_WRITE( !INVERT_X_DIR);
371 371
         }
372 372
         else{
373 373
           if (current_block->active_extruder != 0)
374
-            WRITE(X2_DIR_PIN, !INVERT_X_DIR);
374
+            X2_DIR_WRITE(!INVERT_X_DIR);
375 375
           else
376
-            WRITE(X_DIR_PIN, !INVERT_X_DIR);
376
+            X_DIR_WRITE(!INVERT_X_DIR);
377 377
         }
378 378
       #else
379
-        WRITE(X_DIR_PIN, !INVERT_X_DIR);
379
+        X_DIR_WRITE(!INVERT_X_DIR);
380 380
       #endif        
381 381
       count_direction[X_AXIS]=1;
382 382
     }
383 383
     if((out_bits & (1<<Y_AXIS))!=0){
384
-      WRITE(Y_DIR_PIN, INVERT_Y_DIR);
384
+      Y_DIR_WRITE(INVERT_Y_DIR);
385 385
 	  
386 386
 	  #ifdef Y_DUAL_STEPPER_DRIVERS
387
-	    WRITE(Y2_DIR_PIN, !(INVERT_Y_DIR == INVERT_Y2_VS_Y_DIR));
387
+	    Y2_DIR_WRITE(!(INVERT_Y_DIR == INVERT_Y2_VS_Y_DIR));
388 388
 	  #endif
389 389
 	  
390 390
       count_direction[Y_AXIS]=-1;
391 391
     }
392 392
     else{
393
-      WRITE(Y_DIR_PIN, !INVERT_Y_DIR);
393
+      Y_DIR_WRITE(!INVERT_Y_DIR);
394 394
 	  
395 395
 	  #ifdef Y_DUAL_STEPPER_DRIVERS
396
-	    WRITE(Y2_DIR_PIN, (INVERT_Y_DIR == INVERT_Y2_VS_Y_DIR));
396
+	    Y2_DIR_WRITE((INVERT_Y_DIR == INVERT_Y2_VS_Y_DIR));
397 397
 	  #endif
398 398
 	  
399 399
       count_direction[Y_AXIS]=1;
@@ -480,10 +480,10 @@ ISR(TIMER1_COMPA_vect)
480 480
     }
481 481
 
482 482
     if ((out_bits & (1<<Z_AXIS)) != 0) {   // -direction
483
-      WRITE(Z_DIR_PIN,INVERT_Z_DIR);
483
+      Z_DIR_WRITE(INVERT_Z_DIR);
484 484
       
485 485
       #ifdef Z_DUAL_STEPPER_DRIVERS
486
-        WRITE(Z2_DIR_PIN,INVERT_Z_DIR);
486
+        Z2_DIR_WRITE(INVERT_Z_DIR);
487 487
       #endif
488 488
 
489 489
       count_direction[Z_AXIS]=-1;
@@ -501,10 +501,10 @@ ISR(TIMER1_COMPA_vect)
501 501
       }
502 502
     }
503 503
     else { // +direction
504
-      WRITE(Z_DIR_PIN,!INVERT_Z_DIR);
504
+      Z_DIR_WRITE(!INVERT_Z_DIR);
505 505
 
506 506
       #ifdef Z_DUAL_STEPPER_DRIVERS
507
-        WRITE(Z2_DIR_PIN,!INVERT_Z_DIR);
507
+        Z2_DIR_WRITE(!INVERT_Z_DIR);
508 508
       #endif
509 509
 
510 510
       count_direction[Z_AXIS]=1;
@@ -561,13 +561,13 @@ ISR(TIMER1_COMPA_vect)
561 561
      * instead of doing each in turn. The extra tests add enough
562 562
      * lag to allow it work with without needing NOPs
563 563
      */
564
-      if (counter_x > 0) WRITE(X_STEP_PIN, HIGH);
564
+      if (counter_x > 0) X_STEP_WRITE(HIGH);
565 565
 
566 566
       counter_y += current_block->steps_y;
567
-      if (counter_y > 0) WRITE(Y_STEP_PIN, HIGH);
567
+      if (counter_y > 0) Y_STEP_WRITE(HIGH);
568 568
 
569 569
       counter_z += current_block->steps_z;
570
-      if (counter_z > 0) WRITE(Z_STEP_PIN, HIGH);
570
+      if (counter_z > 0) Z_STEP_WRITE(HIGH);
571 571
 
572 572
       #ifndef ADVANCE
573 573
         counter_e += current_block->steps_e;
@@ -577,19 +577,19 @@ ISR(TIMER1_COMPA_vect)
577 577
       if (counter_x > 0) {
578 578
         counter_x -= current_block->step_event_count;
579 579
         count_position[X_AXIS] += count_direction[X_AXIS];   
580
-        WRITE(X_STEP_PIN, LOW);
580
+        X_STEP_WRITE(LOW);
581 581
       }
582 582
 
583 583
       if (counter_y > 0) {
584 584
         counter_y -= current_block->step_event_count;
585 585
         count_position[Y_AXIS] += count_direction[Y_AXIS];
586
-        WRITE(Y_STEP_PIN, LOW);
586
+        Y_STEP_WRITE( LOW);
587 587
       }
588 588
 
589 589
       if (counter_z > 0) {
590 590
         counter_z -= current_block->step_event_count;
591 591
         count_position[Z_AXIS] += count_direction[Z_AXIS];
592
-        WRITE(Z_STEP_PIN, LOW);
592
+        Z_STEP_WRITE(LOW);
593 593
       }
594 594
 
595 595
       #ifndef ADVANCE
@@ -603,66 +603,66 @@ ISR(TIMER1_COMPA_vect)
603 603
         if (counter_x > 0) {
604 604
         #ifdef DUAL_X_CARRIAGE
605 605
           if (extruder_duplication_enabled){
606
-            WRITE(X_STEP_PIN, !INVERT_X_STEP_PIN);
607
-            WRITE(X2_STEP_PIN, !INVERT_X_STEP_PIN);
606
+            X_STEP_WRITE(!INVERT_X_STEP_PIN);
607
+            X2_STEP_WRITE( !INVERT_X_STEP_PIN);
608 608
           }
609 609
           else {
610 610
             if (current_block->active_extruder != 0)
611
-              WRITE(X2_STEP_PIN, !INVERT_X_STEP_PIN);
611
+              X2_STEP_WRITE( !INVERT_X_STEP_PIN);
612 612
             else
613
-              WRITE(X_STEP_PIN, !INVERT_X_STEP_PIN);
613
+              X_STEP_WRITE(!INVERT_X_STEP_PIN);
614 614
           }
615 615
         #else
616
-          WRITE(X_STEP_PIN, !INVERT_X_STEP_PIN);
616
+          X_STEP_WRITE(!INVERT_X_STEP_PIN);
617 617
         #endif        
618 618
           counter_x -= current_block->step_event_count;
619 619
           count_position[X_AXIS] += count_direction[X_AXIS];   
620 620
         #ifdef DUAL_X_CARRIAGE
621 621
           if (extruder_duplication_enabled){
622
-            WRITE(X_STEP_PIN, INVERT_X_STEP_PIN);
623
-            WRITE(X2_STEP_PIN, INVERT_X_STEP_PIN);
622
+            X_STEP_WRITE(INVERT_X_STEP_PIN);
623
+            X2_STEP_WRITE(INVERT_X_STEP_PIN);
624 624
           }
625 625
           else {
626 626
             if (current_block->active_extruder != 0)
627
-              WRITE(X2_STEP_PIN, INVERT_X_STEP_PIN);
627
+              X2_STEP_WRITE(INVERT_X_STEP_PIN);
628 628
             else
629
-              WRITE(X_STEP_PIN, INVERT_X_STEP_PIN);
629
+              X_STEP_WRITE(INVERT_X_STEP_PIN);
630 630
           }
631 631
         #else
632
-          WRITE(X_STEP_PIN, INVERT_X_STEP_PIN);
632
+          X_STEP_WRITE(INVERT_X_STEP_PIN);
633 633
         #endif
634 634
         }
635 635
 
636 636
         counter_y += current_block->steps_y;
637 637
         if (counter_y > 0) {
638
-          WRITE(Y_STEP_PIN, !INVERT_Y_STEP_PIN);
638
+          Y_STEP_WRITE(!INVERT_Y_STEP_PIN);
639 639
 		  
640 640
 		  #ifdef Y_DUAL_STEPPER_DRIVERS
641
-			WRITE(Y2_STEP_PIN, !INVERT_Y_STEP_PIN);
641
+			Y2_STEP_WRITE( !INVERT_Y_STEP_PIN);
642 642
 		  #endif
643 643
 		  
644 644
           counter_y -= current_block->step_event_count;
645 645
           count_position[Y_AXIS] += count_direction[Y_AXIS];
646
-          WRITE(Y_STEP_PIN, INVERT_Y_STEP_PIN);
646
+          Y_STEP_WRITE(INVERT_Y_STEP_PIN);
647 647
 		  
648 648
 		  #ifdef Y_DUAL_STEPPER_DRIVERS
649
-			WRITE(Y2_STEP_PIN, INVERT_Y_STEP_PIN);
649
+			Y2_STEP_WRITE( INVERT_Y_STEP_PIN);
650 650
 		  #endif
651 651
         }
652 652
 
653 653
       counter_z += current_block->steps_z;
654 654
       if (counter_z > 0) {
655
-        WRITE(Z_STEP_PIN, !INVERT_Z_STEP_PIN);
655
+        Z_STEP_WRITE( !INVERT_Z_STEP_PIN);
656 656
         #ifdef Z_DUAL_STEPPER_DRIVERS
657
-          WRITE(Z2_STEP_PIN, !INVERT_Z_STEP_PIN);
657
+          Z2_STEP_WRITE(!INVERT_Z_STEP_PIN);
658 658
         #endif
659 659
 
660 660
         counter_z -= current_block->step_event_count;
661 661
         count_position[Z_AXIS] += count_direction[Z_AXIS];
662
-        WRITE(Z_STEP_PIN, INVERT_Z_STEP_PIN);
662
+        Z_STEP_WRITE( INVERT_Z_STEP_PIN);
663 663
 
664 664
         #ifdef Z_DUAL_STEPPER_DRIVERS
665
-          WRITE(Z2_STEP_PIN, INVERT_Z_STEP_PIN);
665
+          Z2_STEP_WRITE(INVERT_Z_STEP_PIN);
666 666
         #endif
667 667
       }
668 668
 
@@ -759,60 +759,60 @@ ISR(TIMER1_COMPA_vect)
759 759
     // Set E direction (Depends on E direction + advance)
760 760
     for(unsigned char i=0; i<4;i++) {
761 761
       if (e_steps[0] != 0) {
762
-        WRITE(E0_STEP_PIN, INVERT_E_STEP_PIN);
762
+        E0_STEP_WRITE( INVERT_E_STEP_PIN);
763 763
         if (e_steps[0] < 0) {
764
-          WRITE(E0_DIR_PIN, INVERT_E0_DIR);
764
+          E0_DIR_WRITE(INVERT_E0_DIR);
765 765
           e_steps[0]++;
766
-          WRITE(E0_STEP_PIN, !INVERT_E_STEP_PIN);
766
+          E0_STEP_WRITE(!INVERT_E_STEP_PIN);
767 767
         }
768 768
         else if (e_steps[0] > 0) {
769
-          WRITE(E0_DIR_PIN, !INVERT_E0_DIR);
769
+          E0_DIR_WRITE(!INVERT_E0_DIR);
770 770
           e_steps[0]--;
771
-          WRITE(E0_STEP_PIN, !INVERT_E_STEP_PIN);
771
+          E0_STEP_WRITE(!INVERT_E_STEP_PIN);
772 772
         }
773 773
       }
774 774
  #if EXTRUDERS > 1
775 775
       if (e_steps[1] != 0) {
776
-        WRITE(E1_STEP_PIN, INVERT_E_STEP_PIN);
776
+        E1_STEP_WRITE(INVERT_E_STEP_PIN);
777 777
         if (e_steps[1] < 0) {
778
-          WRITE(E1_DIR_PIN, INVERT_E1_DIR);
778
+          E1_DIR_WRITE(INVERT_E1_DIR);
779 779
           e_steps[1]++;
780
-          WRITE(E1_STEP_PIN, !INVERT_E_STEP_PIN);
780
+          E1_STEP_WRITE(!INVERT_E_STEP_PIN);
781 781
         }
782 782
         else if (e_steps[1] > 0) {
783
-          WRITE(E1_DIR_PIN, !INVERT_E1_DIR);
783
+          E1_DIR_WRITE(!INVERT_E1_DIR);
784 784
           e_steps[1]--;
785
-          WRITE(E1_STEP_PIN, !INVERT_E_STEP_PIN);
785
+          E1_STEP_WRITE(!INVERT_E_STEP_PIN);
786 786
         }
787 787
       }
788 788
  #endif
789 789
  #if EXTRUDERS > 2
790 790
       if (e_steps[2] != 0) {
791
-        WRITE(E2_STEP_PIN, INVERT_E_STEP_PIN);
791
+        E2_STEP_WRITE(INVERT_E_STEP_PIN);
792 792
         if (e_steps[2] < 0) {
793
-          WRITE(E2_DIR_PIN, INVERT_E2_DIR);
793
+          E2_DIR_WRITE(INVERT_E2_DIR);
794 794
           e_steps[2]++;
795
-          WRITE(E2_STEP_PIN, !INVERT_E_STEP_PIN);
795
+          E2_STEP_WRITE(!INVERT_E_STEP_PIN);
796 796
         }
797 797
         else if (e_steps[2] > 0) {
798
-          WRITE(E2_DIR_PIN, !INVERT_E2_DIR);
798
+          E2_DIR_WRITE(!INVERT_E2_DIR);
799 799
           e_steps[2]--;
800
-          WRITE(E2_STEP_PIN, !INVERT_E_STEP_PIN);
800
+          E2_STEP_WRITE(!INVERT_E_STEP_PIN);
801 801
         }
802 802
       }
803 803
  #endif
804 804
  #if EXTRUDERS > 3
805 805
       if (e_steps[3] != 0) {
806
-        WRITE(E3_STEP_PIN, INVERT_E_STEP_PIN);
806
+        E3_STEP_WRITE(INVERT_E_STEP_PIN);
807 807
         if (e_steps[3] < 0) {
808
-          WRITE(E3_DIR_PIN, INVERT_E3_DIR);
808
+          E3_DIR_WRITE(INVERT_E3_DIR);
809 809
           e_steps[3]++;
810
-          WRITE(E3_STEP_PIN, !INVERT_E_STEP_PIN);
810
+          E3_STEP_WRITE(!INVERT_E_STEP_PIN);
811 811
         }
812 812
         else if (e_steps[3] > 0) {
813
-          WRITE(E3_DIR_PIN, !INVERT_E3_DIR);
813
+          E3_DIR_WRITE(!INVERT_E3_DIR);
814 814
           e_steps[3]--;
815
-          WRITE(E3_STEP_PIN, !INVERT_E_STEP_PIN);
815
+          E3_STEP_WRITE(!INVERT_E_STEP_PIN);
816 816
         }
817 817
       }
818 818
  #endif
@@ -826,83 +826,93 @@ void st_init()
826 826
   digipot_init(); //Initialize Digipot Motor Current
827 827
   microstep_init(); //Initialize Microstepping Pins
828 828
 
829
+  // initialise TMC Steppers
830
+  #ifdef HAVE_TMCDRIVER
831
+     tmc_init();
832
+  #endif
833
+    // initialise L6470 Steppers
834
+  #ifdef HAVE_L6470DRIVER
835
+     L6470_init();
836
+  #endif
837
+  
838
+  
829 839
   //Initialize Dir Pins
830 840
   #if defined(X_DIR_PIN) && X_DIR_PIN > -1
831
-    SET_OUTPUT(X_DIR_PIN);
841
+    X_DIR_INIT;
832 842
   #endif
833 843
   #if defined(X2_DIR_PIN) && X2_DIR_PIN > -1
834
-    SET_OUTPUT(X2_DIR_PIN);
844
+    X2_DIR_INIT;
835 845
   #endif
836 846
   #if defined(Y_DIR_PIN) && Y_DIR_PIN > -1
837
-    SET_OUTPUT(Y_DIR_PIN);
847
+    Y_DIR_INIT;
838 848
 		
839 849
 	#if defined(Y_DUAL_STEPPER_DRIVERS) && defined(Y2_DIR_PIN) && (Y2_DIR_PIN > -1)
840
-	  SET_OUTPUT(Y2_DIR_PIN);
850
+	  Y2_DIR_INIT;
841 851
 	#endif
842 852
   #endif
843 853
   #if defined(Z_DIR_PIN) && Z_DIR_PIN > -1
844
-    SET_OUTPUT(Z_DIR_PIN);
854
+    Z_DIR_INIT;
845 855
 
846 856
     #if defined(Z_DUAL_STEPPER_DRIVERS) && defined(Z2_DIR_PIN) && (Z2_DIR_PIN > -1)
847
-      SET_OUTPUT(Z2_DIR_PIN);
857
+      Z2_DIR_INIT;
848 858
     #endif
849 859
   #endif
850 860
   #if defined(E0_DIR_PIN) && E0_DIR_PIN > -1
851
-    SET_OUTPUT(E0_DIR_PIN);
861
+    E0_DIR_INIT;
852 862
   #endif
853 863
   #if defined(E1_DIR_PIN) && (E1_DIR_PIN > -1)
854
-    SET_OUTPUT(E1_DIR_PIN);
864
+    E1_DIR_INIT;
855 865
   #endif
856 866
   #if defined(E2_DIR_PIN) && (E2_DIR_PIN > -1)
857
-    SET_OUTPUT(E2_DIR_PIN);
867
+    E2_DIR_INIT;
858 868
   #endif
859 869
   #if defined(E3_DIR_PIN) && (E3_DIR_PIN > -1)
860
-    SET_OUTPUT(E3_DIR_PIN);
870
+    E3_DIR_INIT;
861 871
   #endif
862 872
 
863 873
   //Initialize Enable Pins - steppers default to disabled.
864 874
 
865 875
   #if defined(X_ENABLE_PIN) && X_ENABLE_PIN > -1
866
-    SET_OUTPUT(X_ENABLE_PIN);
867
-    if(!X_ENABLE_ON) WRITE(X_ENABLE_PIN,HIGH);
876
+    X_ENABLE_INIT;
877
+    if(!X_ENABLE_ON) X_ENABLE_WRITE(HIGH);
868 878
   #endif
869 879
   #if defined(X2_ENABLE_PIN) && X2_ENABLE_PIN > -1
870
-    SET_OUTPUT(X2_ENABLE_PIN);
871
-    if(!X_ENABLE_ON) WRITE(X2_ENABLE_PIN,HIGH);
880
+    X2_ENABLE_INIT;
881
+    if(!X_ENABLE_ON) X2_ENABLE_WRITE(HIGH);
872 882
   #endif
873 883
   #if defined(Y_ENABLE_PIN) && Y_ENABLE_PIN > -1
874
-    SET_OUTPUT(Y_ENABLE_PIN);
875
-    if(!Y_ENABLE_ON) WRITE(Y_ENABLE_PIN,HIGH);
884
+    Y_ENABLE_INIT;
885
+    if(!Y_ENABLE_ON) Y_ENABLE_WRITE(HIGH);
876 886
 	
877 887
 	#if defined(Y_DUAL_STEPPER_DRIVERS) && defined(Y2_ENABLE_PIN) && (Y2_ENABLE_PIN > -1)
878
-	  SET_OUTPUT(Y2_ENABLE_PIN);
879
-	  if(!Y_ENABLE_ON) WRITE(Y2_ENABLE_PIN,HIGH);
888
+	  Y2_ENABLE_INIT;
889
+	  if(!Y_ENABLE_ON) Y2_ENABLE_WRITE(HIGH);
880 890
 	#endif
881 891
   #endif
882 892
   #if defined(Z_ENABLE_PIN) && Z_ENABLE_PIN > -1
883
-    SET_OUTPUT(Z_ENABLE_PIN);
884
-    if(!Z_ENABLE_ON) WRITE(Z_ENABLE_PIN,HIGH);
893
+    Z_ENABLE_INIT;
894
+    if(!Z_ENABLE_ON) Z_ENABLE_WRITE(HIGH);
885 895
 
886 896
     #if defined(Z_DUAL_STEPPER_DRIVERS) && defined(Z2_ENABLE_PIN) && (Z2_ENABLE_PIN > -1)
887
-      SET_OUTPUT(Z2_ENABLE_PIN);
888
-      if(!Z_ENABLE_ON) WRITE(Z2_ENABLE_PIN,HIGH);
897
+      Z2_ENABLE_INIT;
898
+      if(!Z_ENABLE_ON) Z2_ENABLE_WRITE(HIGH);
889 899
     #endif
890 900
   #endif
891 901
   #if defined(E0_ENABLE_PIN) && (E0_ENABLE_PIN > -1)
892
-    SET_OUTPUT(E0_ENABLE_PIN);
893
-    if(!E_ENABLE_ON) WRITE(E0_ENABLE_PIN,HIGH);
902
+    E0_ENABLE_INIT;
903
+    if(!E_ENABLE_ON) E0_ENABLE_WRITE(HIGH);
894 904
   #endif
895 905
   #if defined(E1_ENABLE_PIN) && (E1_ENABLE_PIN > -1)
896
-    SET_OUTPUT(E1_ENABLE_PIN);
897
-    if(!E_ENABLE_ON) WRITE(E1_ENABLE_PIN,HIGH);
906
+    E1_ENABLE_INIT;
907
+    if(!E_ENABLE_ON) E1_ENABLE_WRITE(HIGH);
898 908
   #endif
899 909
   #if defined(E2_ENABLE_PIN) && (E2_ENABLE_PIN > -1)
900
-    SET_OUTPUT(E2_ENABLE_PIN);
901
-    if(!E_ENABLE_ON) WRITE(E2_ENABLE_PIN,HIGH);
910
+    E2_ENABLE_INIT;
911
+    if(!E_ENABLE_ON) E2_ENABLE_WRITE(HIGH);
902 912
   #endif
903 913
   #if defined(E3_ENABLE_PIN) && (E3_ENABLE_PIN > -1)
904
-    SET_OUTPUT(E3_ENABLE_PIN);
905
-    if(!E_ENABLE_ON) WRITE(E3_ENABLE_PIN,HIGH);
914
+    E3_ENABLE_INIT;
915
+    if(!E_ENABLE_ON) E3_ENABLE_WRITE(HIGH);
906 916
   #endif
907 917
 
908 918
   //endstops and pullups
@@ -952,41 +962,51 @@ void st_init()
952 962
 
953 963
   //Initialize Step Pins
954 964
   #if defined(X_STEP_PIN) && (X_STEP_PIN > -1)
955
-    OUT_WRITE(X_STEP_PIN,INVERT_X_STEP_PIN);
965
+    X_STEP_INIT;
966
+    X_STEP_WRITE(INVERT_X_STEP_PIN);
956 967
     disable_x();
957 968
   #endif
958 969
   #if defined(X2_STEP_PIN) && (X2_STEP_PIN > -1)
959
-    OUT_WRITE(X2_STEP_PIN,INVERT_X_STEP_PIN);
970
+    X2_STEP_INIT;
971
+    X2_STEP_WRITE(INVERT_X_STEP_PIN);
960 972
     disable_x();
961 973
   #endif
962 974
   #if defined(Y_STEP_PIN) && (Y_STEP_PIN > -1)
963
-    OUT_WRITE(Y_STEP_PIN,INVERT_Y_STEP_PIN);
975
+    Y_STEP_INIT;
976
+    Y_STEP_WRITE(INVERT_Y_STEP_PIN);
964 977
     #if defined(Y_DUAL_STEPPER_DRIVERS) && defined(Y2_STEP_PIN) && (Y2_STEP_PIN > -1)
965
-      OUT_WRITE(Y2_STEP_PIN,INVERT_Y_STEP_PIN);
978
+      Y2_STEP_INIT;
979
+      Y2_STEP_WRITE(INVERT_Y_STEP_PIN);
966 980
     #endif
967 981
     disable_y();
968 982
   #endif
969 983
   #if defined(Z_STEP_PIN) && (Z_STEP_PIN > -1)
970
-    OUT_WRITE(Z_STEP_PIN,INVERT_Z_STEP_PIN);
984
+    Z_STEP_INIT;
985
+    Z_STEP_WRITE(INVERT_Z_STEP_PIN);
971 986
     #if defined(Z_DUAL_STEPPER_DRIVERS) && defined(Z2_STEP_PIN) && (Z2_STEP_PIN > -1)
972
-      OUT_WRITE(Z2_STEP_PIN,INVERT_Z_STEP_PIN);
987
+      Z2_STEP_INIT;
988
+      Z2_STEP_WRITE(INVERT_Z_STEP_PIN);
973 989
     #endif
974 990
     disable_z();
975 991
   #endif
976 992
   #if defined(E0_STEP_PIN) && (E0_STEP_PIN > -1)
977
-    OUT_WRITE(E0_STEP_PIN,INVERT_E_STEP_PIN);
993
+    E0_STEP_INIT;
994
+    E0_STEP_WRITE(INVERT_E_STEP_PIN);
978 995
     disable_e0();
979 996
   #endif
980 997
   #if defined(E1_STEP_PIN) && (E1_STEP_PIN > -1)
981
-    OUT_WRITE(E1_STEP_PIN,INVERT_E_STEP_PIN);
998
+    E1_STEP_INIT;
999
+    E1_STEP_WRITE(INVERT_E_STEP_PIN);
982 1000
     disable_e1();
983 1001
   #endif
984 1002
   #if defined(E2_STEP_PIN) && (E2_STEP_PIN > -1)
985
-    OUT_WRITE(E2_STEP_PIN,INVERT_E_STEP_PIN);
1003
+    E2_STEP_INIT;
1004
+    E2_STEP_WRITE(INVERT_E_STEP_PIN);
986 1005
     disable_e2();
987 1006
   #endif
988 1007
   #if defined(E3_STEP_PIN) && (E3_STEP_PIN > -1)
989
-    OUT_WRITE(E3_STEP_PIN,INVERT_E_STEP_PIN);
1008
+    E3_STEP_INIT;
1009
+    E3_STEP_WRITE(INVERT_E_STEP_PIN);
990 1010
     disable_e3();
991 1011
   #endif
992 1012
 
@@ -1105,31 +1125,31 @@ void babystep(const uint8_t axis,const bool direction)
1105 1125
   case X_AXIS:
1106 1126
   {
1107 1127
     enable_x();   
1108
-    uint8_t old_x_dir_pin= READ(X_DIR_PIN);  //if dualzstepper, both point to same direction.
1128
+    uint8_t old_x_dir_pin= X_DIR_READ;  //if dualzstepper, both point to same direction.
1109 1129
    
1110 1130
     //setup new step
1111
-    WRITE(X_DIR_PIN,(INVERT_X_DIR)^direction);
1131
+    X_DIR_WRITE((INVERT_X_DIR)^direction);
1112 1132
     #ifdef DUAL_X_CARRIAGE
1113
-      WRITE(X2_DIR_PIN,(INVERT_X_DIR)^direction);
1133
+      X2_DIR_WRITE((INVERT_X_DIR)^direction);
1114 1134
     #endif
1115 1135
     
1116 1136
     //perform step 
1117
-    WRITE(X_STEP_PIN, !INVERT_X_STEP_PIN); 
1137
+    X_STEP_WRITE(!INVERT_X_STEP_PIN); 
1118 1138
     #ifdef DUAL_X_CARRIAGE
1119
-      WRITE(X2_STEP_PIN, !INVERT_X_STEP_PIN);
1139
+      X2_STEP_WRITE(!INVERT_X_STEP_PIN);
1120 1140
     #endif
1121 1141
 
1122 1142
     _delay_us(1U); // wait 1 microsecond
1123 1143
 
1124
-    WRITE(X_STEP_PIN, INVERT_X_STEP_PIN);
1144
+    X_STEP_WRITE(INVERT_X_STEP_PIN);
1125 1145
     #ifdef DUAL_X_CARRIAGE
1126
-      WRITE(X2_STEP_PIN, INVERT_X_STEP_PIN);
1146
+      X2_STEP_WRITE(INVERT_X_STEP_PIN);
1127 1147
     #endif
1128 1148
 
1129 1149
     //get old pin state back.
1130
-    WRITE(X_DIR_PIN,old_x_dir_pin);
1150
+    X_DIR_WRITE(old_x_dir_pin);
1131 1151
     #ifdef DUAL_X_CARRIAGE
1132
-      WRITE(X2_DIR_PIN,old_x_dir_pin);
1152
+      X2_DIR_WRITE(old_x_dir_pin);
1133 1153
     #endif
1134 1154
 
1135 1155
   }
@@ -1137,31 +1157,31 @@ void babystep(const uint8_t axis,const bool direction)
1137 1157
   case Y_AXIS:
1138 1158
   {
1139 1159
     enable_y();   
1140
-    uint8_t old_y_dir_pin= READ(Y_DIR_PIN);  //if dualzstepper, both point to same direction.
1160
+    uint8_t old_y_dir_pin= Y_DIR_READ;  //if dualzstepper, both point to same direction.
1141 1161
    
1142 1162
     //setup new step
1143
-    WRITE(Y_DIR_PIN,(INVERT_Y_DIR)^direction);
1163
+    Y_DIR_WRITE((INVERT_Y_DIR)^direction);
1144 1164
     #ifdef DUAL_Y_CARRIAGE
1145
-      WRITE(Y2_DIR_PIN,(INVERT_Y_DIR)^direction);
1165
+      Y2_DIR_WRITE((INVERT_Y_DIR)^direction);
1146 1166
     #endif
1147 1167
     
1148 1168
     //perform step 
1149
-    WRITE(Y_STEP_PIN, !INVERT_Y_STEP_PIN); 
1169
+    Y_STEP_WRITE(!INVERT_Y_STEP_PIN); 
1150 1170
     #ifdef DUAL_Y_CARRIAGE
1151
-      WRITE(Y2_STEP_PIN, !INVERT_Y_STEP_PIN);
1171
+      Y2_STEP_WRITE( !INVERT_Y_STEP_PIN);
1152 1172
     #endif
1153 1173
 
1154 1174
     _delay_us(1U); // wait 1 microsecond
1155 1175
 
1156
-    WRITE(Y_STEP_PIN, INVERT_Y_STEP_PIN);
1176
+    Y_STEP_WRITE(INVERT_Y_STEP_PIN);
1157 1177
     #ifdef DUAL_Y_CARRIAGE
1158
-      WRITE(Y2_STEP_PIN, INVERT_Y_STEP_PIN);
1178
+      Y2_STEP_WRITE(INVERT_Y_STEP_PIN);
1159 1179
     #endif
1160 1180
 
1161 1181
     //get old pin state back.
1162
-    WRITE(Y_DIR_PIN,old_y_dir_pin);
1182
+    Y_DIR_WRITE(old_y_dir_pin);
1163 1183
     #ifdef DUAL_Y_CARRIAGE
1164
-      WRITE(Y2_DIR_PIN,old_y_dir_pin);
1184
+      Y2_DIR_WRITE(old_y_dir_pin);
1165 1185
     #endif
1166 1186
 
1167 1187
   }
@@ -1171,29 +1191,29 @@ void babystep(const uint8_t axis,const bool direction)
1171 1191
   case Z_AXIS:
1172 1192
   {
1173 1193
     enable_z();
1174
-    uint8_t old_z_dir_pin= READ(Z_DIR_PIN);  //if dualzstepper, both point to same direction.
1194
+    uint8_t old_z_dir_pin= Z_DIR_READ;  //if dualzstepper, both point to same direction.
1175 1195
     //setup new step
1176
-    WRITE(Z_DIR_PIN,(INVERT_Z_DIR)^direction^BABYSTEP_INVERT_Z);
1196
+    Z_DIR_WRITE((INVERT_Z_DIR)^direction^BABYSTEP_INVERT_Z);
1177 1197
     #ifdef Z_DUAL_STEPPER_DRIVERS
1178
-      WRITE(Z2_DIR_PIN,(INVERT_Z_DIR)^direction^BABYSTEP_INVERT_Z);
1198
+      Z2_DIR_WRITE((INVERT_Z_DIR)^direction^BABYSTEP_INVERT_Z);
1179 1199
     #endif
1180 1200
     //perform step 
1181
-    WRITE(Z_STEP_PIN, !INVERT_Z_STEP_PIN); 
1201
+    Z_STEP_WRITE(!INVERT_Z_STEP_PIN); 
1182 1202
     #ifdef Z_DUAL_STEPPER_DRIVERS
1183
-      WRITE(Z2_STEP_PIN, !INVERT_Z_STEP_PIN);
1203
+      Z2_STEP_WRITE( !INVERT_Z_STEP_PIN);
1184 1204
     #endif
1185 1205
 
1186 1206
     _delay_us(1U); // wait 1 microsecond
1187 1207
 
1188
-    WRITE(Z_STEP_PIN, INVERT_Z_STEP_PIN);
1208
+    Z_STEP_WRITE( INVERT_Z_STEP_PIN);
1189 1209
     #ifdef Z_DUAL_STEPPER_DRIVERS
1190
-      WRITE(Z2_STEP_PIN, INVERT_Z_STEP_PIN);
1210
+      Z2_STEP_WRITE(INVERT_Z_STEP_PIN);
1191 1211
     #endif
1192 1212
 
1193 1213
     //get old pin state back.
1194
-    WRITE(Z_DIR_PIN,old_z_dir_pin);
1214
+    Z_DIR_WRITE(old_z_dir_pin);
1195 1215
     #ifdef Z_DUAL_STEPPER_DRIVERS
1196
-      WRITE(Z2_DIR_PIN,old_z_dir_pin);
1216
+      Z2_DIR_WRITE(old_z_dir_pin);
1197 1217
     #endif
1198 1218
 
1199 1219
   }
@@ -1204,29 +1224,29 @@ void babystep(const uint8_t axis,const bool direction)
1204 1224
     enable_x();
1205 1225
     enable_y();
1206 1226
     enable_z();
1207
-    uint8_t old_x_dir_pin= READ(X_DIR_PIN);  
1208
-    uint8_t old_y_dir_pin= READ(Y_DIR_PIN);  
1209
-    uint8_t old_z_dir_pin= READ(Z_DIR_PIN);  
1227
+    uint8_t old_x_dir_pin= X_DIR_READ;  
1228
+    uint8_t old_y_dir_pin= Y_DIR_READ;
1229
+    uint8_t old_z_dir_pin= Z_DIR_READ;
1210 1230
     //setup new step
1211
-    WRITE(X_DIR_PIN,(INVERT_X_DIR)^direction^BABYSTEP_INVERT_Z);
1212
-    WRITE(Y_DIR_PIN,(INVERT_Y_DIR)^direction^BABYSTEP_INVERT_Z);
1213
-    WRITE(Z_DIR_PIN,(INVERT_Z_DIR)^direction^BABYSTEP_INVERT_Z);
1231
+    X_DIR_WRITE((INVERT_X_DIR)^direction^BABYSTEP_INVERT_Z);
1232
+    Y_DIR_WRITE((INVERT_Y_DIR)^direction^BABYSTEP_INVERT_Z);
1233
+    Z_DIR_WRITE((INVERT_Z_DIR)^direction^BABYSTEP_INVERT_Z);
1214 1234
     
1215 1235
     //perform step 
1216
-    WRITE(X_STEP_PIN, !INVERT_X_STEP_PIN); 
1217
-    WRITE(Y_STEP_PIN, !INVERT_Y_STEP_PIN); 
1218
-    WRITE(Z_STEP_PIN, !INVERT_Z_STEP_PIN); 
1236
+    X_STEP_WRITE( !INVERT_X_STEP_PIN); 
1237
+    Y_STEP_WRITE(!INVERT_Y_STEP_PIN); 
1238
+    Z_STEP_WRITE(!INVERT_Z_STEP_PIN); 
1219 1239
     
1220 1240
     _delay_us(1U); // wait 1 microsecond
1221 1241
 
1222
-    WRITE(X_STEP_PIN, INVERT_X_STEP_PIN); 
1223
-    WRITE(Y_STEP_PIN, INVERT_Y_STEP_PIN); 
1224
-    WRITE(Z_STEP_PIN, INVERT_Z_STEP_PIN);
1242
+    X_STEP_WRITE(INVERT_X_STEP_PIN); 
1243
+    Y_STEP_WRITE(INVERT_Y_STEP_PIN); 
1244
+    Z_STEP_WRITE(INVERT_Z_STEP_PIN);
1225 1245
 
1226 1246
     //get old pin state back.
1227
-    WRITE(X_DIR_PIN,old_x_dir_pin);
1228
-    WRITE(Y_DIR_PIN,old_y_dir_pin);
1229
-    WRITE(Z_DIR_PIN,old_z_dir_pin);
1247
+    X_DIR_WRITE(old_x_dir_pin);
1248
+    Y_DIR_WRITE(old_y_dir_pin);
1249
+    Z_DIR_WRITE(old_z_dir_pin);
1230 1250
 
1231 1251
   }
1232 1252
   break;
@@ -1363,4 +1383,3 @@ void microstep_readings()
1363 1383
       SERIAL_PROTOCOLLN( digitalRead(E1_MS2_PIN));
1364 1384
       #endif
1365 1385
 }
1366
-

+ 16
- 17
Marlin/stepper.h View File

@@ -22,30 +22,31 @@
22 22
 #define stepper_h 
23 23
 
24 24
 #include "planner.h"
25
+#include "stepper_indirection.h"
25 26
 
26 27
 #if EXTRUDERS > 3
27
-  #define WRITE_E_STEP(v) { if(current_block->active_extruder == 3) { WRITE(E3_STEP_PIN, v); } else { if(current_block->active_extruder == 2) { WRITE(E2_STEP_PIN, v); } else { if(current_block->active_extruder == 1) { WRITE(E1_STEP_PIN, v); } else { WRITE(E0_STEP_PIN, v); }}}}
28
-  #define NORM_E_DIR() { if(current_block->active_extruder == 3) { WRITE(E3_DIR_PIN, !INVERT_E3_DIR); } else { if(current_block->active_extruder == 2) { WRITE(E2_DIR_PIN, !INVERT_E2_DIR); } else { if(current_block->active_extruder == 1) { WRITE(E1_DIR_PIN, !INVERT_E1_DIR); } else { WRITE(E0_DIR_PIN, !INVERT_E0_DIR); }}}}
29
-  #define REV_E_DIR() { if(current_block->active_extruder == 3) { WRITE(E3_DIR_PIN, INVERT_E3_DIR); } else { if(current_block->active_extruder == 2) { WRITE(E2_DIR_PIN, INVERT_E2_DIR); } else { if(current_block->active_extruder == 1) { WRITE(E1_DIR_PIN, INVERT_E1_DIR); } else { WRITE(E0_DIR_PIN, INVERT_E0_DIR); }}}}
28
+  #define WRITE_E_STEP(v) { if(current_block->active_extruder == 3) { E3_STEP_WRITE(v); } else { if(current_block->active_extruder == 2) { E2_STEP_WRITE(v); } else { if(current_block->active_extruder == 1) { E1_STEP_WRITE(v); } else { E0_STEP_WRITE(v); }}}}
29
+  #define NORM_E_DIR() { if(current_block->active_extruder == 3) { E3_DIR_WRITE( !INVERT_E3_DIR); } else { if(current_block->active_extruder == 2) { E2_DIR_WRITE(!INVERT_E2_DIR); } else { if(current_block->active_extruder == 1) { E1_DIR_WRITE(!INVERT_E1_DIR); } else { E0_DIR_WRITE(!INVERT_E0_DIR); }}}}
30
+  #define REV_E_DIR() { if(current_block->active_extruder == 3) { E3_DIR_WRITE(INVERT_E3_DIR); } else { if(current_block->active_extruder == 2) { E2_DIR_WRITE(INVERT_E2_DIR); } else { if(current_block->active_extruder == 1) { E1_DIR_WRITE(INVERT_E1_DIR); } else { E0_DIR_WRITE(INVERT_E0_DIR); }}}}
30 31
 #elif EXTRUDERS > 2
31
-  #define WRITE_E_STEP(v) { if(current_block->active_extruder == 2) { WRITE(E2_STEP_PIN, v); } else { if(current_block->active_extruder == 1) { WRITE(E1_STEP_PIN, v); } else { WRITE(E0_STEP_PIN, v); }}}
32
-  #define NORM_E_DIR() { if(current_block->active_extruder == 2) { WRITE(E2_DIR_PIN, !INVERT_E2_DIR); } else { if(current_block->active_extruder == 1) { WRITE(E1_DIR_PIN, !INVERT_E1_DIR); } else { WRITE(E0_DIR_PIN, !INVERT_E0_DIR); }}}
33
-  #define REV_E_DIR() { if(current_block->active_extruder == 2) { WRITE(E2_DIR_PIN, INVERT_E2_DIR); } else { if(current_block->active_extruder == 1) { WRITE(E1_DIR_PIN, INVERT_E1_DIR); } else { WRITE(E0_DIR_PIN, INVERT_E0_DIR); }}}
32
+  #define WRITE_E_STEP(v) { if(current_block->active_extruder == 2) { E2_STEP_WRITE(v); } else { if(current_block->active_extruder == 1) { E1_STEP_WRITE(v); } else { E0_STEP_WRITE(v); }}}
33
+  #define NORM_E_DIR() { if(current_block->active_extruder == 2) { E2_DIR_WRITE(!INVERT_E2_DIR); } else { if(current_block->active_extruder == 1) { E1_DIR_WRITE(!INVERT_E1_DIR); } else { E0_DIR_WRITE(!INVERT_E0_DIR); }}}
34
+  #define REV_E_DIR() { if(current_block->active_extruder == 2) { E2_DIR_WRITE(INVERT_E2_DIR); } else { if(current_block->active_extruder == 1) { E1_DIR_WRITE(INVERT_E1_DIR); } else { E0_DIR_WRITE(INVERT_E0_DIR); }}}
34 35
 #elif EXTRUDERS > 1
35 36
   #ifndef DUAL_X_CARRIAGE
36
-    #define WRITE_E_STEP(v) { if(current_block->active_extruder == 1) { WRITE(E1_STEP_PIN, v); } else { WRITE(E0_STEP_PIN, v); }}
37
-    #define NORM_E_DIR() { if(current_block->active_extruder == 1) { WRITE(E1_DIR_PIN, !INVERT_E1_DIR); } else { WRITE(E0_DIR_PIN, !INVERT_E0_DIR); }}
38
-    #define REV_E_DIR() { if(current_block->active_extruder == 1) { WRITE(E1_DIR_PIN, INVERT_E1_DIR); } else { WRITE(E0_DIR_PIN, INVERT_E0_DIR); }}
37
+    #define WRITE_E_STEP(v) { if(current_block->active_extruder == 1) { E1_STEP_WRITE(v); } else { E0_STEP_WRITE(v); }}
38
+    #define NORM_E_DIR() { if(current_block->active_extruder == 1) { E1_DIR_WRITE(!INVERT_E1_DIR); } else { E0_DIR_WRITE(!INVERT_E0_DIR); }}
39
+    #define REV_E_DIR() { if(current_block->active_extruder == 1) { E1_DIR_WRITE(INVERT_E1_DIR); } else { E0_DIR_WRITE(INVERT_E0_DIR); }}
39 40
   #else
40 41
     extern bool extruder_duplication_enabled;
41
-    #define WRITE_E_STEP(v) { if(extruder_duplication_enabled) { WRITE(E0_STEP_PIN, v); WRITE(E1_STEP_PIN, v); } else if(current_block->active_extruder == 1) { WRITE(E1_STEP_PIN, v); } else { WRITE(E0_STEP_PIN, v); }}
42
-    #define NORM_E_DIR() { if(extruder_duplication_enabled) { WRITE(E0_DIR_PIN, !INVERT_E0_DIR); WRITE(E1_DIR_PIN, !INVERT_E1_DIR); } else if(current_block->active_extruder == 1) { WRITE(E1_DIR_PIN, !INVERT_E1_DIR); } else { WRITE(E0_DIR_PIN, !INVERT_E0_DIR); }}
43
-    #define REV_E_DIR() { if(extruder_duplication_enabled) { WRITE(E0_DIR_PIN, INVERT_E0_DIR); WRITE(E1_DIR_PIN, INVERT_E1_DIR); } else if(current_block->active_extruder == 1) { WRITE(E1_DIR_PIN, INVERT_E1_DIR); } else { WRITE(E0_DIR_PIN, INVERT_E0_DIR); }}
42
+    #define WRITE_E_STEP(v) { if(extruder_duplication_enabled) { E0_STEP_WRITE(v); E1_STEP_WRITE(v); } else if(current_block->active_extruder == 1) { E1_STEP_WRITE(v); } else { E0_STEP_WRITE(v); }}
43
+    #define NORM_E_DIR() { if(extruder_duplication_enabled) { E0_DIR_WRITE(!INVERT_E0_DIR); E1_DIR_WRITE(!INVERT_E1_DIR); } else if(current_block->active_extruder == 1) { E1_DIR_WRITE(!INVERT_E1_DIR); } else { E0_DIR_WRITE(!INVERT_E0_DIR); }}
44
+    #define REV_E_DIR() { if(extruder_duplication_enabled) { E0_DIR_WRITE(INVERT_E0_DIR); E1_DIR_WRITE(INVERT_E1_DIR); } else if(current_block->active_extruder == 1) { E1_DIR_WRITE(INVERT_E1_DIR); } else { E0_DIR_WRITE(INVERT_E0_DIR); }}
44 45
   #endif  
45 46
 #else
46
-  #define WRITE_E_STEP(v) WRITE(E0_STEP_PIN, v)
47
-  #define NORM_E_DIR() WRITE(E0_DIR_PIN, !INVERT_E0_DIR)
48
-  #define REV_E_DIR() WRITE(E0_DIR_PIN, INVERT_E0_DIR)
47
+  #define WRITE_E_STEP(v) E0_STEP_WRITE(v)
48
+  #define NORM_E_DIR() E0_DIR_WRITE(!INVERT_E0_DIR)
49
+  #define REV_E_DIR() E0_DIR_WRITE(INVERT_E0_DIR)
49 50
 #endif
50 51
 
51 52
 #ifdef ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
@@ -100,6 +101,4 @@ void microstep_readings();
100 101
   void babystep(const uint8_t axis,const bool direction); // perform a short step with a single stepper motor, outside of any convention
101 102
 #endif
102 103
      
103
-
104
-
105 104
 #endif

+ 224
- 0
Marlin/stepper_indirection.cpp View File

@@ -0,0 +1,224 @@
1
+/*
2
+  stepper_indirection.c - stepper motor driver indirection 
3
+  to allow some stepper functions to be done via SPI/I2c instead of direct pin manipulation
4
+  Part of Marlin
5
+
6
+  Copyright (c) 2015 Dominik Wenger
7
+
8
+  Marlin is free software: you can redistribute it and/or modify
9
+  it under the terms of the GNU General Public License as published by
10
+  the Free Software Foundation, either version 3 of the License, or
11
+  (at your option) any later version.
12
+
13
+  Marlin is distributed in the hope that it will be useful,
14
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
+  GNU General Public License for more details.
17
+
18
+  You should have received a copy of the GNU General Public License
19
+  along with Marlin.  If not, see <http://www.gnu.org/licenses/>.
20
+*/
21
+
22
+#include "stepper_indirection.h"
23
+#include "Configuration.h"
24
+
25
+#ifdef HAVE_TMCDRIVER
26
+#include <SPI.h>
27
+#include <TMC26XStepper.h>
28
+#endif
29
+
30
+// Stepper objects of TMC steppers used
31
+#ifdef X_IS_TMC
32
+	TMC26XStepper stepperX(200,X_ENABLE_PIN,X_STEP_PIN,X_DIR_PIN,X_MAX_CURRENT,X_SENSE_RESISTOR);
33
+#endif
34
+#ifdef X2_IS_TMC
35
+	TMC26XStepper stepperX2(200,X2_ENABLE_PIN,X2_STEP_PIN,X2_DIR_PIN,X2_MAX_CURRENT,X2_SENSE_RESISTOR);
36
+#endif
37
+#ifdef Y_IS_TMC
38
+	TMC26XStepper stepperY(200,Y_ENABLE_PIN,Y_STEP_PIN,Y_DIR_PIN,Y_MAX_CURRENT,Y_SENSE_RESISTOR);
39
+#endif
40
+#ifdef Y2_IS_TMC
41
+	TMC26XStepper stepperY2(200,Y2_ENABLE_PIN,Y2_STEP_PIN,Y2_DIR_PIN,Y2_MAX_CURRENT,Y2_SENSE_RESISTOR);
42
+#endif
43
+#ifdef Z_IS_TMC
44
+	TMC26XStepper stepperZ(200,Z_ENABLE_PIN,Z_STEP_PIN,Z_DIR_PIN,Z_MAX_CURRENT,Z_SENSE_RESISTOR);
45
+#endif
46
+#ifdef Z2_IS_TMC
47
+	TMC26XStepper stepperZ2(200,Z2_ENABLE_PIN,Z2_STEP_PIN,Z2_DIR_PIN,Z2_MAX_CURRENT,Z2_SENSE_RESISTOR);
48
+#endif
49
+#ifdef E0_IS_TMC
50
+	TMC26XStepper stepperE0(200,E0_ENABLE_PIN,E0_STEP_PIN,E0_DIR_PIN,E0_MAX_CURRENT,E0_SENSE_RESISTOR);
51
+#endif
52
+#ifdef E1_IS_TMC
53
+	TMC26XStepper stepperE1(200,E1_ENABLE_PIN,E1_STEP_PIN,E1_DIR_PIN,E1_MAX_CURRENT,E1_SENSE_RESISTOR);
54
+#endif
55
+#ifdef E2_IS_TMC
56
+	TMC26XStepper stepperE2(200,E2_ENABLE_PIN,E2_STEP_PIN,E2_DIR_PIN,E2_MAX_CURRENT,E2_SENSE_RESISTOR);
57
+#endif
58
+#ifdef E3_IS_TMC
59
+	TMC26XStepper stepperE3(200,E3_ENABLE_PIN,E3_STEP_PIN,E3_DIR_PIN,E3_MAX_CURRENT,E3_SENSE_RESISTOR);
60
+#endif	
61
+
62
+#ifdef HAVE_TMCDRIVER
63
+void tmc_init()
64
+{
65
+#ifdef X_IS_TMC
66
+	stepperX.setMicrosteps(X_MICROSTEPS);
67
+	stepperX.start();
68
+#endif
69
+#ifdef X2_IS_TMC
70
+	stepperX2.setMicrosteps(X2_MICROSTEPS);
71
+	stepperX2.start();
72
+#endif
73
+#ifdef Y_IS_TMC
74
+	stepperY.setMicrosteps(Y_MICROSTEPS);
75
+	stepperY.start();
76
+#endif
77
+#ifdef Y2_IS_TMC
78
+	stepperY2.setMicrosteps(Y2_MICROSTEPS);
79
+	stepperY2.start();
80
+#endif
81
+#ifdef Z_IS_TMC
82
+	stepperZ.setMicrosteps(Z_MICROSTEPS);
83
+	stepperZ.start();
84
+#endif
85
+#ifdef Z2_IS_TMC
86
+	stepperZ2.setMicrosteps(Z2_MICROSTEPS);
87
+	stepperZ2.start();
88
+#endif
89
+#ifdef E0_IS_TMC
90
+	stepperE0.setMicrosteps(E0_MICROSTEPS);
91
+	stepperE0.start();
92
+#endif
93
+#ifdef E1_IS_TMC
94
+	stepperE1.setMicrosteps(E1_MICROSTEPS);
95
+	stepperE1.start();
96
+#endif
97
+#ifdef E2_IS_TMC
98
+	stepperE2.setMicrosteps(E2_MICROSTEPS);
99
+	stepperE2.start();
100
+#endif
101
+#ifdef E3_IS_TMC
102
+	stepperE3.setMicrosteps(E3_MICROSTEPS);
103
+	stepperE3.start();
104
+#endif
105
+}
106
+#endif
107
+
108
+// L6470 Driver objects and inits
109
+
110
+#ifdef HAVE_L6470DRIVER
111
+#include <SPI.h>
112
+#include <L6470.h>
113
+#endif
114
+
115
+// L6470 Stepper objects
116
+#ifdef X_IS_L6470
117
+	L6470 stepperX(X_ENABLE_PIN);
118
+#endif
119
+#ifdef X2_IS_L6470
120
+	L6470 stepperX2(X2_ENABLE_PIN);
121
+#endif
122
+#ifdef Y_IS_L6470
123
+	L6470 stepperY(Y_ENABLE_PIN);
124
+#endif
125
+#ifdef Y2_IS_L6470
126
+	L6470 stepperY2(Y2_ENABLE_PIN);
127
+#endif
128
+#ifdef Z_IS_L6470
129
+	L6470 stepperZ(Z_ENABLE_PIN);
130
+#endif
131
+#ifdef Z2_IS_L6470
132
+	L6470 stepperZ2(Z2_ENABLE_PIN);
133
+#endif
134
+#ifdef E0_IS_L6470
135
+	L6470 stepperE0(E0_ENABLE_PIN);
136
+#endif
137
+#ifdef E1_IS_L6470
138
+	L6470 stepperE1(E1_ENABLE_PIN);
139
+#endif
140
+#ifdef E2_IS_L6470
141
+	L6470 stepperE2(E2_ENABLE_PIN);
142
+#endif
143
+#ifdef E3_IS_L6470
144
+	L6470 stepperE3(E3_ENABLE_PIN);
145
+#endif	
146
+
147
+
148
+// init routine
149
+#ifdef HAVE_L6470DRIVER
150
+void L6470_init()
151
+{
152
+#ifdef X_IS_L6470
153
+	stepperX.init(X_K_VAL);
154
+	stepperX.softFree();
155
+	stepperX.setMicroSteps(X_MICROSTEPS);
156
+    stepperX.setOverCurrent(X_OVERCURRENT); //set overcurrent protection
157
+    stepperX.setStallCurrent(X_STALLCURRENT);
158
+#endif
159
+#ifdef X2_IS_L6470
160
+	stepperX2.init(X2_K_VAL);
161
+	stepperX2.softFree();
162
+	stepperX2.setMicroSteps(X2_MICROSTEPS);
163
+    stepperX2.setOverCurrent(X2_OVERCURRENT); //set overcurrent protection
164
+    stepperX2.setStallCurrent(X2_STALLCURRENT);
165
+#endif
166
+#ifdef Y_IS_L6470
167
+	stepperY.init(Y_K_VAL);
168
+	stepperY.softFree();
169
+	stepperY.setMicroSteps(Y_MICROSTEPS);
170
+    stepperY.setOverCurrent(Y_OVERCURRENT); //set overcurrent protection
171
+    stepperY.setStallCurrent(Y_STALLCURRENT);
172
+#endif
173
+#ifdef Y2_IS_L6470
174
+	stepperY2.init(Y2_K_VAL);
175
+	stepperY2.softFree();
176
+	stepperY2.setMicroSteps(Y2_MICROSTEPS);
177
+    stepperY2.setOverCurrent(Y2_OVERCURRENT); //set overcurrent protection
178
+    stepperY2.setStallCurrent(Y2_STALLCURRENT);
179
+#endif
180
+#ifdef Z_IS_L6470
181
+	stepperZ.init(Z_K_VAL);
182
+	stepperZ.softFree();
183
+	stepperZ.setMicroSteps(Z_MICROSTEPS);
184
+    stepperZ.setOverCurrent(Z_OVERCURRENT); //set overcurrent protection
185
+    stepperZ.setStallCurrent(Z_STALLCURRENT);
186
+#endif
187
+#ifdef Z2_IS_L6470
188
+	stepperZ2.init(Z2_K_VAL);
189
+	stepperZ2.softFree();
190
+	stepperZ2.setMicroSteps(Z2_MICROSTEPS);
191
+    stepperZ2.setOverCurrent(Z2_OVERCURRENT); //set overcurrent protection
192
+    stepperZ2.setStallCurrent(Z2_STALLCURRENT);
193
+#endif
194
+#ifdef E0_IS_L6470
195
+	stepperE0.init(E0_K_VAL);
196
+	stepperE0.softFree();
197
+	stepperE0.setMicroSteps(E0_MICROSTEPS);
198
+    stepperE0.setOverCurrent(E0_OVERCURRENT); //set overcurrent protection
199
+    stepperE0.setStallCurrent(E0_STALLCURRENT);
200
+#endif
201
+#ifdef E1_IS_L6470
202
+	stepperE1.init(E1_K_VAL);
203
+	stepperE1.softFree();
204
+	stepperE1.setMicroSteps(E1_MICROSTEPS);
205
+    stepperE1.setOverCurrent(E1_OVERCURRENT); //set overcurrent protection
206
+    stepperE1.setStallCurrent(E1_STALLCURRENT);
207
+#endif
208
+#ifdef E2_IS_L6470
209
+	stepperE2.init(E2_K_VAL);
210
+	stepperE2.softFree();
211
+	stepperE2.setMicroSteps(E2_MICROSTEPS);
212
+    stepperE2.setOverCurrent(E2_OVERCURRENT); //set overcurrent protection
213
+    stepperE2.setStallCurrent(E2_STALLCURRENT);
214
+#endif
215
+#ifdef E3_IS_L6470
216
+	stepperE3.init(E3_K_VAL);
217
+	stepperE3.softFree();
218
+	stepperE3.setMicroSteps(E3_MICROSTEPS);
219
+    stepperE3.setOverCurrent(E3_OVERCURRENT); //set overcurrent protection
220
+    stepperE3.setStallCurrent(E3_STALLCURRENT);
221
+#endif	
222
+}
223
+#endif
224
+

+ 492
- 0
Marlin/stepper_indirection.h View File

@@ -0,0 +1,492 @@
1
+/*
2
+  stepper_indirection.h - stepper motor driver indirection macros
3
+  to allow some stepper functions to be done via SPI/I2c instead of direct pin manipulation
4
+  Part of Marlin
5
+
6
+  Copyright (c) 2015 Dominik Wenger
7
+
8
+  Marlin is free software: you can redistribute it and/or modify
9
+  it under the terms of the GNU General Public License as published by
10
+  the Free Software Foundation, either version 3 of the License, or
11
+  (at your option) any later version.
12
+
13
+  Marlin is distributed in the hope that it will be useful,
14
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
+  GNU General Public License for more details.
17
+
18
+  You should have received a copy of the GNU General Public License
19
+  along with Marlin.  If not, see <http://www.gnu.org/licenses/>.
20
+*/
21
+
22
+#ifndef STEPPER_INDIRECTION_H
23
+#define STEPPER_INDIRECTION_H
24
+
25
+// X motor
26
+#define X_STEP_INIT SET_OUTPUT(X_STEP_PIN)
27
+#define X_STEP_WRITE(STATE) WRITE(X_STEP_PIN,STATE)
28
+#define X_STEP_READ READ(X_STEP_PIN)
29
+
30
+#define X_DIR_INIT SET_OUTPUT(X_DIR_PIN)
31
+#define X_DIR_WRITE(STATE) WRITE(X_DIR_PIN,STATE)
32
+#define X_DIR_READ READ(X_DIR_PIN)
33
+
34
+#define X_ENABLE_INIT SET_OUTPUT(X_ENABLE_PIN)
35
+#define X_ENABLE_WRITE(STATE) WRITE(X_ENABLE_PIN,STATE)
36
+#define X_ENABLE_READ READ(X_ENABLE_PIN)
37
+
38
+// X2 motor
39
+#define X2_STEP_INIT SET_OUTPUT(X2_STEP_PIN)
40
+#define X2_STEP_WRITE(STATE) WRITE(X2_STEP_PIN,STATE)
41
+#define X2_STEP_READ READ(X2_STEP_PIN)
42
+
43
+#define X2_DIR_INIT SET_OUTPUT(X2_DIR_PIN)
44
+#define X2_DIR_WRITE(STATE) WRITE(X2_DIR_PIN,STATE)
45
+#define X2_DIR_READ READ(X_DIR_PIN)
46
+
47
+#define X2_ENABLE_INIT SET_OUTPUT(X2_ENABLE_PIN)
48
+#define X2_ENABLE_WRITE(STATE) WRITE(X2_ENABLE_PIN,STATE)
49
+#define X2_ENABLE_READ READ(X_ENABLE_PIN)
50
+
51
+// Y motor
52
+#define Y_STEP_INIT SET_OUTPUT(Y_STEP_PIN)
53
+#define Y_STEP_WRITE(STATE) WRITE(Y_STEP_PIN,STATE)
54
+#define Y_STEP_READ READ(Y_STEP_PIN)
55
+
56
+#define Y_DIR_INIT SET_OUTPUT(Y_DIR_PIN)
57
+#define Y_DIR_WRITE(STATE) WRITE(Y_DIR_PIN,STATE)
58
+#define Y_DIR_READ READ(Y_DIR_PIN)
59
+
60
+#define Y_ENABLE_INIT SET_OUTPUT(Y_ENABLE_PIN)
61
+#define Y_ENABLE_WRITE(STATE) WRITE(Y_ENABLE_PIN,STATE)
62
+#define Y_ENABLE_READ READ(Y_ENABLE_PIN)
63
+
64
+// Y2 motor
65
+#define Y2_STEP_INIT SET_OUTPUT(Y2_STEP_PIN)
66
+#define Y2_STEP_WRITE(STATE) WRITE(Y2_STEP_PIN,STATE)
67
+#define Y2_STEP_READ READ(Y2_STEP_PIN)
68
+
69
+#define Y2_DIR_INIT SET_OUTPUT(Y2_DIR_PIN)
70
+#define Y2_DIR_WRITE(STATE) WRITE(Y2_DIR_PIN,STATE)
71
+#define Y2_DIR_READ READ(Y2_DIR_PIN)
72
+
73
+#define Y2_ENABLE_INIT SET_OUTPUT(Y2_ENABLE_PIN)
74
+#define Y2_ENABLE_WRITE(STATE) WRITE(Y2_ENABLE_PIN,STATE)
75
+#define Y2_ENABLE_READ READ(Y2_ENABLE_PIN)
76
+
77
+// Z motor
78
+#define Z_STEP_INIT SET_OUTPUT(Z_STEP_PIN)
79
+#define Z_STEP_WRITE(STATE) WRITE(Z_STEP_PIN,STATE)
80
+#define Z_STEP_READ READ(Z_STEP_PIN)
81
+
82
+#define Z_DIR_INIT SET_OUTPUT(Z_DIR_PIN)
83
+#define Z_DIR_WRITE(STATE) WRITE(Z_DIR_PIN,STATE)
84
+#define Z_DIR_READ READ(Z_DIR_PIN)
85
+
86
+#define Z_ENABLE_INIT SET_OUTPUT(Z_ENABLE_PIN)
87
+#define Z_ENABLE_WRITE(STATE) WRITE(Z_ENABLE_PIN,STATE)
88
+#define Z_ENABLE_READ READ(Z_ENABLE_PIN)
89
+
90
+// Z2 motor
91
+#define Z2_STEP_INIT SET_OUTPUT(Z2_STEP_PIN)
92
+#define Z2_STEP_WRITE(STATE) WRITE(Z2_STEP_PIN,STATE)
93
+#define Z2_STEP_READ READ(Z2_STEP_PIN)
94
+
95
+#define Z2_DIR_INIT SET_OUTPUT(Z2_DIR_PIN)
96
+#define Z2_DIR_WRITE(STATE) WRITE(Z2_DIR_PIN,STATE)
97
+#define Z2_DIR_READ READ(Z2_DIR_PIN)
98
+
99
+#define Z2_ENABLE_INIT SET_OUTPUT(Z2_ENABLE_PIN)
100
+#define Z2_ENABLE_WRITE(STATE) WRITE(Z2_ENABLE_PIN,STATE)
101
+#define Z2_ENABLE_READ READ(Z2_ENABLE_PIN)
102
+
103
+// E0 motor
104
+#define E0_STEP_INIT SET_OUTPUT(E0_STEP_PIN)
105
+#define E0_STEP_WRITE(STATE) WRITE(E0_STEP_PIN,STATE)
106
+#define E0_STEP_READ READ(E0_STEP_PIN)
107
+
108
+#define E0_DIR_INIT SET_OUTPUT(E0_DIR_PIN)
109
+#define E0_DIR_WRITE(STATE) WRITE(E0_DIR_PIN,STATE)
110
+#define E0_DIR_READ READ(E0_DIR_PIN)
111
+
112
+#define E0_ENABLE_INIT SET_OUTPUT(E0_ENABLE_PIN)
113
+#define E0_ENABLE_WRITE(STATE) WRITE(E0_ENABLE_PIN,STATE)
114
+#define E0_ENABLE_READ READ(E0_ENABLE_PIN)
115
+
116
+// E1 motor
117
+#define E1_STEP_INIT SET_OUTPUT(E1_STEP_PIN)
118
+#define E1_STEP_WRITE(STATE) WRITE(E1_STEP_PIN,STATE)
119
+#define E1_STEP_READ READ(E1_STEP_PIN)
120
+
121
+#define E1_DIR_INIT SET_OUTPUT(E1_DIR_PIN)
122
+#define E1_DIR_WRITE(STATE) WRITE(E1_DIR_PIN,STATE)
123
+#define E1_DIR_READ READ(E1_DIR_PIN)
124
+
125
+#define E1_ENABLE_INIT SET_OUTPUT(E1_ENABLE_PIN)
126
+#define E1_ENABLE_WRITE(STATE) WRITE(E1_ENABLE_PIN,STATE)
127
+#define E1_ENABLE_READ READ(E1_ENABLE_PIN)
128
+
129
+// E2 motor
130
+#define E2_STEP_INIT SET_OUTPUT(E2_STEP_PIN)
131
+#define E2_STEP_WRITE(STATE) WRITE(E2_STEP_PIN,STATE)
132
+#define E2_STEP_READ READ(E2_STEP_PIN)
133
+
134
+#define E2_DIR_INIT SET_OUTPUT(E2_DIR_PIN)
135
+#define E2_DIR_WRITE(STATE) WRITE(E2_DIR_PIN,STATE)
136
+#define E2_DIR_READ READ(E2_DIR_PIN)
137
+
138
+#define E2_ENABLE_INIT SET_OUTPUT(E2_ENABLE_PIN)
139
+#define E2_ENABLE_WRITE(STATE) WRITE(E2_ENABLE_PIN,STATE)
140
+#define E2_ENABLE_READ READ(E2_ENABLE_PIN)
141
+
142
+// E3 motor
143
+#define E3_STEP_INIT SET_OUTPUT(E3_STEP_PIN)
144
+#define E3_STEP_WRITE(STATE) WRITE(E3_STEP_PIN,STATE)
145
+#define E3_STEP_READ READ(E3_STEP_PIN)
146
+
147
+#define E3_DIR_INIT SET_OUTPUT(E3_DIR_PIN)
148
+#define E3_DIR_WRITE(STATE) WRITE(E3_DIR_PIN,STATE)
149
+#define E3_DIR_READ READ(E3_DIR_PIN)
150
+
151
+#define E3_ENABLE_INIT SET_OUTPUT(E3_ENABLE_PIN)
152
+#define E3_ENABLE_WRITE(STATE) WRITE(E3_ENABLE_PIN,STATE)
153
+#define E3_ENABLE_READ READ(E3_ENABLE_PIN)
154
+
155
+//////////////////////////////////
156
+// Pin redefines for TMC drivers. 
157
+// TMC26X drivers have step and dir on normal pins, but everything else via SPI
158
+//////////////////////////////////
159
+#ifdef HAVE_TMCDRIVER
160
+#include <SPI.h>
161
+#include <TMC26XStepper.h>
162
+
163
+  void tmc_init();
164
+#ifdef X_IS_TMC
165
+   extern TMC26XStepper stepperX;
166
+   #undef X_ENABLE_INIT 
167
+   #define X_ENABLE_INIT ((void)0)
168
+   
169
+   #undef X_ENABLE_WRITE
170
+   #define X_ENABLE_WRITE(STATE) stepperX.setEnabled(STATE)
171
+   
172
+   #undef X_ENABLE_READ
173
+   #define X_ENABLE_READ stepperX.isEnabled()
174
+   
175
+#endif
176
+#ifdef X2_IS_TMC
177
+   extern TMC26XStepper stepperX2;
178
+   #undef X2_ENABLE_INIT
179
+   #define X2_ENABLE_INIT ((void)0)
180
+   
181
+   #undef X2_ENABLE_WRITE
182
+   #define X2_ENABLE_WRITE(STATE) stepperX2.setEnabled(STATE)
183
+   
184
+   #undef X2_ENABLE_READ
185
+   #define X2_ENABLE_READ stepperX2.isEnabled()   
186
+#endif
187
+#ifdef Y_IS_TMC
188
+   extern TMC26XStepper stepperY;
189
+   #undef Y_ENABLE_INIT
190
+   #define Y_ENABLE_INIT ((void)0)
191
+   
192
+   #undef Y_ENABLE_WRITE
193
+   #define Y_ENABLE_WRITE(STATE) stepperY.setEnabled(STATE)
194
+   
195
+   #undef Y_ENABLE_READ
196
+   #define Y_ENABLE_READ stepperY.isEnabled()   
197
+#endif
198
+#ifdef Y2_IS_TMC
199
+   extern TMC26XStepper stepperY2;
200
+   #undef Y2_ENABLE_INIT
201
+   #define Y2_ENABLE_INIT ((void)0)
202
+   
203
+   #undef Y2_ENABLE_WRITE
204
+   #define Y2_ENABLE_WRITE(STATE) stepperY2.setEnabled(STATE)
205
+   
206
+   #undef Y2_ENABLE_READ
207
+   #define Y2_ENABLE_READ stepperY2.isEnabled()     
208
+#endif
209
+#ifdef Z_IS_TMC
210
+   extern TMC26XStepper stepperZ;
211
+   #undef Z_ENABLE_INIT
212
+   #define Z_ENABLE_INIT ((void)0)
213
+   
214
+   #undef Z_ENABLE_WRITE
215
+   #define Z_ENABLE_WRITE(STATE) stepperZ.setEnabled(STATE)
216
+   
217
+   #undef Z_ENABLE_READ
218
+   #define Z_ENABLE_READ stepperZ.isEnabled()       
219
+#endif
220
+#ifdef Z2_IS_TMC
221
+   extern TMC26XStepper stepperZ2;
222
+   #undef Z2_ENABLE_INIT
223
+   #define Z2_ENABLE_INIT ((void)0)
224
+   
225
+   #undef Z2_ENABLE_WRITE
226
+   #define Z2_ENABLE_WRITE(STATE) stepperZ2.setEnabled(STATE)
227
+   
228
+   #undef Z2_ENABLE_READ
229
+   #define Z2_ENABLE_READ stepperZ2.isEnabled()   
230
+#endif
231
+#ifdef E0_IS_TMC
232
+   extern TMC26XStepper stepperE0;
233
+   #undef E0_ENABLE_INIT
234
+   #define E0_ENABLE_INIT ((void)0)
235
+   
236
+   #undef E0_ENABLE_WRITE
237
+   #define E0_ENABLE_WRITE(STATE) stepperE0.setEnabled(STATE)
238
+   
239
+   #undef E0_ENABLE_READ
240
+   #define E0_ENABLE_READ stepperE0.isEnabled()   
241
+#endif
242
+#ifdef E1_IS_TMC
243
+   extern TMC26XStepper stepperE1;
244
+   #undef E1_ENABLE_INIT
245
+   #define E1_ENABLE_INIT ((void)0)
246
+   
247
+   #undef E1_ENABLE_WRITE
248
+   #define E1_ENABLE_WRITE(STATE) stepperE1.setEnabled(STATE)
249
+   
250
+   #undef E1_ENABLE_READ
251
+   #define E1_ENABLE_READ stepperE1.isEnabled()   
252
+#endif
253
+#ifdef E2_IS_TMC
254
+   extern TMC26XStepper stepperE2;
255
+   #undef E2_ENABLE_INIT
256
+   #define E2_ENABLE_INIT ((void)0)
257
+   
258
+   #undef E2_ENABLE_WRITE
259
+   #define E2_ENABLE_WRITE(STATE) stepperE2.setEnabled(STATE)
260
+   
261
+   #undef E2_ENABLE_READ
262
+   #define E2_ENABLE_READ stepperE2.isEnabled()   
263
+#endif
264
+#ifdef E3_IS_TMC
265
+   extern TMC26XStepper stepperE3;
266
+   #undef E3_ENABLE_INIT
267
+   #define E3_ENABLE_INIT ((void)0)
268
+   
269
+   #undef E3_ENABLE_WRITE
270
+   #define E3_ENABLE_WRITE(STATE) stepperE3.setEnabled(STATE)
271
+   
272
+   #undef E3_ENABLE_READ
273
+   #define E3_ENABLE_READ stepperE3.isEnabled()   
274
+#endif
275
+
276
+#endif  // HAVE_TMCDRIVER
277
+
278
+//////////////////////////////////
279
+// Pin redefines for L6470 drivers. 
280
+// L640 drivers have step on normal pins, but dir and everything else via SPI
281
+//////////////////////////////////
282
+#ifdef HAVE_L6470DRIVER
283
+
284
+#include <SPI.h>
285
+#include <L6470.h>
286
+
287
+  void L6470_init();
288
+#ifdef X_IS_L6470
289
+   extern L6470 stepperX;
290
+   #undef X_ENABLE_INIT 
291
+   #define X_ENABLE_INIT ((void)0)
292
+   
293
+   #undef X_ENABLE_WRITE
294
+   #define X_ENABLE_WRITE(STATE) {if(STATE) stepperX.Step_Clock(stepperX.getStatus() & STATUS_HIZ); else stepperX.softFree();}
295
+   
296
+   #undef X_ENABLE_READ
297
+   #define X_ENABLE_READ (stepperX.getStatus() & STATUS_HIZ)
298
+   
299
+   #undef X_DIR_INIT 
300
+   #define X_DIR_INIT ((void)0)
301
+   
302
+   #undef X_DIR_WRITE
303
+   #define X_DIR_WRITE(STATE) stepperX.Step_Clock(STATE)
304
+   
305
+   #undef X_DIR_READ
306
+   #define X_DIR_READ (stepperX.getStatus() & STATUS_DIR)
307
+   
308
+#endif
309
+#ifdef X2_IS_L6470
310
+   extern L6470 stepperX2;
311
+   #undef X2_ENABLE_INIT
312
+   #define X2_ENABLE_INIT ((void)0)
313
+   
314
+   #undef X2_ENABLE_WRITE
315
+   #define X2_ENABLE_WRITE(STATE) (if(STATE) stepperX2.Step_Clock(stepperX2.getStatus() & STATUS_HIZ); else stepperX2.softFree();)
316
+   
317
+   #undef X2_ENABLE_READ
318
+   #define X2_ENABLE_READ (stepperX2.getStatus() & STATUS_HIZ)
319
+   
320
+   #undef X2_DIR_INIT 
321
+   #define X2_DIR_INIT ((void)0)
322
+   
323
+   #undef X2_DIR_WRITE
324
+   #define X2_DIR_WRITE(STATE) stepperX2.Step_Clock(STATE)
325
+   
326
+   #undef X2_DIR_READ
327
+   #define X2_DIR_READ (stepperX2.getStatus() & STATUS_DIR)
328
+#endif
329
+#ifdef Y_IS_L6470
330
+   extern L6470 stepperY;
331
+   #undef Y_ENABLE_INIT
332
+   #define Y_ENABLE_INIT ((void)0)
333
+   
334
+   #undef Y_ENABLE_WRITE
335
+   #define Y_ENABLE_WRITE(STATE) (if(STATE) stepperY.Step_Clock(stepperY.getStatus() & STATUS_HIZ); else stepperY.softFree();)
336
+   
337
+   #undef Y_ENABLE_READ
338
+   #define Y_ENABLE_READ (stepperY.getStatus() & STATUS_HIZ)
339
+   
340
+   #undef Y_DIR_INIT 
341
+   #define Y_DIR_INIT ((void)0)
342
+   
343
+   #undef Y_DIR_WRITE
344
+   #define Y_DIR_WRITE(STATE) stepperY.Step_Clock(STATE)
345
+   
346
+   #undef Y_DIR_READ
347
+   #define Y_DIR_READ (stepperY.getStatus() & STATUS_DIR)  
348
+#endif
349
+#ifdef Y2_IS_L6470
350
+   extern L6470 stepperY2;
351
+   #undef Y2_ENABLE_INIT
352
+   #define Y2_ENABLE_INIT ((void)0)
353
+   
354
+   #undef Y2_ENABLE_WRITE
355
+   #define Y2_ENABLE_WRITE(STATE) (if(STATE) stepperY2.Step_Clock(stepperY2.getStatus() & STATUS_HIZ); else stepperY2.softFree();)
356
+   
357
+   #undef Y2_ENABLE_READ
358
+   #define Y2_ENABLE_READ (stepperY2.getStatus() & STATUS_HIZ)
359
+   
360
+   #undef Y2_DIR_INIT 
361
+   #define Y2_DIR_INIT ((void)0)
362
+   
363
+   #undef Y2_DIR_WRITE
364
+   #define Y2_DIR_WRITE(STATE) stepperY2.Step_Clock(STATE)
365
+   
366
+   #undef Y2_DIR_READ
367
+   #define Y2_DIR_READ (stepperY2.getStatus() & STATUS_DIR)   
368
+#endif
369
+#ifdef Z_IS_L6470
370
+   extern L6470 stepperZ;
371
+   #undef Z_ENABLE_INIT
372
+   #define Z_ENABLE_INIT ((void)0)
373
+   
374
+   #undef Z_ENABLE_WRITE
375
+   #define Z_ENABLE_WRITE(STATE) (if(STATE) stepperZ.Step_Clock(stepperZ.getStatus() & STATUS_HIZ); else stepperZ.softFree();)
376
+   
377
+   #undef Z_ENABLE_READ
378
+   #define Z_ENABLE_READ (stepperZ.getStatus() & STATUS_HIZ)
379
+   
380
+   #undef Z_DIR_INIT 
381
+   #define Z_DIR_INIT ((void)0)
382
+   
383
+   #undef Z_DIR_WRITE
384
+   #define Z_DIR_WRITE(STATE) stepperZ.Step_Clock(STATE)
385
+   
386
+   #undef Y_DIR_READ
387
+   #define Y_DIR_READ (stepperZ.getStatus() & STATUS_DIR)      
388
+#endif
389
+#ifdef Z2_IS_L6470
390
+   extern L6470 stepperZ2;
391
+   #undef Z2_ENABLE_INIT
392
+   #define Z2_ENABLE_INIT ((void)0)
393
+   
394
+   #undef Z2_ENABLE_WRITE
395
+   #define Z2_ENABLE_WRITE(STATE) (if(STATE) stepperZ2.Step_Clock(stepperZ2.getStatus() & STATUS_HIZ); else stepperZ2.softFree();)
396
+   
397
+   #undef Z2_ENABLE_READ
398
+   #define Z2_ENABLE_READ (stepperZ2.getStatus() & STATUS_HIZ)
399
+   
400
+   #undef Z2_DIR_INIT 
401
+   #define Z2_DIR_INIT ((void)0)
402
+   
403
+   #undef Z2_DIR_WRITE
404
+   #define Z2_DIR_WRITE(STATE) stepperZ2.Step_Clock(STATE)
405
+   
406
+   #undef Y2_DIR_READ
407
+   #define Y2_DIR_READ (stepperZ2.getStatus() & STATUS_DIR)       
408
+#endif
409
+#ifdef E0_IS_L6470
410
+   extern L6470 stepperE0;
411
+   #undef E0_ENABLE_INIT
412
+   #define E0_ENABLE_INIT ((void)0)
413
+   
414
+   #undef E0_ENABLE_WRITE
415
+   #define E0_ENABLE_WRITE(STATE) (if(STATE) stepperE0.Step_Clock(stepperE0.getStatus() & STATUS_HIZ); else stepperE0.softFree();)
416
+   
417
+   #undef E0_ENABLE_READ
418
+   #define E0_ENABLE_READ (stepperE0.getStatus() & STATUS_HIZ)
419
+   
420
+   #undef E0_DIR_INIT 
421
+   #define E0_DIR_INIT ((void)0)
422
+   
423
+   #undef E0_DIR_WRITE
424
+   #define E0_DIR_WRITE(STATE) stepperE0.Step_Clock(STATE)
425
+   
426
+   #undef E0_DIR_READ
427
+   #define E0_DIR_READ (stepperE0.getStatus() & STATUS_DIR)    
428
+#endif
429
+#ifdef E1_IS_L6470
430
+   extern L6470 stepperE1;
431
+   #undef E1_ENABLE_INIT
432
+   #define E1_ENABLE_INIT ((void)0)
433
+   
434
+   #undef E1_ENABLE_WRITE
435
+   #define E1_ENABLE_WRITE(STATE) (if(STATE) stepperE1.Step_Clock(stepperE1.getStatus() & STATUS_HIZ); else stepperE1.softFree();)
436
+   
437
+   #undef E1_ENABLE_READ
438
+   #define E1_ENABLE_READ (stepperE1.getStatus() & STATUS_HIZ)
439
+   
440
+   #undef E1_DIR_INIT 
441
+   #define E1_DIR_INIT ((void)0)
442
+   
443
+   #undef E1_DIR_WRITE
444
+   #define E1_DIR_WRITE(STATE) stepperE1.Step_Clock(STATE)
445
+   
446
+   #undef E1_DIR_READ
447
+   #define E1_DIR_READ (stepperE1.getStatus() & STATUS_DIR)  
448
+#endif
449
+#ifdef E2_IS_L6470
450
+   extern L6470 stepperE2;
451
+   #undef E2_ENABLE_INIT
452
+   #define E2_ENABLE_INIT ((void)0)
453
+   
454
+   #undef E2_ENABLE_WRITE
455
+   #define E2_ENABLE_WRITE(STATE) (if(STATE) stepperE2.Step_Clock(stepperE2.getStatus() & STATUS_HIZ); else stepperE2.softFree();)
456
+   
457
+   #undef E2_ENABLE_READ
458
+   #define E2_ENABLE_READ (stepperE2.getStatus() & STATUS_HIZ)
459
+   
460
+   #undef E2_DIR_INIT 
461
+   #define E2_DIR_INIT ((void)0)
462
+   
463
+   #undef E2_DIR_WRITE
464
+   #define E2_DIR_WRITE(STATE) stepperE2.Step_Clock(STATE)
465
+   
466
+   #undef E2_DIR_READ
467
+   #define E2_DIR_READ (stepperE2.getStatus() & STATUS_DIR)  
468
+#endif
469
+#ifdef E3_IS_L6470
470
+   extern L6470 stepperE3;
471
+   #undef E3_ENABLE_INIT
472
+   #define E3_ENABLE_INIT ((void)0)
473
+   
474
+   #undef E3_ENABLE_WRITE
475
+   #define E3_ENABLE_WRITE(STATE) (if(STATE) stepperE3.Step_Clock(stepperE3.getStatus() & STATUS_HIZ); else stepperE3.softFree();)
476
+   
477
+   #undef E3_ENABLE_READ
478
+   #define E3_ENABLE_READ (stepperE3.getStatus() & STATUS_HIZ)
479
+   
480
+   #undef E3_DIR_INIT 
481
+   #define E3_DIR_INIT ((void)0)
482
+   
483
+   #undef E3_DIR_WRITE
484
+   #define E3_DIR_WRITE(STATE) stepperE3.Step_Clock(STATE)
485
+   
486
+   #undef E3_DIR_READ
487
+   #define E3_DIR_READ (stepperE3.getStatus() & STATUS_DIR)  
488
+#endif
489
+
490
+#endif  //HAVE_L6470DRIVER
491
+
492
+#endif // STEPPER_INDIRECTION_H

Loading…
Cancel
Save