Browse Source

updated addons for IDE 1.6.4

Bo Herrmannsen 9 years ago
parent
commit
2724baae8b
100 changed files with 45493 additions and 0 deletions
  1. 258
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/boards.txt
  2. 113
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/bootloaders/Gen7/bootloader-1284P-16MHz.hex
  3. 75
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/bootloaders/Gen7/bootloader-644-16MHz.hex
  4. 75
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/bootloaders/Gen7/bootloader-644-20MHz.hex
  5. 75
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/bootloaders/Gen7/bootloader-644P-16MHz.hex
  6. 75
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/bootloaders/Gen7/bootloader-644P-20MHz.hex
  7. 75
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/bootloaders/OMC/bootloader-644-20MHz.hex
  8. 1071
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/bootloaders/atmega/ATmegaBOOT_168.c
  9. 130
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/bootloaders/atmega/ATmegaBOOT_168_atmega1284p.hex
  10. 130
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/bootloaders/atmega/ATmegaBOOT_168_atmega1284p_8m.hex
  11. 126
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/bootloaders/atmega/ATmegaBOOT_168_atmega644p.hex
  12. 254
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/bootloaders/atmega/Makefile
  13. 117
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/bootloaders/atmega644p/ATmegaBOOT_1284P.hex
  14. 121
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/bootloaders/atmega644p/ATmegaBOOT_324P.hex
  15. 120
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/bootloaders/atmega644p/ATmegaBOOT_644.hex
  16. 121
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/bootloaders/atmega644p/ATmegaBOOT_644P.hex
  17. 723
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/L6470/L6470.cpp
  18. 286
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/L6470/L6470.h
  19. 53
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/L6470/keywords.txt
  20. 310
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/LiquidCrystal/LiquidCrystal.cpp
  21. 106
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/LiquidCrystal/LiquidCrystal.h
  22. 37
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/LiquidCrystal/keywords.txt
  23. 66
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/SPI/SPI.cpp
  24. 70
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/SPI/SPI.h
  25. 36
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/SPI/keywords.txt
  26. 17
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/TMC26XStepper/.gitignore
  27. 1813
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/TMC26XStepper/Doxyfile
  28. 10
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/TMC26XStepper/LICENSE
  29. 71
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/TMC26XStepper/README.rst
  30. 999
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/TMC26XStepper/TMC26XStepper.cpp
  31. 607
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/TMC26XStepper/TMC26XStepper.h
  32. 848
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/TMC26XStepper/documentation/html/_t_m_c26_x_stepper_8cpp.html
  33. 1067
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/TMC26XStepper/documentation/html/_t_m_c26_x_stepper_8cpp_source.html
  34. 212
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/TMC26XStepper/documentation/html/_t_m_c26_x_stepper_8h.html
  35. 256
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/TMC26XStepper/documentation/html/_t_m_c26_x_stepper_8h_source.html
  36. 72
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/TMC26XStepper/documentation/html/annotated.html
  37. BIN
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/TMC26XStepper/documentation/html/bc_s.png
  38. 117
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/TMC26XStepper/documentation/html/class_t_m_c26_x_stepper-members.html
  39. 1463
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/TMC26XStepper/documentation/html/class_t_m_c26_x_stepper.html
  40. 78
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/TMC26XStepper/documentation/html/classes.html
  41. BIN
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/TMC26XStepper/documentation/html/closed.png
  42. 949
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/TMC26XStepper/documentation/html/doxygen.css
  43. BIN
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/TMC26XStepper/documentation/html/doxygen.png
  44. 72
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/TMC26XStepper/documentation/html/files.html
  45. 261
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/TMC26XStepper/documentation/html/functions.html
  46. 261
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/TMC26XStepper/documentation/html/functions_func.html
  47. 289
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/TMC26XStepper/documentation/html/globals.html
  48. 289
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/TMC26XStepper/documentation/html/globals_defs.html
  49. 72
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/TMC26XStepper/documentation/html/index.html
  50. 64
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/TMC26XStepper/documentation/html/jquery.js
  51. 68
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/TMC26XStepper/documentation/html/mainpage_8dox.html
  52. BIN
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/TMC26XStepper/documentation/html/nav_f.png
  53. BIN
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/TMC26XStepper/documentation/html/nav_h.png
  54. BIN
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/TMC26XStepper/documentation/html/open.png
  55. BIN
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/TMC26XStepper/documentation/html/tab_a.png
  56. BIN
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/TMC26XStepper/documentation/html/tab_b.png
  57. BIN
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/TMC26XStepper/documentation/html/tab_h.png
  58. BIN
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/TMC26XStepper/documentation/html/tab_s.png
  59. 59
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/TMC26XStepper/documentation/html/tabs.css
  60. 82
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/TMC26XStepper/examples/TMC26XExample/TMC26XExample.ino
  61. 176
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/TMC26XStepper/examples/TMC26XMotorTester/Motor.ino
  62. 369
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/TMC26XStepper/examples/TMC26XMotorTester/Serial.ino
  63. 61
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/TMC26XStepper/examples/TMC26XMotorTester/TMC26XMotorTester.ino
  64. 306
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/TMC26XStepper/examples/TMC26XMotorTester/processing/TMC26XMotorTest/Arduino.pde
  65. 175
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/TMC26XStepper/examples/TMC26XMotorTester/processing/TMC26XMotorTest/ChopperConfiguration.pde
  66. 327
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/TMC26XStepper/examples/TMC26XMotorTester/processing/TMC26XMotorTest/DataRendering.pde
  67. 49
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/TMC26XStepper/examples/TMC26XMotorTester/processing/TMC26XMotorTest/DataTable.pde
  68. 335
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/TMC26XStepper/examples/TMC26XMotorTester/processing/TMC26XMotorTest/RunConfiguration.pde
  69. 156
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/TMC26XStepper/examples/TMC26XMotorTester/processing/TMC26XMotorTest/TMC26XMotorTest.pde
  70. BIN
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/TMC26XStepper/examples/TMC26XMotorTester/processing/TMC26XMotorTest/data/mc_logo.jpg
  71. BIN
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/TMC26XStepper/examples/TMC26XMotorTester/processing/TMC26XMotorTest/data/tmc_logo.jpg
  72. BIN
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/TMC26XStepper/examples/TMC26XMotorTester/processing/TMC26XMotorTest/hysteresis.png
  73. 2
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/TMC26XStepper/examples/TMC26XMotorTester/processing/TMC26XMotorTest/sketch.properties
  74. 75
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/TMC26XStepper/keywords.txt
  75. 30
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/TMC26XStepper/mainpage.dox
  76. 9797
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/TMC26XStepper/schematics/tmc-260-shield.brd
  77. 11079
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/TMC26XStepper/schematics/tmc-260-shield.sch
  78. 114
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/U8glib/ChangeLog
  79. 21
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/U8glib/INSTALL.TXT
  80. 80
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/U8glib/U8glib.cpp
  81. 826
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/U8glib/U8glib.h
  82. 130
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/U8glib/examples/Bitmap/Bitmap.pde
  83. 180
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/U8glib/examples/Chess/Chess.pde
  84. 230
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/U8glib/examples/Console/Console.pde
  85. 139
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/U8glib/examples/F/F.pde
  86. 223
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/U8glib/examples/GraphicsTest/GraphicsTest.pde
  87. 136
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/U8glib/examples/HelloWorld/HelloWorld.pde
  88. 234
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/U8glib/examples/Menu/Menu.pde
  89. 124
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/U8glib/examples/PrintTest/PrintTest.pde
  90. 152
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/U8glib/examples/Rotation/Rotation.pde
  91. 141
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/U8glib/examples/Scale/Scale.pde
  92. 154
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/U8glib/examples/TextRotX/TextRotX.pde
  93. 179
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/U8glib/examples/U8gLogo/U8gLogo.pde
  94. 136
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/U8glib/examples/XBM/XBM.pde
  95. 80
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/U8glib/license.txt
  96. 2392
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/U8glib/utility/chessengine.c
  97. 1607
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/U8glib/utility/u8g.h
  98. 177
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/U8glib/utility/u8g_bitmap.c
  99. 382
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/U8glib/utility/u8g_circle.c
  100. 0
    0
      ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/U8glib/utility/u8g_clip.c

+ 258
- 0
ArduinoAddons/Arduino_1.6.4+/Marlin/avr/boards.txt View File

@@ -0,0 +1,258 @@
1
+# See: https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification
2
+
3
+##############################################################
4
+
5
+menu.cpu=Processor
6
+
7
+########################################
8
+## RAMBo
9
+########################################
10
+rambo.name=RAMBo
11
+
12
+rambo.upload.tool=arduino:avrdude
13
+rambo.upload.protocol=wiring
14
+rambo.upload.maximum_size=258048
15
+rambo.upload.speed=115200
16
+
17
+rambo.bootloader.low_fuses=0xFF
18
+rambo.bootloader.high_fuses=0xD8
19
+rambo.bootloader.extended_fuses=0xFD
20
+rambo.bootloader.path=stk500v2
21
+rambo.bootloader.file=stk500boot_v2_mega2560.hex
22
+rambo.bootloader.unlock_bits=0x3F
23
+rambo.bootloader.lock_bits=0x0F
24
+
25
+rambo.build.mcu=atmega2560
26
+rambo.build.f_cpu=16000000L
27
+rambo.build.board=AVR_RAMBO
28
+rambo.build.core=arduino:arduino
29
+rambo.build.variant=rambo
30
+
31
+########################################
32
+## Sanguino
33
+########################################
34
+sanguino.name=Sanguino
35
+
36
+sanguino.upload.tool=arduino:avrdude
37
+sanguino.upload.protocol=stk500
38
+sanguino.upload.maximum_size=131072
39
+sanguino.upload.speed=57600
40
+
41
+sanguino.bootloader.low_fuses=0xD6
42
+sanguino.bootloader.high_fuses=0xDA
43
+sanguino.bootloader.extended_fuses=0xFD
44
+sanguino.bootloader.path=atmega
45
+sanguino.bootloader.unlock_bits=0x3F
46
+sanguino.bootloader.lock_bits=0x0F
47
+
48
+sanguino.build.mcu=atmega1284p
49
+sanguino.build.f_cpu=16000000L
50
+sanguino.build.board=AVR_SANGUINO
51
+sanguino.build.core=arduino:arduino
52
+sanguino.build.variant=sanguino
53
+
54
+sanguino.menu.cpu.atmega644=ATmega644P
55
+sanguino.menu.cpu.atmega644.upload.maximum_size=63488
56
+sanguino.menu.cpu.atmega644.bootloader.low_fuses=0xFF
57
+sanguino.menu.cpu.atmega644.bootloader.high_fuses=0x9A
58
+sanguino.menu.cpu.atmega644.bootloader.extended_fuses=0xFF
59
+sanguino.menu.cpu.atmega644.bootloader.file=ATmegaBOOT_168_atmega644p.hex
60
+sanguino.menu.cpu.atmega644.build.mcu=atmega644p
61
+
62
+sanguino.menu.cpu.atmega12848m=ATmega1284p 8MHz
63
+sanguino.menu.cpu.atmega12848m.upload.speed=19200
64
+sanguino.menu.cpu.atmega12848m.bootloader.file=ATmegaBOOT_168_atmega1284p_8m.hex
65
+sanguino.menu.cpu.atmega12848m.build.f_cpu=8000000L
66
+
67
+sanguino.menu.cpu.atmega1284=ATmega1284p 16MHz
68
+sanguino.menu.cpu.atmega1284.bootloader.file=ATmegaBOOT_168_atmega1284p.hex
69
+
70
+sanguino.menu.cpu.atmega1284m=ATmega1284p 20MHz
71
+sanguino.menu.cpu.atmega1284m.bootloader.file=ATmegaBOOT_168_atmega1284p.hex
72
+sanguino.menu.cpu.atmega1284m.build.f_cpu=20000000L
73
+
74
+
75
+########################################
76
+## Gen7
77
+########################################
78
+
79
+Gen7-644-16.name=Gen7 with ATmega644 and 16 MHz
80
+Gen7-644-16.upload.tool=
81
+Gen7-644-16.upload.protocol=stk500v2
82
+Gen7-644-16.upload.maximum_size=63488
83
+Gen7-644-16.upload.speed=115200
84
+
85
+Gen7-644-16.bootloader.low_fuses=0xF7
86
+Gen7-644-16.bootloader.high_fuses=0xDC
87
+Gen7-644-16.bootloader.extended_fuses=0xFC
88
+Gen7-644-16.bootloader.path=Gen7
89
+Gen7-644-16.bootloader.file=bootloader-644-16MHz.hex
90
+Gen7-644-16.bootloader.unlock_bits=0x3F
91
+Gen7-644-16.bootloader.lock_bits=0x0F
92
+
93
+Gen7-644-16.build.mcu=atmega644
94
+Gen7-644-16.build.f_cpu=16000000L
95
+Gen7-644-16.build.board=
96
+Gen7-644-16.build.core=arduino
97
+Gen7-644-16.build.variant=gen7
98
+
99
+***
100
+
101
+Gen7-644-20.name=Gen7 with ATmega644 and 20 MHz
102
+Gen7-644-20.upload.tool=
103
+Gen7-644-20.upload.protocol=stk500v2
104
+Gen7-644-20.upload.maximum_size=63488
105
+Gen7-644-20.upload.speed=115200
106
+
107
+Gen7-644-20.bootloader.low_fuses=0xF7
108
+Gen7-644-20.bootloader.high_fuses=0xDC
109
+Gen7-644-20.bootloader.extended_fuses=0xFC
110
+Gen7-644-20.bootloader.path=Gen7
111
+Gen7-644-20.bootloader.file=bootloader-644-20MHz.hex
112
+Gen7-644-20.bootloader.unlock_bits=0x3F
113
+Gen7-644-20.bootloader.lock_bits=0x0F
114
+
115
+Gen7-644-20.build.mcu=atmega644
116
+Gen7-644-20.build.f_cpu=20000000L
117
+Gen7-644-20.build.board=
118
+Gen7-644-20.build.core=arduino
119
+Gen7-644-20.build.variant=gen7
120
+
121
+***
122
+
123
+Gen7-644P-16.name=Gen7 with ATmega644P and 16 MHz
124
+Gen7-644P-16.upload.tool=
125
+Gen7-644P-16.upload.protocol=stk500v2
126
+Gen7-644P-16.upload.maximum_size=63488
127
+Gen7-644P-16.upload.speed=115200
128
+
129
+Gen7-644P-16.bootloader.low_fuses=0xF7
130
+Gen7-644P-16.bootloader.high_fuses=0xDC
131
+Gen7-644P-16.bootloader.extended_fuses=0xFC
132
+Gen7-644P-16.bootloader.path=Gen7
133
+Gen7-644P-16.bootloader.file=bootloader-644P-16MHz.hex
134
+Gen7-644P-16.bootloader.unlock_bits=0x3F
135
+Gen7-644P-16.bootloader.lock_bits=0x0F
136
+
137
+Gen7-644P-16.build.mcu=atmega644p
138
+Gen7-644P-16.build.f_cpu=16000000L
139
+Gen7-644P-16.build.board=
140
+Gen7-644P-16.build.core=arduino
141
+Gen7-644P-16.build.variant=gen7
142
+
143
+***
144
+
145
+Gen7-644P-20.name=Gen7 with ATmega644P and 20 MHz
146
+Gen7-644P-20.upload.tool=
147
+Gen7-644P-20.upload.protocol=stk500v2
148
+Gen7-644P-20.upload.maximum_size=63488
149
+Gen7-644P-20.upload.speed=115200
150
+
151
+Gen7-644P-20.bootloader.low_fuses=0xF7
152
+Gen7-644P-20.bootloader.high_fuses=0xDC
153
+Gen7-644P-20.bootloader.extended_fuses=0xFC
154
+Gen7-644P-20.bootloader.path=Gen7
155
+Gen7-644P-20.bootloader.file=bootloader-644P-20MHz.hex
156
+Gen7-644P-20.bootloader.unlock_bits=0x3F
157
+Gen7-644P-20.bootloader.lock_bits=0x0F
158
+
159
+Gen7-644P-20.build.mcu=atmega644p
160
+Gen7-644P-20.build.f_cpu=20000000L
161
+Gen7-644P-20.build.board=
162
+Gen7-644P-20.build.core=arduino
163
+Gen7-644P-20.build.variant=gen7
164
+
165
+***
166
+
167
+Gen7-1284P-16.name=Gen7 with ATmega1284P and 16 MHz
168
+Gen7-1284P-16.upload.tool=
169
+Gen7-1284P-16.upload.protocol=stk500v2
170
+Gen7-1284P-16.upload.maximum_size=129024
171
+Gen7-1284P-16.upload.speed=115200
172
+
173
+Gen7-1284P-16.bootloader.low_fuses=0xF7
174
+Gen7-1284P-16.bootloader.high_fuses=0xDC
175
+Gen7-1284P-16.bootloader.extended_fuses=0xFC
176
+Gen7-1284P-16.bootloader.path=Gen7
177
+Gen7-1284P-16.bootloader.file=bootloader-1284P-16MHz.hex
178
+Gen7-1284P-16.bootloader.unlock_bits=0x3F
179
+Gen7-1284P-16.bootloader.lock_bits=0x0F
180
+
181
+Gen7-1284P-16.build.mcu=atmega1284p
182
+Gen7-1284P-16.build.f_cpu=16000000L
183
+Gen7-1284P-16.build.board=
184
+Gen7-1284P-16.build.core=arduino
185
+Gen7-1284P-16.build.variant=gen7
186
+
187
+***
188
+
189
+Gen7-1284P-20.name=Gen7 with ATmega1284P and 20 MHz
190
+Gen7-1284P-20.upload.tool=
191
+Gen7-1284P-20.upload.protocol=stk500v2
192
+Gen7-1284P-20.upload.maximum_size=129024
193
+Gen7-1284P-20.upload.speed=115200
194
+
195
+Gen7-1284P-20.bootloader.low_fuses=0xF7
196
+Gen7-1284P-20.bootloader.high_fuses=0xDC
197
+Gen7-1284P-20.bootloader.extended_fuses=0xFC
198
+Gen7-1284P-20.bootloader.path=Gen7
199
+Gen7-1284P-20.bootloader.file=bootloader-1284P-20MHz.hex
200
+Gen7-1284P-20.bootloader.unlock_bits=0x3F
201
+Gen7-1284P-20.bootloader.lock_bits=0x0F
202
+
203
+Gen7-1284P-20.build.mcu=atmega1284p
204
+Gen7-1284P-20.build.f_cpu=20000000L
205
+Gen7-1284P-20.build.board=
206
+Gen7-1284P-20.build.core=arduino
207
+Gen7-1284P-20.build.variant=gen7
208
+
209
+########################################
210
+## Melzi W/ ATmega1284p 16mhz
211
+########################################
212
+
213
+melzi1284.name=Melzi W/ ATmega1284p 16mhz
214
+melzi1284.upload.tool=
215
+melzi1284.upload.protocol=arduino
216
+melzi1284.upload.maximum_size=129024
217
+melzi1284.upload.speed=57600
218
+
219
+melzi1284.bootloader.low_fuses=0xD6
220
+melzi1284.bootloader.high_fuses=0xD4
221
+melzi1284.bootloader.extended_fuses=0xFD
222
+melzi1284.bootloader.path=atmega644p
223
+melzi1284.bootloader.file=ATmegaBOOT_1284P.hex
224
+melzi1284.bootloader.unlock_bits=0x3F
225
+melzi1284.bootloader.lock_bits=0x0F
226
+
227
+melzi1284.build.mcu=atmega1284p
228
+melzi1284.build.f_cpu=16000000L
229
+melzi1284.build.board=
230
+melzi1284.build.core=arduino
231
+melzi1284.build.variant=Melzi
232
+
233
+########################################
234
+## OMC with Atmega644 at 20Mhz
235
+########################################
236
+
237
+omc.name=OMC with Atmega644 at 20Mhz
238
+omc.name.upload.tool=
239
+omc.upload.protocol=stk500v2
240
+omc.upload.maximum_size=63488
241
+omc.upload.maximum_data_size=4096
242
+omc.upload.speed=115200
243
+
244
+omc.bootloader.low_fuses=0xE7
245
+omc.bootloader.high_fuses=0xD4
246
+omc.bootloader.extended_fuses=0xFC
247
+omc.bootloader.path=OMC
248
+omc.bootloader.file=bootloader-644-20MHz.hex
249
+omc.bootloader.unlock_bits=0x3F
250
+omc.bootloader.lock_bits=0x0F
251
+
252
+omc.build.mcu=atmega644
253
+omc.build.f_cpu=20000000L
254
+omc.build.board=AVR_OMC
255
+omc.build.core=arduino:arduino
256
+omc.build.variant=omc
257
+
258
+

+ 113
- 0
ArduinoAddons/Arduino_1.6.4+/Marlin/avr/bootloaders/Gen7/bootloader-1284P-16MHz.hex View File

@@ -0,0 +1,113 @@
1
+:020000021000EC
2
+:10F8000011241FBE8FEF90E49EBF8DBF01C32F92C6
3
+:10F810003F924F925F926F927F928F929F92AF92A0
4
+:10F82000BF92CF92DF92EF92FF920F931F93DF93DD
5
+:10F83000CF93CDB7DEB7C252D1400FB6F894DEBF3A
6
+:10F840000FBECDBF44245524DD24C25EDE4F188296
7
+:10F85000CE51D1408824992454013AC20E9428FFF5
8
+:10F86000282F133059F1143028F4113081F0123060
9
+:10F8700000F507C0153081F1153030F1163071F701
10
+:10F880003DC08B3159F711E05BE1D52EE7CF8130D8
11
+:10F8900041F0C25EDE4F3881CE51D140831709F06E
12
+:10F8A00019C2D226C25EDE4F2883CE51D14012E06B
13
+:10F8B000D5CFF82EEE24D82613E0D0CF90E0E82A5A
14
+:10F8C000F92AD22614E0CACF8E3009F003C2D82616
15
+:10F8D00015E044245524C2CFE1E0F0E0EC0FFD1F19
16
+:10F8E000E40DF51D80830894411C511CD8264E144C
17
+:10F8F0005F0409F0B3CF720116E0B0CF8D1509F0A7
18
+:10F90000E9C1EAC1CC2447C08D81803311F090E079
19
+:10F910000AC08F81882311F49EE105C0813011F067
20
+:10F9200095E001C097E91A821B828D818C838E81BC
21
+:10F930008D839E831F8247E0E42EF12C88C11A82BA
22
+:10F9400068E06B8383E58C8394E59D83EBE4EE8331
23
+:10F9500085E38F8380E3888789878FE58A8782E3C1
24
+:10F960008B873BE0E32EF12C72C18A81813941F013
25
+:10F97000823941F0803911F48FE005C080E003C086
26
+:10F9800082E001C08AE01A828B8323E0E22EF12C10
27
+:10F990005EC1CC24C3941A8292E0E92EF12C58C1A6
28
+:10F9A0008D81882311F48EE128C0813011F085E02B
29
+:10F9B00024C087E922C01A8229E0E1E0F0E0209328
30
+:10F9C000570084911BC08B81803589F48C818830ED
31
+:10F9D00039F439E0E2E0F0E03093570084910DC053
32
+:10F9E00069E0E0E0F0E060935700849106C099E0A0
33
+:10F9F000E3E0F0E09093570084911A828B831C829D
34
+:10FA000084E0E82EF12C23C18A8190E0A0E0B0E0F0
35
+:10FA1000B82EAA24992488248B8190E0A0E0B0E03D
36
+:10FA2000DC0199278827882A992AAA2ABB2A8D814E
37
+:10FA300090E0A0E0B0E0882A992AAA2ABB2A8C810B
38
+:10FA400090E0A0E0B0E0BA2FA92F982F8827882A4D
39
+:10FA5000992AAA2ABB2A88C0EA81C05EDE4FE883C1
40
+:10FA6000C052D140C15EDE4F1882CF51D1408B8150
41
+:10FA7000A82FB0E0C15EDE4F28813981CF51D1403F
42
+:10FA8000A22BB32B933109F042C075016401CC0C59
43
+:10FA9000DD1CEE1CFF1C33E0F601E0925B003093AE
44
+:10FAA0005700E89507B600FCFDCF8E01055F1F4F9C
45
+:10FAB000F801808161810E5F1F4FA5019401220F23
46
+:10FAC000331F441F551F362E222490E0822993298C
47
+:10FAD00061E00C01F90140935B0060935700E895E9
48
+:10FAE00011240894811C911CA11CB11C129701F7D0
49
+:10FAF00085E0F601E0925B0080935700E89507B639
50
+:10FB000000FCFDCF81E180935700E8952DC0FE01F8
51
+:10FB10003B9620E030E040E050E011977D0100E0AE
52
+:10FB200010E00894E11CF11C011D111D6081F99980
53
+:10FB3000FECF1FBAC901880D991D92BD81BD60BD60
54
+:10FB40000FB6F894FA9AF99A0FBE2F5F3F4F4F4FB6
55
+:10FB50005F4F2E153F054007510711F03196E6CF54
56
+:10FB6000820E931EA41EB51E1A826EC09A81CE5DAF
57
+:10FB7000DE4F9883C252D140CF5DDE4F1882C15212
58
+:10FB8000D1408B81C82EDD24CF5DDE4FE881F98125
59
+:10FB9000C152D140CE2ADF2A1A8289818431E1F410
60
+:10FBA0009601BE016D5F7F4FD501C401880F991F7B
61
+:10FBB000AA1FBB1FABBFFC0187919691FB018083FD
62
+:10FBC00091836E5F7F4F0894811C911CA11CB11C16
63
+:10FBD0002250304049F72EC0BE016D5F7F4F20E0BC
64
+:10FBE00030E040E050E00894C108D108760100E020
65
+:10FBF00010E00894C11CD11C0894E11CF11C011DEB
66
+:10FC0000111DF999FECFC901880D991D92BD81BDC5
67
+:10FC1000F89A80B5FB018193BF012F5F3F4F4F4F93
68
+:10FC20005F4F2E153F054007510759F7820E931E6F
69
+:10FC3000A41EB51E23E0E22EF12CEC0CFD1CFB01F2
70
+:10FC4000108205C080EC8A8392E0E92EF12CCC244E
71
+:10FC50008BE10E94C7FEC25EDE4F8881CE51D1404B
72
+:10FC60000E94C7FE8F2D0E94C7FE8E2D0E94C7FEE8
73
+:10FC70008EE00E94C7FE85E1D82EC25EDE4FF8817D
74
+:10FC8000CE51D140DF26DE24DF243E010894611CE2
75
+:10FC9000711C0AC0F30111913F01812F0E94C7FE20
76
+:10FCA000D1260894E108F108E114F10499F78D2DAB
77
+:10FCB0000E94C7FECC2009F044C0C25EDE4FF8812E
78
+:10FCC000CE51D140FF5FC25EDE4FF883CE51D140AE
79
+:10FCD000EE24FF2410E0C2CD9981933109F4BCCE0B
80
+:10FCE0009431B0F4933009F440CE943038F491302C
81
+:10FCF00009F425CE923009F0A5CF04CE903109F455
82
+:10FD000001CE913109F445CE963009F09BCF7CCEDF
83
+:10FD1000983109F458CE993150F4953109F49CCEBC
84
+:10FD2000953108F423CF963109F08CCF1FCF9B314A
85
+:10FD300009F436CE9D3109F4E7CD9A3109F082CF2E
86
+:10FD40003ACECE5DDE4F0FB6F894DEBF0FBECDBF0C
87
+:10FD5000CF91DF911F910F91FF90EF90DF90CF90A7
88
+:10FD6000BF90AF909F908F907F906F905F904F90DB
89
+:10FD70003F902F9008958091C00087FFFCCF089599
90
+:10FD80008091C00087FFFCCF8091C6000895982F16
91
+:10FD90008091C00085FFFCCF9093C60008959B0121
92
+:10FDA000AC0197FF11C08091C00082608093C000B9
93
+:10FDB00050954095309521953F4F4F4F5F4F60E0F4
94
+:10FDC00074E284EF90E009C08091C0008D7F809341
95
+:10FDD000C00060E072E18AE790E00E9447FF2C5F7C
96
+:10FDE0003F4F4F4F5F4F83E0569547953795279587
97
+:10FDF0008A95D1F7215030403093C5002093C4003C
98
+:10FE0000089518B817B81F921F921F920895FFCF38
99
+:10FE100084B714BE90E083709070892B39F418B8C1
100
+:10FE200017B81F921F921F920895FFCF88E1809309
101
+:10FE3000C10060E07EE38EEF9FEF0E94CFFE0E9444
102
+:10FE400007FC18B817B81F921F921F920895FFCF92
103
+:10FE500020E030E040E050E013C02F5F3F4F4F4FB5
104
+:10FE60005F4F21308AE6380788E1480780E058076D
105
+:10FE700039F418B817B81F921F921F920895FFCF38
106
+:10FE80008091C00087FFE9CF0E94C0FE0895A1E2E3
107
+:10FE90001A2EAA1BBB1BFD010DC0AA1FBB1FEE1F04
108
+:10FEA000FF1FA217B307E407F50720F0A21BB30B4F
109
+:10FEB000E40BF50B661F771F881F991F1A9469F7CB
110
+:10FEC00060957095809590959B01AC01BD01CF0127
111
+:02FED000089593
112
+:040000031000F800F1
113
+:00000001FF

+ 75
- 0
ArduinoAddons/Arduino_1.6.4+/Marlin/avr/bootloaders/Gen7/bootloader-644-16MHz.hex View File

@@ -0,0 +1,75 @@
1
+:10F800008FEF90E19EBF8DBF11241FBE5A9A00C09A
2
+:10F81000CDB7DEB7CD51D140DEBFCDBF1092C50010
3
+:10F8200088E08093C40088E18093C100EE24FF2427
4
+:10F8300020E0552400E010E039E0432E9BE0292E23
5
+:10F84000312C2C0E3D1ECFC14150504060407040C5
6
+:10F8500011F43FE206C08091C00087FFF5CF3091E0
7
+:10F86000C600933021F1943028F4913099F0923011
8
+:10F87000C8F407C0953049F1953000F19630D1F5C4
9
+:10F8800035C03B3119F491E02BE134C03F3291F5A2
10
+:10F890003983BBC1313011F0351559F52327532E6B
11
+:10F8A00092E028C0B32FA0E0232793E023C0832F4A
12
+:10F8B00090E0A82BB92B232794E01CC03E30C9F45C
13
+:10F8C000232795E0EE24FF2415C0E1E0F0E0EC0FE3
14
+:10F8D000FD1FEE0DFF1D30830894E11CF11C232752
15
+:10F8E000EA16FB0639F4D70196E004C0321709F492
16
+:10F8F0008CC190E044E755E962E470E0ACCF90E061
17
+:10F9000044C08D81803311F090E00AC08F8188233C
18
+:10F9100011F49EE105C0813011F099E001C096E933
19
+:10F920001A821B828D818C838E818D839E831F82A0
20
+:10F9300047E050E0F4C01A8288E08B8381E48C8336
21
+:10F9400086E58D8382E58E8389E48F8383E58887CE
22
+:10F9500080E589878FE58A8782E38B874BE050E0DB
23
+:10F96000DEC08A81813941F0823941F0803911F459
24
+:10F970008FE005C080E003C082E001C08AE01A8207
25
+:10F980008B8343E050E0CBC091E01A8242E050E02C
26
+:10F99000C7C08D81882311F48EE124C0813011F01D
27
+:10F9A00089E020C086E91EC01A82E1E0F0E04092C2
28
+:10F9B0005700849118C08B81803579F48C81883010
29
+:10F9C00031F4E2E0F0E04092570084910BC0E0E0B7
30
+:10F9D000F0E040925700849105C0E3E0F0E04092EF
31
+:10F9E000570084911A828B831C8244E050E097C0B8
32
+:10F9F000BC80AA248D81082F10E00A291B29000F42
33
+:10FA0000111F1A828AC09A8088248B81682F70E027
34
+:10FA100068297929933109F033C0F7EF0F3F1F07A9
35
+:10FA200010F0A8013FC023E0F80120935700E895AB
36
+:10FA300007B600FCFDCFA801D1018C9111962C9145
37
+:10FA400011971296D22ECC2490E08C299D2921E08A
38
+:10FA5000FA010C0120935700E89511244E5F5F4F87
39
+:10FA60006250704051F725E0F80120935700E89567
40
+:10FA700007B600FCFDCF81E180935700E89512C0E6
41
+:10FA8000A801FB01D10141BD52BD4F5F5F4F8D9178
42
+:10FA900080BDFA9AF99AF999FECF3197A1F7A8019A
43
+:10FAA000460F571F1A828A0138C07A8066248B81DC
44
+:10FAB000A82FB0E0A629B7291A828981843191F450
45
+:10FAC000BD019E012D5F3F4FF80185919491F90191
46
+:10FAD000808391832E5F3F4F0E5F1F4F62507040B7
47
+:10FAE00099F713C0A801BD019E012D5F3F4F41BD95
48
+:10FAF00052BD4F5F5F4FF89A80B5F90181939F0126
49
+:10FB000061507040A1F70A0F1B1FAD014D5F5F4FA1
50
+:10FB1000F901108204C080EC8A8342E050E090E05A
51
+:10FB2000FBE1F093C6008091C00086FFFCCF80917E
52
+:10FB3000C00080648093C0005092C6008091C000D5
53
+:10FB400086FFFCCF8091C00080648093C000652F49
54
+:10FB50005093C6008091C00086FFFCCF8091C0000A
55
+:10FB600080648093C000342F4093C6008091C00011
56
+:10FB700086FFFCCF8091C00080648093C0008EE03F
57
+:10FB80008093C6008091C00086FFFCCF8091C000AA
58
+:10FB900080648093C00025E1252523272627FE01C8
59
+:10FBA000319610C030813093C6008091C00086FF2E
60
+:10FBB000FCCF31968091C00080648093C0002327E1
61
+:10FBC000415050404115510569F72093C60080917E
62
+:10FBD000C00086FFFCCF8091C00080648093C0008D
63
+:10FBE000992349F4539444E755E962E470E090E0C6
64
+:10FBF000A0E0B0E030CE5A9881E180935700E895BC
65
+:10FC000011241F921F920895FFCF9981933109F417
66
+:10FC1000FACE9431C8F4963009F4EACE973050F415
67
+:10FC2000923009F46CCE933009F49BCE913009F0F8
68
+:10FC300072CF81CE913109F4A7CE923108F0E1CE96
69
+:10FC4000903109F068CF5BCE983109F4B4CE993188
70
+:10FC500050F4953109F4D7CE953108F426CF96317A
71
+:10FC600009F059CF22CF9B3109F493CE9C3120F477
72
+:10FC70009A3109F050CF98CE9D3109F442CE9F328F
73
+:06FC800009F049CFB8CFE6
74
+:040000030000F80001
75
+:00000001FF

+ 75
- 0
ArduinoAddons/Arduino_1.6.4+/Marlin/avr/bootloaders/Gen7/bootloader-644-20MHz.hex View File

@@ -0,0 +1,75 @@
1
+:10F800008FEF90E19EBF8DBF11241FBE5A9A00C09A
2
+:10F81000CDB7DEB7CD51D140DEBFCDBF1092C50010
3
+:10F820008AE08093C40088E18093C100EE24FF2425
4
+:10F8300020E0552400E010E039E0432E9BE0292E23
5
+:10F84000312C2C0E3D1ECFC14150504060407040C5
6
+:10F8500011F43FE206C08091C00087FFF5CF3091E0
7
+:10F86000C600933021F1943028F4913099F0923011
8
+:10F87000C8F407C0953049F1953000F19630D1F5C4
9
+:10F8800035C03B3119F491E02BE134C03F3291F5A2
10
+:10F890003983BBC1313011F0351559F52327532E6B
11
+:10F8A00092E028C0B32FA0E0232793E023C0832F4A
12
+:10F8B00090E0A82BB92B232794E01CC03E30C9F45C
13
+:10F8C000232795E0EE24FF2415C0E1E0F0E0EC0FE3
14
+:10F8D000FD1FEE0DFF1D30830894E11CF11C232752
15
+:10F8E000EA16FB0639F4D70196E004C0321709F492
16
+:10F8F0008CC190E041ED5AE363E570E0ACCF90E05D
17
+:10F9000044C08D81803311F090E00AC08F8188233C
18
+:10F9100011F49EE105C0813011F099E001C096E933
19
+:10F920001A821B828D818C838E818D839E831F82A0
20
+:10F9300047E050E0F4C01A8288E08B8381E48C8336
21
+:10F9400086E58D8382E58E8389E48F8383E58887CE
22
+:10F9500080E589878FE58A8782E38B874BE050E0DB
23
+:10F96000DEC08A81813941F0823941F0803911F459
24
+:10F970008FE005C080E003C082E001C08AE01A8207
25
+:10F980008B8343E050E0CBC091E01A8242E050E02C
26
+:10F99000C7C08D81882311F48EE124C0813011F01D
27
+:10F9A00089E020C086E91EC01A82E1E0F0E04092C2
28
+:10F9B0005700849118C08B81803579F48C81883010
29
+:10F9C00031F4E2E0F0E04092570084910BC0E0E0B7
30
+:10F9D000F0E040925700849105C0E3E0F0E04092EF
31
+:10F9E000570084911A828B831C8244E050E097C0B8
32
+:10F9F000BC80AA248D81082F10E00A291B29000F42
33
+:10FA0000111F1A828AC09A8088248B81682F70E027
34
+:10FA100068297929933109F033C0F7EF0F3F1F07A9
35
+:10FA200010F0A8013FC023E0F80120935700E895AB
36
+:10FA300007B600FCFDCFA801D1018C9111962C9145
37
+:10FA400011971296D22ECC2490E08C299D2921E08A
38
+:10FA5000FA010C0120935700E89511244E5F5F4F87
39
+:10FA60006250704051F725E0F80120935700E89567
40
+:10FA700007B600FCFDCF81E180935700E89512C0E6
41
+:10FA8000A801FB01D10141BD52BD4F5F5F4F8D9178
42
+:10FA900080BDFA9AF99AF999FECF3197A1F7A8019A
43
+:10FAA000460F571F1A828A0138C07A8066248B81DC
44
+:10FAB000A82FB0E0A629B7291A828981843191F450
45
+:10FAC000BD019E012D5F3F4FF80185919491F90191
46
+:10FAD000808391832E5F3F4F0E5F1F4F62507040B7
47
+:10FAE00099F713C0A801BD019E012D5F3F4F41BD95
48
+:10FAF00052BD4F5F5F4FF89A80B5F90181939F0126
49
+:10FB000061507040A1F70A0F1B1FAD014D5F5F4FA1
50
+:10FB1000F901108204C080EC8A8342E050E090E05A
51
+:10FB2000FBE1F093C6008091C00086FFFCCF80917E
52
+:10FB3000C00080648093C0005092C6008091C000D5
53
+:10FB400086FFFCCF8091C00080648093C000652F49
54
+:10FB50005093C6008091C00086FFFCCF8091C0000A
55
+:10FB600080648093C000342F4093C6008091C00011
56
+:10FB700086FFFCCF8091C00080648093C0008EE03F
57
+:10FB80008093C6008091C00086FFFCCF8091C000AA
58
+:10FB900080648093C00025E1252523272627FE01C8
59
+:10FBA000319610C030813093C6008091C00086FF2E
60
+:10FBB000FCCF31968091C00080648093C0002327E1
61
+:10FBC000415050404115510569F72093C60080917E
62
+:10FBD000C00086FFFCCF8091C00080648093C0008D
63
+:10FBE000992349F4539441ED5AE363E570E090E0C2
64
+:10FBF000A0E0B0E030CE5A9881E180935700E895BC
65
+:10FC000011241F921F920895FFCF9981933109F417
66
+:10FC1000FACE9431C8F4963009F4EACE973050F415
67
+:10FC2000923009F46CCE933009F49BCE913009F0F8
68
+:10FC300072CF81CE913109F4A7CE923108F0E1CE96
69
+:10FC4000903109F068CF5BCE983109F4B4CE993188
70
+:10FC500050F4953109F4D7CE953108F426CF96317A
71
+:10FC600009F059CF22CF9B3109F493CE9C3120F477
72
+:10FC70009A3109F050CF98CE9D3109F442CE9F328F
73
+:06FC800009F049CFB8CFE6
74
+:040000030000F80001
75
+:00000001FF

+ 75
- 0
ArduinoAddons/Arduino_1.6.4+/Marlin/avr/bootloaders/Gen7/bootloader-644P-16MHz.hex View File

@@ -0,0 +1,75 @@
1
+:10F800008FEF90E19EBF8DBF11241FBE5A9A00C09A
2
+:10F81000CDB7DEB7CD51D140DEBFCDBF1092C50010
3
+:10F8200088E08093C40088E18093C100EE24FF2427
4
+:10F8300020E0552400E010E039E0432E93E0292E2B
5
+:10F84000312C2C0E3D1ECDC14150504060407040C7
6
+:10F8500011F43FE206C08091C00087FFF5CF3091E0
7
+:10F86000C600933021F1943028F4913099F0923011
8
+:10F87000C8F407C0953049F1953000F19630D1F5C4
9
+:10F8800035C03B3119F491E02BE134C03F3291F5A2
10
+:10F890003983B9C1313011F0351559F52327532E6D
11
+:10F8A00092E028C0B32FA0E0232793E023C0832F4A
12
+:10F8B00090E0A82BB92B232794E01CC03E30C9F45C
13
+:10F8C000232795E0EE24FF2415C0E1E0F0E0EC0FE3
14
+:10F8D000FD1FEE0DFF1D30830894E11CF11C232752
15
+:10F8E000EA16FB0639F4D70196E004C0321709F492
16
+:10F8F0008AC190E044E755E962E470E0ACCF90E063
17
+:10F9000044C08D81803311F090E00AC08F8188233C
18
+:10F9100011F49EE105C0813011F09AE001C096E932
19
+:10F920001A821B828D818C838E818D839E831F82A0
20
+:10F9300047E050E0F2C01A8288E08B8381E48C8338
21
+:10F9400086E58D8382E58E8389E48F8383E58887CE
22
+:10F9500080E589878FE58A8782E38B874BE050E0DB
23
+:10F96000DCC08A81813941F0823941F0803911F45B
24
+:10F970008FE005C080E003C082E001C08AE01A8207
25
+:10F980008B8343E050E0C9C091E01A8242E050E02E
26
+:10F99000C5C08D81882311F48EE124C0813011F01F
27
+:10F9A0008AE020C086E91EC01A82E1E0F0E04092C1
28
+:10F9B0005700849118C08B81803579F48C81883010
29
+:10F9C00031F4E2E0F0E04092570084910BC0E0E0B7
30
+:10F9D000F0E040925700849105C0E3E0F0E04092EF
31
+:10F9E000570084911A828B831C8244E050E095C0BA
32
+:10F9F000BC80AA248D81082F10E00A291B29000F42
33
+:10FA0000111F1A8288C09A8088248B81682F70E029
34
+:10FA100068297929933109F034C0F7EF0F3F1F07A8
35
+:10FA200010F0A80141C023E0F80120935700E895A9
36
+:10FA300007B600FCFDCFA801DE011B968C91119644
37
+:10FA40002C9111971296D22ECC2490E08C299D29CE
38
+:10FA500021E0FA010C0120935700E89511244E5F34
39
+:10FA60005F4F6250704051F725E0F8012093570036
40
+:10FA7000E89507B600FCFDCF81E180935700E8953B
41
+:10FA800013C0A801FB01DE011B9641BD52BD4F5FB3
42
+:10FA90005F4F8D9180BDFA9AF99AF999FECF31970F
43
+:10FAA000A1F7A801460F571F1A828A0134C07A8035
44
+:10FAB00066248B81A82FB0E0A629B7291A828981F4
45
+:10FAC000843181F4BD019101F80185919491F9018E
46
+:10FAD000808391832E5F3F4F0E5F1F4F62507040B7
47
+:10FAE00099F711C0A801BD01910141BD52BD4F5F01
48
+:10FAF0005F4FF89A80B5F90181939F016150704082
49
+:10FB0000A1F70A0F1B1FAD014D5F5F4FF901108276
50
+:10FB100004C080EC8A8342E050E090E0FBE1F09387
51
+:10FB2000C6008091C00086FFFCCF8091C000806439
52
+:10FB30008093C0005092C6008091C00086FFFCCF29
53
+:10FB40008091C00080648093C000652F5093C600F0
54
+:10FB50008091C00086FFFCCF8091C00080648093BC
55
+:10FB6000C000342F4093C6008091C00086FFFCCFB8
56
+:10FB70008091C00080648093C0008EE08093C600B6
57
+:10FB80008091C00086FFFCCF8091C000806480938C
58
+:10FB9000C00025E1252523272627FE01319610C028
59
+:10FBA00030813093C6008091C00086FFFCCF319633
60
+:10FBB0008091C00080648093C00023274150504052
61
+:10FBC0004115510569F72093C6008091C00086FF5A
62
+:10FBD000FCCF8091C00080648093C000992349F4D9
63
+:10FBE000539444E755E962E470E090E0A0E0B0E0AF
64
+:10FBF00032CE5A9881E180935700E89511241F92E4
65
+:10FC00001F920895FFCF9981933109F4FCCE94316E
66
+:10FC1000C8F4963009F4ECCE973050F4923009F4E1
67
+:10FC20006ECE933009F49DCE913009F072CF83CE21
68
+:10FC3000913109F4A9CE923108F0E3CE903109F068
69
+:10FC400068CF5DCE983109F4B6CE993150F4953134
70
+:10FC500009F4D9CE953108F42ACF963109F059CF5D
71
+:10FC600026CF9B3109F495CE9C3120F49A3109F0CE
72
+:10FC700050CF9ACE9D3109F444CE9F3209F049CF3E
73
+:02FC8000B8CFFB
74
+:040000030000F80001
75
+:00000001FF

+ 75
- 0
ArduinoAddons/Arduino_1.6.4+/Marlin/avr/bootloaders/Gen7/bootloader-644P-20MHz.hex View File

@@ -0,0 +1,75 @@
1
+:10F800008FEF90E19EBF8DBF11241FBE5A9A00C09A
2
+:10F81000CDB7DEB7CD51D140DEBFCDBF1092C50010
3
+:10F820008AE08093C40088E18093C100EE24FF2425
4
+:10F8300020E0552400E010E039E0432E93E0292E2B
5
+:10F84000312C2C0E3D1ECDC14150504060407040C7
6
+:10F8500011F43FE206C08091C00087FFF5CF3091E0
7
+:10F86000C600933021F1943028F4913099F0923011
8
+:10F87000C8F407C0953049F1953000F19630D1F5C4
9
+:10F8800035C03B3119F491E02BE134C03F3291F5A2
10
+:10F890003983B9C1313011F0351559F52327532E6D
11
+:10F8A00092E028C0B32FA0E0232793E023C0832F4A
12
+:10F8B00090E0A82BB92B232794E01CC03E30C9F45C
13
+:10F8C000232795E0EE24FF2415C0E1E0F0E0EC0FE3
14
+:10F8D000FD1FEE0DFF1D30830894E11CF11C232752
15
+:10F8E000EA16FB0639F4D70196E004C0321709F492
16
+:10F8F0008AC190E041ED5AE363E570E0ACCF90E05F
17
+:10F9000044C08D81803311F090E00AC08F8188233C
18
+:10F9100011F49EE105C0813011F09AE001C096E932
19
+:10F920001A821B828D818C838E818D839E831F82A0
20
+:10F9300047E050E0F2C01A8288E08B8381E48C8338
21
+:10F9400086E58D8382E58E8389E48F8383E58887CE
22
+:10F9500080E589878FE58A8782E38B874BE050E0DB
23
+:10F96000DCC08A81813941F0823941F0803911F45B
24
+:10F970008FE005C080E003C082E001C08AE01A8207
25
+:10F980008B8343E050E0C9C091E01A8242E050E02E
26
+:10F99000C5C08D81882311F48EE124C0813011F01F
27
+:10F9A0008AE020C086E91EC01A82E1E0F0E04092C1
28
+:10F9B0005700849118C08B81803579F48C81883010
29
+:10F9C00031F4E2E0F0E04092570084910BC0E0E0B7
30
+:10F9D000F0E040925700849105C0E3E0F0E04092EF
31
+:10F9E000570084911A828B831C8244E050E095C0BA
32
+:10F9F000BC80AA248D81082F10E00A291B29000F42
33
+:10FA0000111F1A8288C09A8088248B81682F70E029
34
+:10FA100068297929933109F034C0F7EF0F3F1F07A8
35
+:10FA200010F0A80141C023E0F80120935700E895A9
36
+:10FA300007B600FCFDCFA801DE011B968C91119644
37
+:10FA40002C9111971296D22ECC2490E08C299D29CE
38
+:10FA500021E0FA010C0120935700E89511244E5F34
39
+:10FA60005F4F6250704051F725E0F8012093570036
40
+:10FA7000E89507B600FCFDCF81E180935700E8953B
41
+:10FA800013C0A801FB01DE011B9641BD52BD4F5FB3
42
+:10FA90005F4F8D9180BDFA9AF99AF999FECF31970F
43
+:10FAA000A1F7A801460F571F1A828A0134C07A8035
44
+:10FAB00066248B81A82FB0E0A629B7291A828981F4
45
+:10FAC000843181F4BD019101F80185919491F9018E
46
+:10FAD000808391832E5F3F4F0E5F1F4F62507040B7
47
+:10FAE00099F711C0A801BD01910141BD52BD4F5F01
48
+:10FAF0005F4FF89A80B5F90181939F016150704082
49
+:10FB0000A1F70A0F1B1FAD014D5F5F4FF901108276
50
+:10FB100004C080EC8A8342E050E090E0FBE1F09387
51
+:10FB2000C6008091C00086FFFCCF8091C000806439
52
+:10FB30008093C0005092C6008091C00086FFFCCF29
53
+:10FB40008091C00080648093C000652F5093C600F0
54
+:10FB50008091C00086FFFCCF8091C00080648093BC
55
+:10FB6000C000342F4093C6008091C00086FFFCCFB8
56
+:10FB70008091C00080648093C0008EE08093C600B6
57
+:10FB80008091C00086FFFCCF8091C000806480938C
58
+:10FB9000C00025E1252523272627FE01319610C028
59
+:10FBA00030813093C6008091C00086FFFCCF319633
60
+:10FBB0008091C00080648093C00023274150504052
61
+:10FBC0004115510569F72093C6008091C00086FF5A
62
+:10FBD000FCCF8091C00080648093C000992349F4D9
63
+:10FBE000539441ED5AE363E570E090E0A0E0B0E0AB
64
+:10FBF00032CE5A9881E180935700E89511241F92E4
65
+:10FC00001F920895FFCF9981933109F4FCCE94316E
66
+:10FC1000C8F4963009F4ECCE973050F4923009F4E1
67
+:10FC20006ECE933009F49DCE913009F072CF83CE21
68
+:10FC3000913109F4A9CE923108F0E3CE903109F068
69
+:10FC400068CF5DCE983109F4B6CE993150F4953134
70
+:10FC500009F4D9CE953108F42ACF963109F059CF5D
71
+:10FC600026CF9B3109F495CE9C3120F49A3109F0CE
72
+:10FC700050CF9ACE9D3109F444CE9F3209F049CF3E
73
+:02FC8000B8CFFB
74
+:040000030000F80001
75
+:00000001FF

+ 75
- 0
ArduinoAddons/Arduino_1.6.4+/Marlin/avr/bootloaders/OMC/bootloader-644-20MHz.hex View File

@@ -0,0 +1,75 @@
1
+:10F800008FEF90E19EBF8DBF11241FBE5A9A00C09A
2
+:10F81000CDB7DEB7CD51D140DEBFCDBF1092C50010
3
+:10F820008AE08093C40088E18093C100EE24FF2425
4
+:10F8300020E0552400E010E039E0432E9BE0292E23
5
+:10F84000312C2C0E3D1ECFC14150504060407040C5
6
+:10F8500011F43FE206C08091C00087FFF5CF3091E0
7
+:10F86000C600933021F1943028F4913099F0923011
8
+:10F87000C8F407C0953049F1953000F19630D1F5C4
9
+:10F8800035C03B3119F491E02BE134C03F3291F5A2
10
+:10F890003983BBC1313011F0351559F52327532E6B
11
+:10F8A00092E028C0B32FA0E0232793E023C0832F4A
12
+:10F8B00090E0A82BB92B232794E01CC03E30C9F45C
13
+:10F8C000232795E0EE24FF2415C0E1E0F0E0EC0FE3
14
+:10F8D000FD1FEE0DFF1D30830894E11CF11C232752
15
+:10F8E000EA16FB0639F4D70196E004C0321709F492
16
+:10F8F0008CC190E041ED5AE363E570E0ACCF90E05D
17
+:10F9000044C08D81803311F090E00AC08F8188233C
18
+:10F9100011F49EE105C0813011F099E001C096E933
19
+:10F920001A821B828D818C838E818D839E831F82A0
20
+:10F9300047E050E0F4C01A8288E08B8381E48C8336
21
+:10F9400086E58D8382E58E8389E48F8383E58887CE
22
+:10F9500080E589878FE58A8782E38B874BE050E0DB
23
+:10F96000DEC08A81813941F0823941F0803911F459
24
+:10F970008FE005C080E003C082E001C08AE01A8207
25
+:10F980008B8343E050E0CBC091E01A8242E050E02C
26
+:10F99000C7C08D81882311F48EE124C0813011F01D
27
+:10F9A00089E020C086E91EC01A82E1E0F0E04092C2
28
+:10F9B0005700849118C08B81803579F48C81883010
29
+:10F9C00031F4E2E0F0E04092570084910BC0E0E0B7
30
+:10F9D000F0E040925700849105C0E3E0F0E04092EF
31
+:10F9E000570084911A828B831C8244E050E097C0B8
32
+:10F9F000BC80AA248D81082F10E00A291B29000F42
33
+:10FA0000111F1A828AC09A8088248B81682F70E027
34
+:10FA100068297929933109F033C0F7EF0F3F1F07A9
35
+:10FA200010F0A8013FC023E0F80120935700E895AB
36
+:10FA300007B600FCFDCFA801D1018C9111962C9145
37
+:10FA400011971296D22ECC2490E08C299D2921E08A
38
+:10FA5000FA010C0120935700E89511244E5F5F4F87
39
+:10FA60006250704051F725E0F80120935700E89567
40
+:10FA700007B600FCFDCF81E180935700E89512C0E6
41
+:10FA8000A801FB01D10141BD52BD4F5F5F4F8D9178
42
+:10FA900080BDFA9AF99AF999FECF3197A1F7A8019A
43
+:10FAA000460F571F1A828A0138C07A8066248B81DC
44
+:10FAB000A82FB0E0A629B7291A828981843191F450
45
+:10FAC000BD019E012D5F3F4FF80185919491F90191
46
+:10FAD000808391832E5F3F4F0E5F1F4F62507040B7
47
+:10FAE00099F713C0A801BD019E012D5F3F4F41BD95
48
+:10FAF00052BD4F5F5F4FF89A80B5F90181939F0126
49
+:10FB000061507040A1F70A0F1B1FAD014D5F5F4FA1
50
+:10FB1000F901108204C080EC8A8342E050E090E05A
51
+:10FB2000FBE1F093C6008091C00086FFFCCF80917E
52
+:10FB3000C00080648093C0005092C6008091C000D5
53
+:10FB400086FFFCCF8091C00080648093C000652F49
54
+:10FB50005093C6008091C00086FFFCCF8091C0000A
55
+:10FB600080648093C000342F4093C6008091C00011
56
+:10FB700086FFFCCF8091C00080648093C0008EE03F
57
+:10FB80008093C6008091C00086FFFCCF8091C000AA
58
+:10FB900080648093C00025E1252523272627FE01C8
59
+:10FBA000319610C030813093C6008091C00086FF2E
60
+:10FBB000FCCF31968091C00080648093C0002327E1
61
+:10FBC000415050404115510569F72093C60080917E
62
+:10FBD000C00086FFFCCF8091C00080648093C0008D
63
+:10FBE000992349F4539441ED5AE363E570E090E0C2
64
+:10FBF000A0E0B0E030CE5A9881E180935700E895BC
65
+:10FC000011241F921F920895FFCF9981933109F417
66
+:10FC1000FACE9431C8F4963009F4EACE973050F415
67
+:10FC2000923009F46CCE933009F49BCE913009F0F8
68
+:10FC300072CF81CE913109F4A7CE923108F0E1CE96
69
+:10FC4000903109F068CF5BCE983109F4B4CE993188
70
+:10FC500050F4953109F4D7CE953108F426CF96317A
71
+:10FC600009F059CF22CF9B3109F493CE9C3120F477
72
+:10FC70009A3109F050CF98CE9D3109F442CE9F328F
73
+:06FC800009F049CFB8CFE6
74
+:040000030000F80001
75
+:00000001FF

+ 1071
- 0
ArduinoAddons/Arduino_1.6.4+/Marlin/avr/bootloaders/atmega/ATmegaBOOT_168.c
File diff suppressed because it is too large
View File


+ 130
- 0
ArduinoAddons/Arduino_1.6.4+/Marlin/avr/bootloaders/atmega/ATmegaBOOT_168_atmega1284p.hex View File

@@ -0,0 +1,130 @@
1
+:020000021000EC
2
+:10F000000C9446F80C9465F80C9465F80C9465F82B
3
+:10F010000C9465F80C9465F80C9465F80C9465F8FC
4
+:10F020000C9465F80C9465F80C9465F80C9465F8EC
5
+:10F030000C9465F80C9465F80C9465F80C9465F8DC
6
+:10F040000C9465F80C9465F80C9465F80C9465F8CC
7
+:10F050000C9465F80C9465F80C9465F80C9465F8BC
8
+:10F060000C9465F80C9465F80C9465F80C9465F8AC
9
+:10F070000C9465F80C9465F80C9465F80C9465F89C
10
+:10F080000C9465F80C9465F80C9465F811241FBE77
11
+:10F09000CFEFD0E4DEBFCDBF11E0A0E0B1E0E8EDFE
12
+:10F0A000F7EF01E00BBF02C007900D92A230B1074D
13
+:10F0B000D9F712E0A2E0B1E001C01D92AD30B10776
14
+:10F0C000E1F70E947EF90C94EAFB0C9400F8909111
15
+:10F0D0000201913019F0923041F008959091C000F2
16
+:10F0E00095FFFCCF8093C60008959091C80095FFCE
17
+:10F0F000FCCF8093CE0008951F93982F95959595FA
18
+:10F1000095959595905D182F1F701A304CF4105DF1
19
+:10F11000892F0E9467F8812F0E9467F81F91089538
20
+:10F12000195A892F0E9467F8812F0E9467F81F9152
21
+:10F130000895EF92FF920F931F9380910201813007
22
+:10F1400069F1823031F080E01F910F91FF90EF90D4
23
+:10F150000895EE24FF2487018091C80087FD17C021
24
+:10F160000894E11CF11C011D111D81E4E81682E4E4
25
+:10F17000F8068FE0080780E0180770F3E0910401BB
26
+:10F18000F091050109958091C80087FFE9CF809132
27
+:10F19000CE001F910F91FF90EF900895EE24FF2471
28
+:10F1A00087018091C00087FD17C00894E11CF11C05
29
+:10F1B000011D111D81E4E81682E4F8068FE00807BE
30
+:10F1C00080E0180770F3E0910401F09105010995C2
31
+:10F1D0008091C00087FFE9CF8091C6001F910F91F9
32
+:10F1E000FF90EF9008951F930E9499F8182F0E94A6
33
+:10F1F00067F8113634F410330CF01053812F1F913F
34
+:10F2000008951755812F1F9108951F930E94F3F8B9
35
+:10F21000182F0E94F3F81295107F810F1F91089507
36
+:10F2200020910201882339F0213031F0223061F041
37
+:10F2300081508823C9F708959091C00097FFFCCFB3
38
+:10F240009091C6008150F5CF9091C80097FFFCCFF8
39
+:10F250009091CE008150EDCF1F93182F0E9499F806
40
+:10F26000803281F0809103018F5F809303018530AC
41
+:10F2700011F01F910895E0910401F09105010995A5
42
+:10F280001F91089584E10E9467F8812F0E9467F81A
43
+:10F2900080E10E9467F8EDCF0E9499F8803271F00A
44
+:10F2A000809103018F5F80930301853009F00895F9
45
+:10F2B000E0910401F09105010995089584E10E940F
46
+:10F2C00067F880E10E9467F8089515C0289A2FEF2B
47
+:10F2D00031EE44E0215030404040E1F700C00000F2
48
+:10F2E00028982FEF31EE44E0215030404040E1F7C4
49
+:10F2F00000C000008150882349F70895EF92FF92E3
50
+:10F300000F931F93CF93DF93000081E0809302015E
51
+:10F3100080E18093C4001092C5001092C00086E086
52
+:10F320008093C20088E18093C100209A81E00E940E
53
+:10F3300065F90E9499F88033B1F18133B9F18034D5
54
+:10F3400009F454C0813409F45AC0823409F469C004
55
+:10F35000853409F46CC0803531F1823521F1813575
56
+:10F3600011F1853509F469C0863509F471C0843618
57
+:10F3700009F47AC0843709F4E1C0853709F43FC144
58
+:10F38000863709F44AC0809103018F5F809303019F
59
+:10F39000853079F6E0910401F091050109950E940C
60
+:10F3A00099F8803351F60E944CF9C3CF0E9499F826
61
+:10F3B000803249F784E10E9467F881E40E9467F88F
62
+:10F3C00086E50E9467F882E50E9467F880E20E9465
63
+:10F3D00067F889E40E9467F883E50E9467F880E592
64
+:10F3E0000E9467F880E10E9467F8A3CF0E9499F815
65
+:10F3F0008638C8F20E9499F80E944CF99ACF0E9470
66
+:10F4000099F8803809F414C1813809F415C182389B
67
+:10F4100009F416C1883909F407C180E00E942CF96B
68
+:10F4200088CF84E10E9410F90E944CF982CF85E0D8
69
+:10F430000E9410F90E944CF97CCF0E9499F88093A9
70
+:10F4400006010E9499F8809307010E944CF971CF40
71
+:10F450000E9499F8803309F405C183E00E9410F9F5
72
+:10F4600080E00E942CF965CF0E9499F880930902F0
73
+:10F470000E9499F88093080280910C028E7F8093FD
74
+:10F480000C020E9499F8853409F4FDC080910802AD
75
+:10F49000909109020097A1F068E0E62E61E0F62E57
76
+:10F4A00000E010E00E9499F8F70181937F010F5F5F
77
+:10F4B0001F4F80910802909109020817190790F3D5
78
+:10F4C0000E9499F8803209F05ECF80910C0280FF93
79
+:10F4D000ECC08091060190910701880F991F9093CD
80
+:10F4E000070180930601209108023091090221153D
81
+:10F4F0003105E9F048E0E42E41E0F42E00E010E0B0
82
+:10F50000F70161917F010E94DCFB809106019091DF
83
+:10F510000701019690930701809306010F5F1F4F2B
84
+:10F5200020910802309109020217130748F384E181
85
+:10F530000E9467F880E10E9467F8FBCE0E9499F86C
86
+:10F54000809309020E9499F8809308028091060135
87
+:10F550009091070197FDA3C020910C022D7F20936D
88
+:10F560000C02880F991F90930701809306010E9457
89
+:10F5700099F8853409F48DC080910C028E7F8093B8
90
+:10F580000C020E9499F8803209F0D3CE84E10E94E7
91
+:10F5900067F88091080290910902009709F440C031
92
+:10F5A00000E010E0809106019091070116C0FC0177
93
+:10F5B00084910E9467F8809106019091070101965D
94
+:10F5C00090930701809306010F5F1F4F209108025F
95
+:10F5D000309109020217130718F520910C0220FD43
96
+:10F5E00033C021FFE4CFA0E0B0E080509040AF4FA7
97
+:10F5F000BF4FABBFFC0187910E9467F8DCCF0E9430
98
+:10F6000099F8803209F0BFCE84E10E9467F88EE15C
99
+:10F610000E9467F887E90E9467F885E00E9467F812
100
+:10F6200080E10E9467F885CE83E00E942CF981CEAC
101
+:10F6300082E00E942CF97DCE81E00E942CF979CEE7
102
+:10F6400080E10E942CF975CE0E94D4FB0E9467F8DD
103
+:10F650008091060190910701019690930701809394
104
+:10F660000601B2CF0E9499F80E9499F8082F0E94D3
105
+:10F6700099F8002309F48BC0013009F48CC085E0AF
106
+:10F680000E942CF956CE80910C02816080930C026E
107
+:10F69000FDCE80910C02816080930C0272CF20918C
108
+:10F6A0000C02226020930C025CCF8091070187FD41
109
+:10F6B00076C010920B0280E08BBF80910601909182
110
+:10F6C0000701880F991F909307018093060180918D
111
+:10F6D000080280FF09C080910802909109020196FA
112
+:10F6E0009093090280930802F894F999FECF1127AC
113
+:10F6F000E0910601F0910701C8E0D1E08091080295
114
+:10F7000090910902103091F400915700017001307E
115
+:10F71000D9F303E000935700E8950091570001707A
116
+:10F720000130D9F301E100935700E8950990199051
117
+:10F730000091570001700130D9F301E000935700A8
118
+:10F74000E8951395103898F0112700915700017033
119
+:10F750000130D9F305E000935700E8950091570078
120
+:10F7600001700130D9F301E100935700E89532961A
121
+:10F77000029709F0C7CF103011F00296E5CF11249F
122
+:10F7800084E10E9467F880E10E9467F8D2CD8EE1A3
123
+:10F790000E942CF9CECD87E90E942CF9CACDF1E068
124
+:10F7A000F0930B0281E088CFF999FECF92BD81BD25
125
+:10F7B000F89A992780B50895262FF999FECF1FBA98
126
+:10F7C00092BD81BD20BD0FB6F894FA9AF99A0FBE8A
127
+:08F7D00001960895F894FFCFA3
128
+:02F7D8008000AF
129
+:040000031000F000F9
130
+:00000001FF

+ 130
- 0
ArduinoAddons/Arduino_1.6.4+/Marlin/avr/bootloaders/atmega/ATmegaBOOT_168_atmega1284p_8m.hex View File

@@ -0,0 +1,130 @@
1
+:020000021000EC
2
+:10F000000C9446F80C9465F80C9465F80C9465F82B
3
+:10F010000C9465F80C9465F80C9465F80C9465F8FC
4
+:10F020000C9465F80C9465F80C9465F80C9465F8EC
5
+:10F030000C9465F80C9465F80C9465F80C9465F8DC
6
+:10F040000C9465F80C9465F80C9465F80C9465F8CC
7
+:10F050000C9465F80C9465F80C9465F80C9465F8BC
8
+:10F060000C9465F80C9465F80C9465F80C9465F8AC
9
+:10F070000C9465F80C9465F80C9465F80C9465F89C
10
+:10F080000C9465F80C9465F80C9465F811241FBE77
11
+:10F09000CFEFD0E4DEBFCDBF11E0A0E0B1E0E8EDFE
12
+:10F0A000F7EF01E00BBF02C007900D92A230B1074D
13
+:10F0B000D9F712E0A2E0B1E001C01D92AD30B10776
14
+:10F0C000E1F70E947EF90C94EAFB0C9400F8909111
15
+:10F0D0000201913019F0923041F008959091C000F2
16
+:10F0E00095FFFCCF8093C60008959091C80095FFCE
17
+:10F0F000FCCF8093CE0008951F93982F95959595FA
18
+:10F1000095959595905D182F1F701A304CF4105DF1
19
+:10F11000892F0E9467F8812F0E9467F81F91089538
20
+:10F12000195A892F0E9467F8812F0E9467F81F9152
21
+:10F130000895EF92FF920F931F9380910201813007
22
+:10F1400069F1823031F080E01F910F91FF90EF90D4
23
+:10F150000895EE24FF2487018091C80087FD17C021
24
+:10F160000894E11CF11C011D111D81E2E81681EAE1
25
+:10F17000F80687E0080780E0180770F3E0910401C3
26
+:10F18000F091050109958091C80087FFE9CF809132
27
+:10F19000CE001F910F91FF90EF900895EE24FF2471
28
+:10F1A00087018091C00087FD17C00894E11CF11C05
29
+:10F1B000011D111D81E2E81681EAF80687E00807C3
30
+:10F1C00080E0180770F3E0910401F09105010995C2
31
+:10F1D0008091C00087FFE9CF8091C6001F910F91F9
32
+:10F1E000FF90EF9008951F930E9499F8182F0E94A6
33
+:10F1F00067F8113634F410330CF01053812F1F913F
34
+:10F2000008951755812F1F9108951F930E94F3F8B9
35
+:10F21000182F0E94F3F81295107F810F1F91089507
36
+:10F2200020910201882339F0213031F0223061F041
37
+:10F2300081508823C9F708959091C00097FFFCCFB3
38
+:10F240009091C6008150F5CF9091C80097FFFCCFF8
39
+:10F250009091CE008150EDCF1F93182F0E9499F806
40
+:10F26000803281F0809103018F5F809303018530AC
41
+:10F2700011F01F910895E0910401F09105010995A5
42
+:10F280001F91089584E10E9467F8812F0E9467F81A
43
+:10F2900080E10E9467F8EDCF0E9499F8803271F00A
44
+:10F2A000809103018F5F80930301853009F00895F9
45
+:10F2B000E0910401F09105010995089584E10E940F
46
+:10F2C00067F880E10E9467F8089515C0289A2FEF2B
47
+:10F2D00030E742E0215030404040E1F700C00000FC
48
+:10F2E00028982FEF30E742E0215030404040E1F7CE
49
+:10F2F00000C000008150882349F70895EF92FF92E3
50
+:10F300000F931F93CF93DF93000081E0809302015E
51
+:10F3100089E18093C4001092C5001092C00086E07D
52
+:10F320008093C20088E18093C100209A81E00E940E
53
+:10F3300065F90E9499F88033B1F18133B9F18034D5
54
+:10F3400009F454C0813409F45AC0823409F469C004
55
+:10F35000853409F46CC0803531F1823521F1813575
56
+:10F3600011F1853509F469C0863509F471C0843618
57
+:10F3700009F47AC0843709F4E1C0853709F43FC144
58
+:10F38000863709F44AC0809103018F5F809303019F
59
+:10F39000853079F6E0910401F091050109950E940C
60
+:10F3A00099F8803351F60E944CF9C3CF0E9499F826
61
+:10F3B000803249F784E10E9467F881E40E9467F88F
62
+:10F3C00086E50E9467F882E50E9467F880E20E9465
63
+:10F3D00067F889E40E9467F883E50E9467F880E592
64
+:10F3E0000E9467F880E10E9467F8A3CF0E9499F815
65
+:10F3F0008638C8F20E9499F80E944CF99ACF0E9470
66
+:10F4000099F8803809F414C1813809F415C182389B
67
+:10F4100009F416C1883909F407C180E00E942CF96B
68
+:10F4200088CF84E10E9410F90E944CF982CF85E0D8
69
+:10F430000E9410F90E944CF97CCF0E9499F88093A9
70
+:10F4400006010E9499F8809307010E944CF971CF40
71
+:10F450000E9499F8803309F405C183E00E9410F9F5
72
+:10F4600080E00E942CF965CF0E9499F880930902F0
73
+:10F470000E9499F88093080280910C028E7F8093FD
74
+:10F480000C020E9499F8853409F4FDC080910802AD
75
+:10F49000909109020097A1F068E0E62E61E0F62E57
76
+:10F4A00000E010E00E9499F8F70181937F010F5F5F
77
+:10F4B0001F4F80910802909109020817190790F3D5
78
+:10F4C0000E9499F8803209F05ECF80910C0280FF93
79
+:10F4D000ECC08091060190910701880F991F9093CD
80
+:10F4E000070180930601209108023091090221153D
81
+:10F4F0003105E9F048E0E42E41E0F42E00E010E0B0
82
+:10F50000F70161917F010E94DCFB809106019091DF
83
+:10F510000701019690930701809306010F5F1F4F2B
84
+:10F5200020910802309109020217130748F384E181
85
+:10F530000E9467F880E10E9467F8FBCE0E9499F86C
86
+:10F54000809309020E9499F8809308028091060135
87
+:10F550009091070197FDA3C020910C022D7F20936D
88
+:10F560000C02880F991F90930701809306010E9457
89
+:10F5700099F8853409F48DC080910C028E7F8093B8
90
+:10F580000C020E9499F8803209F0D3CE84E10E94E7
91
+:10F5900067F88091080290910902009709F440C031
92
+:10F5A00000E010E0809106019091070116C0FC0177
93
+:10F5B00084910E9467F8809106019091070101965D
94
+:10F5C00090930701809306010F5F1F4F209108025F
95
+:10F5D000309109020217130718F520910C0220FD43
96
+:10F5E00033C021FFE4CFA0E0B0E080509040AF4FA7
97
+:10F5F000BF4FABBFFC0187910E9467F8DCCF0E9430
98
+:10F6000099F8803209F0BFCE84E10E9467F88EE15C
99
+:10F610000E9467F887E90E9467F885E00E9467F812
100
+:10F6200080E10E9467F885CE83E00E942CF981CEAC
101
+:10F6300082E00E942CF97DCE81E00E942CF979CEE7
102
+:10F6400080E10E942CF975CE0E94D4FB0E9467F8DD
103
+:10F650008091060190910701019690930701809394
104
+:10F660000601B2CF0E9499F80E9499F8082F0E94D3
105
+:10F6700099F8002309F48BC0013009F48CC085E0AF
106
+:10F680000E942CF956CE80910C02816080930C026E
107
+:10F69000FDCE80910C02816080930C0272CF20918C
108
+:10F6A0000C02226020930C025CCF8091070187FD41
109
+:10F6B00076C010920B0280E08BBF80910601909182
110
+:10F6C0000701880F991F909307018093060180918D
111
+:10F6D000080280FF09C080910802909109020196FA
112
+:10F6E0009093090280930802F894F999FECF1127AC
113
+:10F6F000E0910601F0910701C8E0D1E08091080295
114
+:10F7000090910902103091F400915700017001307E
115
+:10F71000D9F303E000935700E8950091570001707A
116
+:10F720000130D9F301E100935700E8950990199051
117
+:10F730000091570001700130D9F301E000935700A8
118
+:10F74000E8951395103898F0112700915700017033
119
+:10F750000130D9F305E000935700E8950091570078
120
+:10F7600001700130D9F301E100935700E89532961A
121
+:10F77000029709F0C7CF103011F00296E5CF11249F
122
+:10F7800084E10E9467F880E10E9467F8D2CD8EE1A3
123
+:10F790000E942CF9CECD87E90E942CF9CACDF1E068
124
+:10F7A000F0930B0281E088CFF999FECF92BD81BD25
125
+:10F7B000F89A992780B50895262FF999FECF1FBA98
126
+:10F7C00092BD81BD20BD0FB6F894FA9AF99A0FBE8A
127
+:08F7D00001960895F894FFCFA3
128
+:02F7D8008000AF
129
+:040000031000F000F9
130
+:00000001FF

+ 126
- 0
ArduinoAddons/Arduino_1.6.4+/Marlin/avr/bootloaders/atmega/ATmegaBOOT_168_atmega644p.hex View File

@@ -0,0 +1,126 @@
1
+:10F800000C943E7C0C945B7C0C945B7C0C945B7C39
2
+:10F810000C945B7C0C945B7C0C945B7C0C945B7C0C
3
+:10F820000C945B7C0C945B7C0C945B7C0C945B7CFC
4
+:10F830000C945B7C0C945B7C0C945B7C0C945B7CEC
5
+:10F840000C945B7C0C945B7C0C945B7C0C945B7CDC
6
+:10F850000C945B7C0C945B7C0C945B7C0C945B7CCC
7
+:10F860000C945B7C0C945B7C0C945B7C0C945B7CBC
8
+:10F870000C945B7C0C945B7C0C945B7C11241FBE11
9
+:10F88000CFEFD0E1DEBFCDBF11E0A0E0B1E0EAEA0A
10
+:10F89000FFEF02C005900D92A230B107D9F712E038
11
+:10F8A000A2E0B1E001C01D92AD30B107E1F70E94C6
12
+:10F8B000747D0C94D37F0C94007C90910201913064
13
+:10F8C00019F0923041F008959091C00095FFFCCF5F
14
+:10F8D0008093C60008959091C80095FFFCCF809357
15
+:10F8E000CE0008951F93982F95959595959595958C
16
+:10F8F000905D182F1F701A304CF4105D892F0E94F4
17
+:10F900005D7C812F0E945D7C1F910895195A892F7B
18
+:10F910000E945D7C812F0E945D7C1F910895EF9273
19
+:10F92000FF920F931F9380910201813069F1823021
20
+:10F9300031F080E01F910F91FF90EF900895EE2439
21
+:10F94000FF2487018091C80087FD17C00894E11C3F
22
+:10F95000F11C011D111D81E4E81682E4F8068FE018
23
+:10F96000080780E0180770F3E0910401F0910501A9
24
+:10F9700009958091C80087FFE9CF8091CE001F9143
25
+:10F980000F91FF90EF900895EE24FF24870180915E
26
+:10F99000C00087FD17C00894E11CF11C011D111D5A
27
+:10F9A00081E4E81682E4F8068FE0080780E0180793
28
+:10F9B00070F3E0910401F091050109958091C00078
29
+:10F9C00087FFE9CF8091C6001F910F91FF90EF90C4
30
+:10F9D00008951F930E948F7C182F0E945D7C113622
31
+:10F9E00034F410330CF01053812F1F9108951755E4
32
+:10F9F000812F1F9108951F930E94E97C182F0E9468
33
+:10FA0000E97C1295107F810F1F91089520910201CA
34
+:10FA1000882339F0213031F0223061F08150882381
35
+:10FA2000C9F708959091C00097FFFCCF9091C60050
36
+:10FA30008150F5CF9091C80097FFFCCF9091CE00F8
37
+:10FA40008150EDCF1F93182F0E948F7C803281F060
38
+:10FA5000809103018F5F80930301853011F01F9126
39
+:10FA60000895E0910401F091050109951F91089511
40
+:10FA700084E10E945D7C812F0E945D7C80E10E9478
41
+:10FA80005D7CEDCF0E948F7C803271F0809103010C
42
+:10FA90008F5F80930301853009F00895E0910401A0
43
+:10FAA000F09105010995089584E10E945D7C80E153
44
+:10FAB0000E945D7C089515C0289A2FEF31EE44E036
45
+:10FAC000215030404040E1F700C0000028982FEF5F
46
+:10FAD00031EE44E0215030404040E1F700C00000EA
47
+:10FAE0008150882349F70895EF92FF920F931F9357
48
+:10FAF000CF93DF93000081E08093020180E1809347
49
+:10FB0000C4001092C5001092C00086E08093C2002D
50
+:10FB100088E18093C100209A81E00E945B7D0E9471
51
+:10FB20008F7C8033B1F18133B9F1803409F454C052
52
+:10FB3000813409F45AC0823409F469C0853409F467
53
+:10FB40006CC0803531F1823521F1813511F1853577
54
+:10FB500009F469C0863509F471C0843609F47AC0A5
55
+:10FB6000843709F4E1C0853709F439C1863709F4CF
56
+:10FB70004AC0809103018F5F80930301853079F63D
57
+:10FB8000E0910401F091050109950E948F7C80337A
58
+:10FB900051F60E94427DC3CF0E948F7C803249F78C
59
+:10FBA00084E10E945D7C81E40E945D7C86E50E9488
60
+:10FBB0005D7C82E50E945D7C80E20E945D7C89E440
61
+:10FBC0000E945D7C83E50E945D7C80E50E945D7CF7
62
+:10FBD00080E10E945D7CA3CF0E948F7C8638C8F2B2
63
+:10FBE0000E948F7C0E94427D9ACF0E948F7C803839
64
+:10FBF00009F40EC1813809F40FC1823809F410C12B
65
+:10FC0000883909F401C180E00E94227D88CF84E117
66
+:10FC10000E94067D0E94427D82CF85E00E94067D83
67
+:10FC20000E94427D7CCF0E948F7C809306010E94BF
68
+:10FC30008F7C809307010E94427D71CF0E948F7C50
69
+:10FC4000803309F4F1C083E00E94067D80E00E94C9
70
+:10FC5000227D65CF0E948F7C809309020E948F7C59
71
+:10FC60008093080280910C028E7F80930C020E9488
72
+:10FC70008F7C853409F4E9C08091080290910902D3
73
+:10FC80000097A1F068E0E62E61E0F62E00E010E0BB
74
+:10FC90000E948F7CF70181937F010F5F1F4F80913E
75
+:10FCA0000802909109020817190790F30E948F7CAF
76
+:10FCB000803209F05ECF80910C0280FFE5C0809118
77
+:10FCC000060190910701880F991F90930701809377
78
+:10FCD0000601209108023091090221153105E9F051
79
+:10FCE00048E0E42E41E0F42E00E010E0F7016191DD
80
+:10FCF0007F010E94C57F80910601909107010196C6
81
+:10FD000090930701809306010F5F1F4F2091080217
82
+:10FD1000309109020217130748F384E10E945D7CC9
83
+:10FD200080E10E945D7CFBCE0E948F7C8093090263
84
+:10FD30000E948F7C809308028091060190910701B8
85
+:10FD400097FD9CC020910C022D7F20930C02880F00
86
+:10FD5000991F90930701809306010E948F7C853440
87
+:10FD600009F486C080910C028E7F80930C020E9461
88
+:10FD70008F7C803209F0D3CE84E10E945D7C20919B
89
+:10FD800008023091090221153105D1F100E010E09F
90
+:10FD900080910601909107010CC041FF5CC0019663
91
+:10FDA00090930701809306010F5F1F4F02171307FF
92
+:10FDB00038F540910C0240FFF0CF0E94BD7F0E94B9
93
+:10FDC0005D7C809106019091070101969093070157
94
+:10FDD000809306012091080230910902E5CF0E942C
95
+:10FDE0008F7C803209F0C5CE84E10E945D7C8EE17B
96
+:10FDF0000E945D7C86E90E945D7C8AE00E945D7CB9
97
+:10FE000080E10E945D7C8BCE83E00E94227D87CEC4
98
+:10FE100082E00E94227D83CE81E00E94227D7FCEFF
99
+:10FE200080E10E94227D7BCE0E948F7C0E948F7C8D
100
+:10FE3000082F0E948F7C002309F497C0013009F439
101
+:10FE400098C08AE00E94227D6ACE80910C02816077
102
+:10FE500080930C0211CFFC0184910E945D7C209163
103
+:10FE6000080230910902809106019091070197CF15
104
+:10FE700080910C02816080930C0279CF20910C025A
105
+:10FE8000226020930C0263CF80910701880F880BBA
106
+:10FE9000817080930B028091060190910701880F79
107
+:10FEA000991F90930701809306018091080280FFBB
108
+:10FEB00009C080910802909109020196909309026D
109
+:10FEC00080930802F894F999FECF1127E09106017A
110
+:10FED000F0910701C8E0D1E08091080290910902F9
111
+:10FEE000103091F40091570001700130D9F303E014
112
+:10FEF00000935700E8950091570001700130D9F345
113
+:10FF000001E100935700E89509901990009157007E
114
+:10FF100001700130D9F301E000935700E895139583
115
+:10FF2000103898F011270091570001700130D9F373
116
+:10FF300005E000935700E8950091570001700130EB
117
+:10FF4000D9F301E100935700E8953296029709F042
118
+:10FF5000C7CF103011F00296E5CF112484E10E9442
119
+:10FF60005D7C80E10E945D7CDACD8EE10E94227D85
120
+:10FF7000D6CD86E90E94227DD2CDF999FECF92BDE1
121
+:10FF800081BDF89A992780B50895262FF999FECF5B
122
+:10FF90001FBA92BD81BD20BD0FB6F894FA9AF99AA6
123
+:0AFFA0000FBE01960895F894FFCFFC
124
+:02FFAA008000D5
125
+:040000030000F80001
126
+:00000001FF

+ 254
- 0
ArduinoAddons/Arduino_1.6.4+/Marlin/avr/bootloaders/atmega/Makefile View File

@@ -0,0 +1,254 @@
1
+# Makefile for ATmegaBOOT
2
+# E.Lins, 18.7.2005
3
+# $Id$
4
+#
5
+# Instructions
6
+#
7
+# To make bootloader .hex file:
8
+# make diecimila
9
+# make lilypad
10
+# make ng
11
+# etc...
12
+#
13
+# To burn bootloader .hex file:
14
+# make diecimila_isp
15
+# make lilypad_isp
16
+# make ng_isp
17
+# etc...
18
+
19
+# program name should not be changed...
20
+PROGRAM    = ATmegaBOOT_168
21
+
22
+# enter the parameters for the avrdude isp tool
23
+ISPTOOL	   = stk500v2
24
+ISPPORT	   = usb
25
+ISPSPEED   = -b 115200
26
+
27
+MCU_TARGET = atmega168
28
+LDSECTION  = --section-start=.text=0x3800
29
+
30
+# the efuse should really be 0xf8; since, however, only the lower
31
+# three bits of that byte are used on the atmega168, avrdude gets
32
+# confused if you specify 1's for the higher bits, see:
33
+# http://tinker.it/now/2007/02/24/the-tale-of-avrdude-atmega168-and-extended-bits-fuses/
34
+#
35
+# similarly, the lock bits should be 0xff instead of 0x3f (to
36
+# unlock the bootloader section) and 0xcf instead of 0x0f (to
37
+# lock it), but since the high two bits of the lock byte are
38
+# unused, avrdude would get confused.
39
+
40
+ISPFUSES    = avrdude -c $(ISPTOOL) -p $(MCU_TARGET) -P $(ISPPORT) $(ISPSPEED) \
41
+-e -u -U lock:w:0x3f:m -U efuse:w:0x$(EFUSE):m -U hfuse:w:0x$(HFUSE):m -U lfuse:w:0x$(LFUSE):m
42
+ISPFLASH    = avrdude -c $(ISPTOOL) -p $(MCU_TARGET) -P $(ISPPORT) $(ISPSPEED) \
43
+-U flash:w:$(PROGRAM)_$(TARGET).hex -U lock:w:0x0f:m
44
+
45
+STK500 = "C:\Program Files\Atmel\AVR Tools\STK500\Stk500.exe"
46
+STK500-1 = $(STK500) -e -d$(MCU_TARGET) -pf -vf -if$(PROGRAM)_$(TARGET).hex \
47
+-lFF -LFF -f$(HFUSE)$(LFUSE) -EF8 -ms -q -cUSB -I200kHz -s -wt
48
+STK500-2 = $(STK500) -d$(MCU_TARGET) -ms -q -lCF -LCF -cUSB -I200kHz -s -wt
49
+
50
+
51
+OBJ        = $(PROGRAM).o
52
+OPTIMIZE   = -O2
53
+
54
+DEFS       = 
55
+LIBS       =
56
+
57
+CC         = avr-gcc
58
+
59
+# Override is only needed by avr-lib build system.
60
+
61
+override CFLAGS        = -g -Wall $(OPTIMIZE) -mmcu=$(MCU_TARGET) -DF_CPU=$(AVR_FREQ) $(DEFS)
62
+override LDFLAGS       = -Wl,$(LDSECTION)
63
+#override LDFLAGS       = -Wl,-Map,$(PROGRAM).map,$(LDSECTION)
64
+
65
+OBJCOPY        = avr-objcopy
66
+OBJDUMP        = avr-objdump
67
+
68
+all:
69
+
70
+lilypad: TARGET = lilypad
71
+lilypad: CFLAGS += '-DMAX_TIME_COUNT=F_CPU>>1' '-DNUM_LED_FLASHES=3'
72
+lilypad: AVR_FREQ = 8000000L
73
+lilypad: $(PROGRAM)_lilypad.hex
74
+
75
+lilypad_isp: lilypad
76
+lilypad_isp: TARGET = lilypad
77
+lilypad_isp: HFUSE = DD
78
+lilypad_isp: LFUSE = E2
79
+lilypad_isp: EFUSE = 00
80
+lilypad_isp: isp
81
+
82
+lilypad_resonator: TARGET = lilypad_resonator
83
+lilypad_resonator: CFLAGS += '-DMAX_TIME_COUNT=F_CPU>>4' '-DNUM_LED_FLASHES=3'
84
+lilypad_resonator: AVR_FREQ = 8000000L
85
+lilypad_resonator: $(PROGRAM)_lilypad_resonator.hex
86
+
87
+lilypad_resonator_isp: lilypad_resonator
88
+lilypad_resonator_isp: TARGET = lilypad_resonator
89
+lilypad_resonator_isp: HFUSE = DD
90
+lilypad_resonator_isp: LFUSE = C6
91
+lilypad_resonator_isp: EFUSE = 00
92
+lilypad_resonator_isp: isp
93
+
94
+pro8: TARGET = pro_8MHz
95
+pro8: CFLAGS += '-DMAX_TIME_COUNT=F_CPU>>4' '-DNUM_LED_FLASHES=1' '-DWATCHDOG_MODS'
96
+pro8: AVR_FREQ = 8000000L
97
+pro8: $(PROGRAM)_pro_8MHz.hex
98
+
99
+pro8_isp: pro8
100
+pro8_isp: TARGET = pro_8MHz
101
+pro8_isp: HFUSE = DD
102
+pro8_isp: LFUSE = C6
103
+pro8_isp: EFUSE = 00
104
+pro8_isp: isp
105
+
106
+pro16: TARGET = pro_16MHz
107
+pro16: CFLAGS += '-DMAX_TIME_COUNT=F_CPU>>4' '-DNUM_LED_FLASHES=1' '-DWATCHDOG_MODS'
108
+pro16: AVR_FREQ = 16000000L
109
+pro16: $(PROGRAM)_pro_16MHz.hex
110
+
111
+pro16_isp: pro16
112
+pro16_isp: TARGET = pro_16MHz
113
+pro16_isp: HFUSE = DD
114
+pro16_isp: LFUSE = C6
115
+pro16_isp: EFUSE = 00
116
+pro16_isp: isp
117
+
118
+pro20: TARGET = pro_20mhz
119
+pro20: CFLAGS += '-DMAX_TIME_COUNT=F_CPU>>4' '-DNUM_LED_FLASHES=1' '-DWATCHDOG_MODS'
120
+pro20: AVR_FREQ = 20000000L
121
+pro20: $(PROGRAM)_pro_20mhz.hex
122
+
123
+pro20_isp: pro20
124
+pro20_isp: TARGET = pro_20mhz
125
+pro20_isp: HFUSE = DD
126
+pro20_isp: LFUSE = C6
127
+pro20_isp: EFUSE = 00
128
+pro20_isp: isp
129
+
130
+diecimila: TARGET = diecimila
131
+diecimila: CFLAGS += '-DMAX_TIME_COUNT=F_CPU>>4' '-DNUM_LED_FLASHES=1'
132
+diecimila: AVR_FREQ = 16000000L 
133
+diecimila: $(PROGRAM)_diecimila.hex
134
+
135
+diecimila_isp: diecimila
136
+diecimila_isp: TARGET = diecimila
137
+diecimila_isp: HFUSE = DD
138
+diecimila_isp: LFUSE = FF
139
+diecimila_isp: EFUSE = 00
140
+diecimila_isp: isp
141
+
142
+ng: TARGET = ng
143
+ng: CFLAGS += '-DMAX_TIME_COUNT=F_CPU>>1' '-DNUM_LED_FLASHES=3'
144
+ng: AVR_FREQ = 16000000L
145
+ng: $(PROGRAM)_ng.hex
146
+
147
+ng_isp: ng
148
+ng_isp: TARGET = ng
149
+ng_isp: HFUSE = DD
150
+ng_isp: LFUSE = FF
151
+ng_isp: EFUSE = 00
152
+ng_isp: isp
153
+
154
+atmega328: TARGET = atmega328
155
+atmega328: MCU_TARGET = atmega328p
156
+atmega328: CFLAGS += '-DMAX_TIME_COUNT=F_CPU>>4' '-DNUM_LED_FLASHES=1' -DBAUD_RATE=57600
157
+atmega328: AVR_FREQ = 16000000L 
158
+atmega328: LDSECTION  = --section-start=.text=0x7800
159
+atmega328: $(PROGRAM)_atmega328.hex
160
+
161
+atmega328_isp: atmega328
162
+atmega328_isp: TARGET = atmega328
163
+atmega328_isp: MCU_TARGET = atmega328p
164
+atmega328_isp: HFUSE = DA
165
+atmega328_isp: LFUSE = FF
166
+atmega328_isp: EFUSE = 05
167
+atmega328_isp: isp
168
+
169
+atmega328_pro8: TARGET = atmega328_pro_8MHz
170
+atmega328_pro8: MCU_TARGET = atmega328p
171
+atmega328_pro8: CFLAGS += '-DMAX_TIME_COUNT=F_CPU>>4' '-DNUM_LED_FLASHES=1' -DBAUD_RATE=57600 -DDOUBLE_SPEED
172
+atmega328_pro8: AVR_FREQ = 8000000L 
173
+atmega328_pro8: LDSECTION  = --section-start=.text=0x7800
174
+atmega328_pro8: $(PROGRAM)_atmega328_pro_8MHz.hex
175
+
176
+atmega328_pro8_isp: atmega328_pro8
177
+atmega328_pro8_isp: TARGET = atmega328_pro_8MHz
178
+atmega328_pro8_isp: MCU_TARGET = atmega328p
179
+atmega328_pro8_isp: HFUSE = DA
180
+atmega328_pro8_isp: LFUSE = FF
181
+atmega328_pro8_isp: EFUSE = 05
182
+atmega328_pro8_isp: isp
183
+
184
+mega: TARGET = atmega1280
185
+mega: MCU_TARGET = atmega1280
186
+mega: CFLAGS += '-DMAX_TIME_COUNT=F_CPU>>4' '-DNUM_LED_FLASHES=0' -DBAUD_RATE=57600
187
+mega: AVR_FREQ = 16000000L 
188
+mega: LDSECTION  = --section-start=.text=0x1F000
189
+mega: $(PROGRAM)_atmega1280.hex
190
+
191
+mega_isp: mega
192
+mega_isp: TARGET = atmega1280
193
+mega_isp: MCU_TARGET = atmega1280
194
+mega_isp: HFUSE = DA
195
+mega_isp: LFUSE = FF
196
+mega_isp: EFUSE = F5
197
+mega_isp: isp
198
+
199
+atmega1284p: TARGET = atmega1284p
200
+atmega1284p: MCU_TARGET = atmega1284p
201
+atmega1284p: CFLAGS += '-DMAX_TIME_COUNT=F_CPU>>4' '-DNUM_LED_FLASHES=0' '-DBAUD_RATE=57600'
202
+atmega1284p: AVR_FREQ = 16000000L 
203
+atmega1284p: LDSECTION  = --section-start=.text=0x1F000
204
+atmega1284p: $(PROGRAM)_atmega1284p.hex
205
+
206
+atmega1284p_8m: TARGET = atmega1284p
207
+atmega1284p_8m: MCU_TARGET = atmega1284p
208
+atmega1284p_8m: CFLAGS += '-DMAX_TIME_COUNT=F_CPU>>4' '-DNUM_LED_FLASHES=0' '-DBAUD_RATE=19200'
209
+atmega1284p_8m: AVR_FREQ = 8000000L
210
+atmega1284p_8m: LDSECTION  = --section-start=.text=0x1F000
211
+atmega1284p_8m: $(PROGRAM)_atmega1284p_8m.hex
212
+
213
+atmega644p: TARGET = atmega644p
214
+atmega644p: MCU_TARGET = atmega644p
215
+atmega644p: CFLAGS += '-DMAX_TIME_COUNT=F_CPU>>4' '-DNUM_LED_FLASHES=0' '-DBAUD_RATE=57600'
216
+atmega644p: AVR_FREQ = 16000000L
217
+atmega644p: LDSECTION  = --section-start=.text=0xF800
218
+atmega644p: $(PROGRAM)_atmega644p.hex
219
+
220
+
221
+atmega1284p_isp: atmega1284p
222
+atmega1284p_isp: TARGET = atmega1284p
223
+atmega1284p_isp: MCU_TARGET = atmega1284p
224
+atmega1284p_isp: HFUSE = DC
225
+atmega1284p_isp: LFUSE = FF
226
+atmega1284p_isp: EFUSE = FD
227
+atmega1284p_isp: isp
228
+
229
+isp: $(TARGET)
230
+	$(ISPFUSES)
231
+	$(ISPFLASH)
232
+
233
+isp-stk500: $(PROGRAM)_$(TARGET).hex
234
+	$(STK500-1)
235
+	$(STK500-2)
236
+
237
+%.elf: $(OBJ)
238
+	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
239
+
240
+clean:
241
+	rm -rf *.o *.elf *.lst *.map *.sym *.lss *.eep *.srec *.bin *.hex
242
+
243
+%.lst: %.elf
244
+	$(OBJDUMP) -h -S $< > $@
245
+
246
+%.hex: %.elf
247
+	$(OBJCOPY) -j .text -j .data -O ihex $< $@
248
+
249
+%.srec: %.elf
250
+	$(OBJCOPY) -j .text -j .data -O srec $< $@
251
+
252
+%.bin: %.elf
253
+	$(OBJCOPY) -j .text -j .data -O binary $< $@
254
+	

+ 117
- 0
ArduinoAddons/Arduino_1.6.4+/Marlin/avr/bootloaders/atmega644p/ATmegaBOOT_1284P.hex View File

@@ -0,0 +1,117 @@
1
+:020000021000EC
2
+:10F800000C9446FC0C9465FC0C9465FC0C9465FC13
3
+:10F810000C9465FC0C9465FC0C9465FC0C9465FCE4
4
+:10F820000C9465FC0C9465FC0C9465FC0C9465FCD4
5
+:10F830000C9465FC0C9465FC0C9465FC0C9465FCC4
6
+:10F840000C9465FC0C9465FC0C9465FC0C9465FCB4
7
+:10F850000C9465FC0C9465FC0C9465FC0C9465FCA4
8
+:10F860000C9465FC0C9465FC0C9465FC0C9465FC94
9
+:10F870000C9465FC0C9465FC0C9465FC0C9465FC84
10
+:10F880000C9465FC0C9465FC0C9465FC11241FBE63
11
+:10F89000CFEFD0E4DEBFCDBF11E0A0E0B1E0E6E005
12
+:10F8A000FFEF01E00BBF02C007900D92A230B1073D
13
+:10F8B000D9F712E0A2E0B1E001C01D92AD30B1076E
14
+:10F8C000E1F70E945FFD0C9481FF0C9400FC909185
15
+:10F8D0000201913039F49091C00095FFFCCF8093E4
16
+:10F8E000C6000895923031F49091C80095FFFCCF86
17
+:10F8F0008093CE0008951F93982F95959595959593
18
+:10F900009595905D182F1F701A3014F0195A01C088
19
+:10F91000105D892F0E9467FC812F0E9467FC1F9158
20
+:10F920000895EF92FF920F931F938091020181300F
21
+:10F93000F1F4EE24FF24870113C00894E11CF11CAC
22
+:10F94000011D111D81E0E81682E1F8068AE708072B
23
+:10F9500080E0180728F0E0910401F0910501099575
24
+:10F960008091C00087FFE9CF8091C60021C082301E
25
+:10F97000F1F4EE24FF24870113C00894E11CF11C6C
26
+:10F98000011D111D81E0E81682E1F8068AE70807EB
27
+:10F9900080E0180728F0E0910401F0910501099535
28
+:10F9A0008091C80087FFE9CF8091CE0001C080E040
29
+:10F9B0001F910F91FF90EF9008951F930E9491FC6B
30
+:10F9C000182F0E9467FC113614F0175503C010332E
31
+:10F9D0000CF01053812F1F9108951F930E94DDFC9E
32
+:10F9E000182F0E94DDFC1295107F810F1F91089542
33
+:10F9F0009091020112C0913039F42091C00027FF8C
34
+:10FA0000FCCF2091C60008C0923031F42091C8008C
35
+:10FA100027FFFCCF2091CE008150882361F7089505
36
+:10FA20001F93182F0E9491FC803251F484E10E94B0
37
+:10FA300067FC812F0E9467FC80E10E9467FC0CC07C
38
+:10FA4000809103018F5F80930301853029F4E09159
39
+:10FA50000401F091050109951F9108950E9491FC00
40
+:10FA6000803239F484E10E9467FC80E10E9467FCE7
41
+:10FA70000895809103018F5F80930301853029F4FD
42
+:10FA8000E0910401F09105010995089515C0289AA7
43
+:10FA90002FEF31EE44E0215030404040E1F700C00C
44
+:10FAA000000028982FEF31EE44E0215030404040D4
45
+:10FAB000E1F700C000008150882349F70895BF9204
46
+:10FAC000CF92DF92EF92FF920F931F93CF93DF932A
47
+:10FAD00094B714BE8091600088618093600010929A
48
+:10FAE000600091FD05C0E0910401F09105010995C8
49
+:10FAF00081E08093020180E18093C4001092C500F0
50
+:10FB00001092C00086E08093C20088E18093C1001B
51
+:10FB1000209A84E00E9446FDBB24B3940E9491FC8D
52
+:10FB2000803309F441C08133E1F40E9491FC8032BA
53
+:10FB300009F0C3C184E10E9467FC81E40E9467FC74
54
+:10FB400086E50E9467FC82E50E9467FC80E20E94D5
55
+:10FB500067FC89E40E9467FC83E50E9467FC80E5FE
56
+:10FB600029C1803439F40E9491FC8638E8F00E9463
57
+:10FB700091FC1AC0813499F40E9491FC803811F4F0
58
+:10FB800082E098C1813811F481E094C1823811F487
59
+:10FB900080E190C1883909F08CC183E08BC1823447
60
+:10FBA00031F484E10E94F8FC0E942EFDB7CF853429
61
+:10FBB00011F485E0F7CF8035B9F38235A9F38135AB
62
+:10FBC00031F40E942EFD88E080936000FFCF8535E0
63
+:10FBD00049F40E9491FC809306010E9491FC80935D
64
+:10FBE0000701E2CF8635C9F40E9491FC803389F485
65
+:10FBF0000E9491FC0E9491FC082F0E9491FC00231E
66
+:10FC000011F48EE157C1013011F487E953C185E049
67
+:10FC100051C183E00E94F8FC4CC1843609F0D0C089
68
+:10FC20000E9491FC809309020E9491FC809308023B
69
+:10FC300080910C028E7F80930C020E9491FC85348F
70
+:10FC400029F480910C02816080930C0258E0C52E4B
71
+:10FC500051E0D52E760100E010E007C00E9491FC33
72
+:10FC6000F70181937F010F5F1F4F809108029091F0
73
+:10FC700009020817190790F30E9491FC803209F0DD
74
+:10FC80001CC180910C0280FF29C0809106019091D7
75
+:10FC90000701880F991F909307018093060100E0E8
76
+:10FCA00010E014C0F60161916F01809106019091FE
77
+:10FCB00007010E9473FF8091060190910701019650
78
+:10FCC00090930701809306010F5F1F4F80910802F8
79
+:10FCD000909109020817190728F36BC0809107015A
80
+:10FCE000880F880B8B2180930B028BBF80910601BC
81
+:10FCF00090910701880F991F909307018093060147
82
+:10FD00008091080280FF09C0809108029091090249
83
+:10FD100001969093090280930802F894F999FECF16
84
+:10FD20001127E0910601F0910701C8E0D1E0809130
85
+:10FD3000080290910902103091F40091570001706F
86
+:10FD40000130D9F303E000935700E8950091570084
87
+:10FD500001700130D9F301E100935700E895099053
88
+:10FD600019900091570001700130D9F301E0009320
89
+:10FD70005700E8951395103898F011270091570017
90
+:10FD800001700130D9F305E000935700E895009128
91
+:10FD9000570001700130D9F301E100935700E89555
92
+:10FDA0003296029709F0C7CF103011F00296E5CFD6
93
+:10FDB000112484E10E9467FC80E10E9467FCAECEC2
94
+:10FDC000843709F063C00E9491FC809309020E946D
95
+:10FDD00091FC809308028091060190910701209187
96
+:10FDE0000C0297FF02C0226001C02D7F20930C02FD
97
+:10FDF000880F991F90930701809306010E9491FC40
98
+:10FE000020910C02853411F4216001C02E7F2093D3
99
+:10FE10000C020E9491FC803209F080CE84E10E94A5
100
+:10FE200067FC00E010E02AC080910C0280FF07C050
101
+:10FE300080910601909107010E946BFF12C0E09132
102
+:10FE40000601F091070181FD02C084910AC0CF0133
103
+:10FE5000A0E0B0E080509040AF4FBF4FABBFFC017F
104
+:10FE600087910E9467FC809106019091070101969D
105
+:10FE700090930701809306010F5F1F4F8091080246
106
+:10FE8000909109020817190778F296CF853779F40F
107
+:10FE90000E9491FC803289F484E10E9467FC8EE12B
108
+:10FEA0000E9467FC87E90E9467FC85E083CF863764
109
+:10FEB00021F480E00E9410FD31CE809103018F5F1C
110
+:10FEC00080930301853009F029CEE0910401F0917F
111
+:10FED0000501099523CEF999FECF92BD81BDF89A0F
112
+:10FEE000992780B50895262FF999FECF1FBA92BDA4
113
+:10FEF00081BD20BD0FB6F894FA9AF99A0FBE01960B
114
+:06FF00000895F894FFCF04
115
+:02FF0600800079
116
+:040000031000F800F1
117
+:00000001FF

+ 121
- 0
ArduinoAddons/Arduino_1.6.4+/Marlin/avr/bootloaders/atmega644p/ATmegaBOOT_324P.hex View File

@@ -0,0 +1,121 @@
1
+:10F800000C943E7C0C945B7C0C945B7C0C945B7C39
2
+:10F810000C945B7C0C945B7C0C945B7C0C945B7C0C
3
+:10F820000C945B7C0C945B7C0C945B7C0C945B7CFC
4
+:10F830000C945B7C0C945B7C0C945B7C0C945B7CEC
5
+:10F840000C945B7C0C945B7C0C945B7C0C945B7CDC
6
+:10F850000C945B7C0C945B7C0C945B7C0C945B7CCC
7
+:10F860000C945B7C0C945B7C0C945B7C0C945B7CBC
8
+:10F870000C945B7C0C945B7C0C945B7C11241FBE11
9
+:10F88000CFEFD8E0DEBFCDBF11E0A0E0B1E0E6E60B
10
+:10F89000FFEF02C005900D92A030B107D9F712E03A
11
+:10F8A000A0E0B1E001C01D92A930B107E1F70E94CC
12
+:10F8B000537D0C94B27F0C94007CCF93DF93CDB733
13
+:10F8C000DEB724970FB6F894DEBF0FBECDBF8823F6
14
+:10F8D00009F481E020E0482F55274115510509F42E
15
+:10F8E0003DC0289A19821A821B821C820BC0898112
16
+:10F8F0009A81AB81BC810196A11DB11D89839A8338
17
+:10F90000AB83BC8389819A81AB81BC8180589E4343
18
+:10F91000A040B04060F3289819821A821B821C8292
19
+:10F920000BC089819A81AB81BC810196A11DB11D5B
20
+:10F9300089839A83AB83BC8389819A81AB81BC81A3
21
+:10F9400080509A4FA040B04060F32F5F822F9927DC
22
+:10F9500087FD9095841795070CF4C3CF19821A82FE
23
+:10F960001B821C8289819A81AB81BC818050914726
24
+:10F97000A240B040A0F489819A81AB81BC810196FC
25
+:10F98000A11DB11D89839A83AB83BC8389819A8130
26
+:10F99000AB81BC8180509147A240B04060F3249677
27
+:10F9A0000FB6F894DEBF0FBECDBFDF91CF910895A3
28
+:10F9B000EF92FF920F931F93EE24FF248701289864
29
+:10F9C0008091C00087FD17C00894E11CF11C011D47
30
+:10F9D000111D81E0E81689E0F8068DE3080780E054
31
+:10F9E000180770F3E0910001F091010109958091F1
32
+:10F9F000C00087FFE9CF289A8091C600992787FD2C
33
+:10FA000090951F910F91FF90EF900895982F8091FE
34
+:10FA1000C00085FFFCCF9093C60008950E94D87C5B
35
+:10FA2000803271F0809102018F5F809302018530F6
36
+:10FA300009F00895E0910001F09101010995089500
37
+:10FA400084E10E94067D80E10E94067D0895CF93A7
38
+:10FA5000C82F0E94D87C803241F0809102018F5FD4
39
+:10FA600080930201853081F40AC084E10E94067D02
40
+:10FA70008C2F0E94067D80E10E94067D05C0E091EA
41
+:10FA80000001F09101010995CF910895282F90E090
42
+:10FA900007C08091C0008823E4F78091C6009F5F73
43
+:10FAA0009217B8F30895CFEFD8E0DEBFCDBF0000C6
44
+:10FAB00094B714BE809160008861809360001092BA
45
+:10FAC000600091FF74C189E18093C4001092C50069
46
+:10FAD00088E18093C10086E08093C2005098589AD4
47
+:10FAE000209A83E00E945D7C81E00E945D7C0E9400
48
+:10FAF000D87C8033B9F18133C1F1803409F456C028
49
+:10FB0000813409F45CC0823409F46EC0853409F490
50
+:10FB100071C0803539F1813509F4F3C0823511F1B6
51
+:10FB2000853509F4D3C0863509F4CBC0843609F491
52
+:10FB300065C0843709F4EBC0853709F4D2C0863735
53
+:10FB400009F44AC0809102018F5F809302018530E1
54
+:10FB500071F6E0910001F091010109950E94D87CB5
55
+:10FB6000803349F60E940E7DC2CF0E94D87CC82FF8
56
+:10FB7000803241F784E10E94067D81E40E94067D87
57
+:10FB800086E50E94067D82E50E94067D8C2F0E94FC
58
+:10FB9000067D89E40E94067D83E50E94067D80E55E
59
+:10FBA0000E94067D80E10E94067DA1CF0E94D87C44
60
+:10FBB0008638C0F20E94D87C0E940E7D98CF0E94A9
61
+:10FBC000D87C803809F407C1813809F400C1823833
62
+:10FBD00009F4F9C0883921F080E00E94277D87CFA1
63
+:10FBE00083E00E94277D83CF84E10E94467D0E94AE
64
+:10FBF0000E7D7DCF85E00E94467DF9CF0E94D87CA6
65
+:10FC0000809306020E94D87C8093050280910802AE
66
+:10FC10008E7F809308020E94D87C853409F44BC003
67
+:10FC2000E5E0F1E0119281E0E438F807D9F3D0F390
68
+:10FC3000C0E0D0E0809105029091060218161906E6
69
+:10FC400078F405E011E00E94D87CF80181938F01DF
70
+:10FC500021968091050290910602C817D90798F362
71
+:10FC60000E94D87C803209F06DCF8091080280FF1D
72
+:10FC7000B6C0C0E0D0E02091050230910602121615
73
+:10FC80001306B8F4E0910301F0910401A5E0B1E09E
74
+:10FC9000F999FECFF2BDE1BD8D9180BDFA9AF99A36
75
+:10FCA00031962196C217D30798F3F0930401E0939D
76
+:10FCB000030184E175CF809108028160809308027E
77
+:10FCC000AFCF84E00E94467D80E087CF0E94D87C41
78
+:10FCD000809303010E94D87C809304010E940E7DD2
79
+:10FCE00006CF0E94D87C803209F02CCF84E10E949C
80
+:10FCF000067D8EE10E94067D85E90E94067D88E0F2
81
+:10FD00004FCF0E940E7D88E080936000FFCF0E945D
82
+:10FD1000D87C809306020E94D87C809305020E94C2
83
+:10FD2000D87C853409F449C0809108028E7F809385
84
+:10FD300008028091030190910401880F991F90930C
85
+:10FD40000401809303010E94D87C803209F0CFCE59
86
+:10FD500084E10E94067DC0E0D0E020910502309150
87
+:10FD600006021216130608F01DCFE0910301F09170
88
+:10FD700004018091080280FF96C0F999FECFF2BD80
89
+:10FD8000E1BDF89A80B50E94067DE0910301F091F3
90
+:10FD900004013196F0930401E093030120910502E0
91
+:10FDA000309106022196C217D30718F3FBCEE091DB
92
+:10FDB0000001F0910101099586CE809108028160D1
93
+:10FDC00080930802C0CF80E10E94277D90CE81E021
94
+:10FDD0000E94277D8CCE82E00E94277D88CE809174
95
+:10FDE000030190910401880F991F9093040180935F
96
+:10FDF00003018091050280FF09C080910502909166
97
+:10FE0000060201969093060280930502F999FECFAF
98
+:10FE10001127E0910301F0910401C5E0D1E0809148
99
+:10FE2000050290910602103091F400915700017084
100
+:10FE30000130D9F303E000935700E8950091570093
101
+:10FE400001700130D9F301E100935700E895099062
102
+:10FE500019900091570001700130D9F301E000932F
103
+:10FE60005700E8951395103898F011270091570026
104
+:10FE700001700130D9F305E000935700E895009137
105
+:10FE8000570001700130D9F301E100935700E89564
106
+:10FE90003296029709F0C7CF103011F00296E5CFE5
107
+:10FEA000112484E17DCE869580FF06C03196F093C3
108
+:10FEB0000401E093030176CF84910E94067D209196
109
+:10FEC000050230910602E0910301F0910401EECFAA
110
+:10FED0001F93CF930E94D87CC82F0E94067D0E945A
111
+:10FEE000D87C182F0E94067DC1362CF0C7551136DC
112
+:10FEF0003CF0175508C0C033D4F3C0531136CCF7CB
113
+:10FF000010330CF01053C295C07FC10F8C2F99276E
114
+:10FF100087FD9095CF911F910895CF93282F992712
115
+:10FF200087FD9095807F907095958795959587959D
116
+:10FF300095958795959587958A303CF0895AC22F7B
117
+:10FF4000CF70CA303CF0C95A06C0805DC22FCF7056
118
+:10FF5000CA30CCF7C05D0E94067D8C2F0E94067DC2
119
+:06FF6000CF910895FFCFD0
120
+:040000030000F80001
121
+:00000001FF

+ 120
- 0
ArduinoAddons/Arduino_1.6.4+/Marlin/avr/bootloaders/atmega644p/ATmegaBOOT_644.hex View File

@@ -0,0 +1,120 @@
1
+:10F800000C94387C0C94557C0C94557C0C94557C51
2
+:10F810000C94557C0C94557C0C94557C0C94557C24
3
+:10F820000C94557C0C94557C0C94557C0C94557C14
4
+:10F830000C94557C0C94557C0C94557C0C94557C04
5
+:10F840000C94557C0C94557C0C94557C0C94557CF4
6
+:10F850000C94557C0C94557C0C94557C0C94557CE4
7
+:10F860000C94557C0C94557C0C94557C0C94557CD4
8
+:10F8700011241FBECFEFD0E1DEBFCDBF11E0A0E06D
9
+:10F88000B1E0EAE5FFEF02C005900D92A030B107AC
10
+:10F89000D9F712E0A0E0B1E001C01D92A930B10794
11
+:10F8A000E1F70E944D7D0C94AC7F0C94007CCF93CB
12
+:10F8B000DF93CDB7DEB724970FB6F894DEBF0FBE47
13
+:10F8C000CDBF882309F481E020E0482F552741155A
14
+:10F8D000510509F43DC0289A19821A821B821C82A4
15
+:10F8E0000BC089819A81AB81BC810196A11DB11D9C
16
+:10F8F00089839A83AB83BC8389819A81AB81BC81E4
17
+:10F9000080589E43A040B04060F3289819821A8224
18
+:10F910001B821C820BC089819A81AB81BC810196BC
19
+:10F92000A11DB11D89839A83AB83BC8389819A8190
20
+:10F93000AB81BC8180509A4FA040B04060F32F5FF4
21
+:10F94000822F992787FD9095841795070CF4C3CFD4
22
+:10F9500019821A821B821C8289819A81AB81BC81A7
23
+:10F9600080509147A240B040A0F489819A81AB8138
24
+:10F97000BC810196A11DB11D89839A83AB83BC8391
25
+:10F9800089819A81AB81BC8180509147A240B0406F
26
+:10F9900060F324960FB6F894DEBF0FBECDBFDF91A3
27
+:10F9A000CF910895EF92FF920F931F93EE24FF24BF
28
+:10F9B000870128988091C00087FD17C00894E11C3A
29
+:10F9C000F11C011D111D81E0E81689E0F8068DE3A8
30
+:10F9D000080780E0180770F3E0910001F091010141
31
+:10F9E00009958091C00087FFE9CF289A8091C600D1
32
+:10F9F000992787FD90951F910F91FF90EF900895A3
33
+:10FA0000982F8091C00085FFFCCF9093C600089589
34
+:10FA10000E94D27C803271F0809102018F5F8093CE
35
+:10FA20000201853009F00895E0910001F091010193
36
+:10FA30000995089584E10E94007D80E10E94007D87
37
+:10FA40000895CF93C82F0E94D27C803241F08091DC
38
+:10FA500002018F5F80930201853081F40AC084E146
39
+:10FA60000E94007D8C2F0E94007D80E10E94007D1D
40
+:10FA700005C0E0910001F09101010995CF91089531
41
+:10FA8000282F90E007C08091C0008823E4F7809180
42
+:10FA9000C6009F5F9217B8F30895CFEFD0E1DEBFA5
43
+:10FAA000CDBF000094B714BE809160008861809340
44
+:10FAB00060001092600091FF74C189E18093C400DE
45
+:10FAC0001092C50088E18093C10086E08093C20057
46
+:10FAD0005098589A209A83E00E94577C81E00E94B7
47
+:10FAE000577C0E94D27C8033B9F18133C1F18034DC
48
+:10FAF00009F456C0813409F45CC0823409F46EC044
49
+:10FB0000853409F471C0803539F1813509F4F3C0C9
50
+:10FB1000823511F1853509F4D3C0863509F4CBC09F
51
+:10FB2000843609F465C0843709F4EBC0853709F4DD
52
+:10FB3000D2C0863709F44AC0809102018F5F80935A
53
+:10FB40000201853071F6E0910001F0910101099503
54
+:10FB50000E94D27C803349F60E94087DC2CF0E9469
55
+:10FB6000D27CC82F803241F784E10E94007D81E47D
56
+:10FB70000E94007D86E50E94007D82E50E94007D56
57
+:10FB80008C2F0E94007D89E40E94007D83E50E9405
58
+:10FB9000007D80E50E94007D80E10E94007DA1CF74
59
+:10FBA0000E94D27C8638C0F20E94D27C0E94087DDE
60
+:10FBB00098CF0E94D27C803809F407C1813809F4BB
61
+:10FBC00000C1823809F4F9C0883921F080E00E9430
62
+:10FBD000217D87CF83E00E94217D83CF84E10E9435
63
+:10FBE000407D0E94087D7DCF85E00E94407DF9CF59
64
+:10FBF0000E94D27C809306020E94D27C80930502F0
65
+:10FC0000809108028E7F809308020E94D27C853406
66
+:10FC100009F44BC0E5E0F1E0119281E0E438F80727
67
+:10FC2000D9F3D0F3C0E0D0E08091050290910602B4
68
+:10FC30001816190678F405E011E00E94D27CF8014C
69
+:10FC400081938F0121968091050290910602C81739
70
+:10FC5000D90798F30E94D27C803209F06DCF809151
71
+:10FC6000080280FFB6C0C0E0D0E0209105023091CC
72
+:10FC7000060212161306B8F4E0910301F091040194
73
+:10FC8000A5E0B1E0F999FECFF2BDE1BD8D9180BD57
74
+:10FC9000FA9AF99A31962196C217D30798F3F093FE
75
+:10FCA0000401E093030184E175CF80910802816033
76
+:10FCB00080930802AFCF84E00E94407D80E087CF30
77
+:10FCC0000E94D27C809303010E94D27C8093040125
78
+:10FCD0000E94087D06CF0E94D27C803209F02CCF92
79
+:10FCE00084E10E94007D8EE10E94007D86E90E94F1
80
+:10FCF000007D89E04FCF0E94087D88E080936000FE
81
+:10FD0000FFCF0E94D27C809306020E94D27C809317
82
+:10FD100005020E94D27C853409F449C08091080212
83
+:10FD20008E7F809308028091030190910401880FD7
84
+:10FD3000991F90930401809303010E94D27C80322A
85
+:10FD400009F0CFCE84E10E94007DC0E0D0E0209198
86
+:10FD50000502309106021216130608F01DCFE0913D
87
+:10FD60000301F09104018091080280FF96C0F99987
88
+:10FD7000FECFF2BDE1BDF89A80B50E94007DE09112
89
+:10FD80000301F09104013196F0930401E093030123
90
+:10FD900020910502309106022196C217D30718F36D
91
+:10FDA000FBCEE0910001F0910101099586CE809192
92
+:10FDB0000802816080930802C0CF80E10E94217D0B
93
+:10FDC00090CE81E00E94217D8CCE82E00E94217D38
94
+:10FDD00088CE8091030190910401880F991F909320
95
+:10FDE0000401809303018091050280FF09C0809186
96
+:10FDF00005029091060201969093060280930502F7
97
+:10FE0000F999FECF1127E0910301F0910401C5E0BB
98
+:10FE1000D1E08091050290910602103091F400919A
99
+:10FE2000570001700130D9F303E000935700E895C3
100
+:10FE30000091570001700130D9F301E100935700A0
101
+:10FE4000E895099019900091570001700130D9F39D
102
+:10FE500001E000935700E8951395103898F01127AA
103
+:10FE60000091570001700130D9F305E0009357006D
104
+:10FE7000E8950091570001700130D9F301E100933A
105
+:10FE80005700E8953296029709F0C7CF103011F06D
106
+:10FE90000296E5CF112484E17DCE869580FF06C0D1
107
+:10FEA0003196F0930401E093030176CF84910E9490
108
+:10FEB000007D2091050230910602E0910301F0914E
109
+:10FEC0000401EECF1F93CF930E94D27CC82F0E94D3
110
+:10FED000007D0E94D27C182F0E94007DC1362CF03C
111
+:10FEE000C75511363CF0175508C0C033D4F3C05382
112
+:10FEF0001136CCF710330CF01053C295C07FC10FF0
113
+:10FF00008C2F992787FD9095CF911F910895CF93BE
114
+:10FF1000282F992787FD9095807F907095958795DC
115
+:10FF20009595879595958795959587958A303CF019
116
+:10FF3000895AC22FCF70CA303CF0C95A06C0805DC2
117
+:10FF4000C22FCF70CA30CCF7C05D0E94007D8C2FCD
118
+:0AFF50000E94007DCF910895FFCFBD
119
+:040000030000F80001
120
+:00000001FF

+ 121
- 0
ArduinoAddons/Arduino_1.6.4+/Marlin/avr/bootloaders/atmega644p/ATmegaBOOT_644P.hex View File

@@ -0,0 +1,121 @@
1
+:10F800000C943E7C0C945B7C0C945B7C0C945B7C39
2
+:10F810000C945B7C0C945B7C0C945B7C0C945B7C0C
3
+:10F820000C945B7C0C945B7C0C945B7C0C945B7CFC
4
+:10F830000C945B7C0C945B7C0C945B7C0C945B7CEC
5
+:10F840000C945B7C0C945B7C0C945B7C0C945B7CDC
6
+:10F850000C945B7C0C945B7C0C945B7C0C945B7CCC
7
+:10F860000C945B7C0C945B7C0C945B7C0C945B7CBC
8
+:10F870000C945B7C0C945B7C0C945B7C11241FBE11
9
+:10F88000CFEFD0E1DEBFCDBF11E0A0E0B1E0E6E612
10
+:10F89000FFEF02C005900D92A030B107D9F712E03A
11
+:10F8A000A0E0B1E001C01D92A930B107E1F70E94CC
12
+:10F8B000537D0C94B27F0C94007CCF93DF93CDB733
13
+:10F8C000DEB724970FB6F894DEBF0FBECDBF8823F6
14
+:10F8D00009F481E020E0482F55274115510509F42E
15
+:10F8E0003DC0289A19821A821B821C820BC0898112
16
+:10F8F0009A81AB81BC810196A11DB11D89839A8338
17
+:10F90000AB83BC8389819A81AB81BC8180589E4343
18
+:10F91000A040B04060F3289819821A821B821C8292
19
+:10F920000BC089819A81AB81BC810196A11DB11D5B
20
+:10F9300089839A83AB83BC8389819A81AB81BC81A3
21
+:10F9400080509A4FA040B04060F32F5F822F9927DC
22
+:10F9500087FD9095841795070CF4C3CF19821A82FE
23
+:10F960001B821C8289819A81AB81BC818050914726
24
+:10F97000A240B040A0F489819A81AB81BC810196FC
25
+:10F98000A11DB11D89839A83AB83BC8389819A8130
26
+:10F99000AB81BC8180509147A240B04060F3249677
27
+:10F9A0000FB6F894DEBF0FBECDBFDF91CF910895A3
28
+:10F9B000EF92FF920F931F93EE24FF248701289864
29
+:10F9C0008091C00087FD17C00894E11CF11C011D47
30
+:10F9D000111D81E0E81689E0F8068DE3080780E054
31
+:10F9E000180770F3E0910001F091010109958091F1
32
+:10F9F000C00087FFE9CF289A8091C600992787FD2C
33
+:10FA000090951F910F91FF90EF900895982F8091FE
34
+:10FA1000C00085FFFCCF9093C60008950E94D87C5B
35
+:10FA2000803271F0809102018F5F809302018530F6
36
+:10FA300009F00895E0910001F09101010995089500
37
+:10FA400084E10E94067D80E10E94067D0895CF93A7
38
+:10FA5000C82F0E94D87C803241F0809102018F5FD4
39
+:10FA600080930201853081F40AC084E10E94067D02
40
+:10FA70008C2F0E94067D80E10E94067D05C0E091EA
41
+:10FA80000001F09101010995CF910895282F90E090
42
+:10FA900007C08091C0008823E4F78091C6009F5F73
43
+:10FAA0009217B8F30895CFEFD0E1DEBFCDBF0000CD
44
+:10FAB00094B714BE809160008861809360001092BA
45
+:10FAC000600091FF74C189E18093C4001092C50069
46
+:10FAD00088E18093C10086E08093C2005098589AD4
47
+:10FAE000209A83E00E945D7C81E00E945D7C0E9400
48
+:10FAF000D87C8033B9F18133C1F1803409F456C028
49
+:10FB0000813409F45CC0823409F46EC0853409F490
50
+:10FB100071C0803539F1813509F4F3C0823511F1B6
51
+:10FB2000853509F4D3C0863509F4CBC0843609F491
52
+:10FB300065C0843709F4EBC0853709F4D2C0863735
53
+:10FB400009F44AC0809102018F5F809302018530E1
54
+:10FB500071F6E0910001F091010109950E94D87CB5
55
+:10FB6000803349F60E940E7DC2CF0E94D87CC82FF8
56
+:10FB7000803241F784E10E94067D81E40E94067D87
57
+:10FB800086E50E94067D82E50E94067D8C2F0E94FC
58
+:10FB9000067D89E40E94067D83E50E94067D80E55E
59
+:10FBA0000E94067D80E10E94067DA1CF0E94D87C44
60
+:10FBB0008638C0F20E94D87C0E940E7D98CF0E94A9
61
+:10FBC000D87C803809F407C1813809F400C1823833
62
+:10FBD00009F4F9C0883921F080E00E94277D87CFA1
63
+:10FBE00083E00E94277D83CF84E10E94467D0E94AE
64
+:10FBF0000E7D7DCF85E00E94467DF9CF0E94D87CA6
65
+:10FC0000809306020E94D87C8093050280910802AE
66
+:10FC10008E7F809308020E94D87C853409F44BC003
67
+:10FC2000E5E0F1E0119281E0E438F807D9F3D0F390
68
+:10FC3000C0E0D0E0809105029091060218161906E6
69
+:10FC400078F405E011E00E94D87CF80181938F01DF
70
+:10FC500021968091050290910602C817D90798F362
71
+:10FC60000E94D87C803209F06DCF8091080280FF1D
72
+:10FC7000B6C0C0E0D0E02091050230910602121615
73
+:10FC80001306B8F4E0910301F0910401A5E0B1E09E
74
+:10FC9000F999FECFF2BDE1BD8D9180BDFA9AF99A36
75
+:10FCA00031962196C217D30798F3F0930401E0939D
76
+:10FCB000030184E175CF809108028160809308027E
77
+:10FCC000AFCF84E00E94467D80E087CF0E94D87C41
78
+:10FCD000809303010E94D87C809304010E940E7DD2
79
+:10FCE00006CF0E94D87C803209F02CCF84E10E949C
80
+:10FCF000067D8EE10E94067D86E90E94067D8AE0EF
81
+:10FD00004FCF0E940E7D88E080936000FFCF0E945D
82
+:10FD1000D87C809306020E94D87C809305020E94C2
83
+:10FD2000D87C853409F449C0809108028E7F809385
84
+:10FD300008028091030190910401880F991F90930C
85
+:10FD40000401809303010E94D87C803209F0CFCE59
86
+:10FD500084E10E94067DC0E0D0E020910502309150
87
+:10FD600006021216130608F01DCFE0910301F09170
88
+:10FD700004018091080280FF96C0F999FECFF2BD80
89
+:10FD8000E1BDF89A80B50E94067DE0910301F091F3
90
+:10FD900004013196F0930401E093030120910502E0
91
+:10FDA000309106022196C217D30718F3FBCEE091DB
92
+:10FDB0000001F0910101099586CE809108028160D1
93
+:10FDC00080930802C0CF80E10E94277D90CE81E021
94
+:10FDD0000E94277D8CCE82E00E94277D88CE809174
95
+:10FDE000030190910401880F991F9093040180935F
96
+:10FDF00003018091050280FF09C080910502909166
97
+:10FE0000060201969093060280930502F999FECFAF
98
+:10FE10001127E0910301F0910401C5E0D1E0809148
99
+:10FE2000050290910602103091F400915700017084
100
+:10FE30000130D9F303E000935700E8950091570093
101
+:10FE400001700130D9F301E100935700E895099062
102
+:10FE500019900091570001700130D9F301E000932F
103
+:10FE60005700E8951395103898F011270091570026
104
+:10FE700001700130D9F305E000935700E895009137
105
+:10FE8000570001700130D9F301E100935700E89564
106
+:10FE90003296029709F0C7CF103011F00296E5CFE5
107
+:10FEA000112484E17DCE869580FF06C03196F093C3
108
+:10FEB0000401E093030176CF84910E94067D209196
109
+:10FEC000050230910602E0910301F0910401EECFAA
110
+:10FED0001F93CF930E94D87CC82F0E94067D0E945A
111
+:10FEE000D87C182F0E94067DC1362CF0C7551136DC
112
+:10FEF0003CF0175508C0C033D4F3C0531136CCF7CB
113
+:10FF000010330CF01053C295C07FC10F8C2F99276E
114
+:10FF100087FD9095CF911F910895CF93282F992712
115
+:10FF200087FD9095807F907095958795959587959D
116
+:10FF300095958795959587958A303CF0895AC22F7B
117
+:10FF4000CF70CA303CF0C95A06C0805DC22FCF7056
118
+:10FF5000CA30CCF7C05D0E94067D8C2F0E94067DC2
119
+:06FF6000CF910895FFCFD0
120
+:040000030000F80001
121
+:00000001FF

+ 723
- 0
ArduinoAddons/Arduino_1.6.4+/Marlin/avr/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.6.4+/Marlin/avr/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.6.4+/Marlin/avr/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
+#######################################

+ 310
- 0
ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/LiquidCrystal/LiquidCrystal.cpp View File

@@ -0,0 +1,310 @@
1
+#include "LiquidCrystal.h"
2
+
3
+#include <stdio.h>
4
+#include <string.h>
5
+#include <inttypes.h>
6
+#include "Arduino.h"
7
+
8
+// When the display powers up, it is configured as follows:
9
+//
10
+// 1. Display clear
11
+// 2. Function set: 
12
+//    DL = 1; 8-bit interface data 
13
+//    N = 0; 1-line display 
14
+//    F = 0; 5x8 dot character font 
15
+// 3. Display on/off control: 
16
+//    D = 0; Display off 
17
+//    C = 0; Cursor off 
18
+//    B = 0; Blinking off 
19
+// 4. Entry mode set: 
20
+//    I/D = 1; Increment by 1 
21
+//    S = 0; No shift 
22
+//
23
+// Note, however, that resetting the Arduino doesn't reset the LCD, so we
24
+// can't assume that it's in that state when a sketch starts (and the
25
+// LiquidCrystal constructor is called).
26
+
27
+LiquidCrystal::LiquidCrystal(uint8_t rs, uint8_t rw, uint8_t enable,
28
+			     uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
29
+			     uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7)
30
+{
31
+  init(0, rs, rw, enable, d0, d1, d2, d3, d4, d5, d6, d7);
32
+}
33
+
34
+LiquidCrystal::LiquidCrystal(uint8_t rs, uint8_t enable,
35
+			     uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
36
+			     uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7)
37
+{
38
+  init(0, rs, 255, enable, d0, d1, d2, d3, d4, d5, d6, d7);
39
+}
40
+
41
+LiquidCrystal::LiquidCrystal(uint8_t rs, uint8_t rw, uint8_t enable,
42
+			     uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3)
43
+{
44
+  init(1, rs, rw, enable, d0, d1, d2, d3, 0, 0, 0, 0);
45
+}
46
+
47
+LiquidCrystal::LiquidCrystal(uint8_t rs,  uint8_t enable,
48
+			     uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3)
49
+{
50
+  init(1, rs, 255, enable, d0, d1, d2, d3, 0, 0, 0, 0);
51
+}
52
+
53
+void LiquidCrystal::init(uint8_t fourbitmode, uint8_t rs, uint8_t rw, uint8_t enable,
54
+			 uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
55
+			 uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7)
56
+{
57
+  _rs_pin = rs;
58
+  _rw_pin = rw;
59
+  _enable_pin = enable;
60
+  
61
+  _data_pins[0] = d0;
62
+  _data_pins[1] = d1;
63
+  _data_pins[2] = d2;
64
+  _data_pins[3] = d3; 
65
+  _data_pins[4] = d4;
66
+  _data_pins[5] = d5;
67
+  _data_pins[6] = d6;
68
+  _data_pins[7] = d7; 
69
+
70
+  pinMode(_rs_pin, OUTPUT);
71
+  // we can save 1 pin by not using RW. Indicate by passing 255 instead of pin#
72
+  if (_rw_pin != 255) { 
73
+    pinMode(_rw_pin, OUTPUT);
74
+  }
75
+  pinMode(_enable_pin, OUTPUT);
76
+  
77
+  if (fourbitmode)
78
+    _displayfunction = LCD_4BITMODE | LCD_1LINE | LCD_5x8DOTS;
79
+  else 
80
+    _displayfunction = LCD_8BITMODE | LCD_1LINE | LCD_5x8DOTS;
81
+  
82
+  begin(16, 1);  
83
+}
84
+
85
+void LiquidCrystal::begin(uint8_t cols, uint8_t lines, uint8_t dotsize) {
86
+  if (lines > 1) {
87
+    _displayfunction |= LCD_2LINE;
88
+  }
89
+  _numlines = lines;
90
+  _currline = 0;
91
+
92
+  // for some 1 line displays you can select a 10 pixel high font
93
+  if ((dotsize != 0) && (lines == 1)) {
94
+    _displayfunction |= LCD_5x10DOTS;
95
+  }
96
+
97
+  // SEE PAGE 45/46 FOR INITIALIZATION SPECIFICATION!
98
+  // according to datasheet, we need at least 40ms after power rises above 2.7V
99
+  // before sending commands. Arduino can turn on way befer 4.5V so we'll wait 50
100
+  delayMicroseconds(50000); 
101
+  // Now we pull both RS and R/W low to begin commands
102
+  digitalWrite(_rs_pin, LOW);
103
+  digitalWrite(_enable_pin, LOW);
104
+  if (_rw_pin != 255) { 
105
+    digitalWrite(_rw_pin, LOW);
106
+  }
107
+  
108
+  //put the LCD into 4 bit or 8 bit mode
109
+  if (! (_displayfunction & LCD_8BITMODE)) {
110
+    // this is according to the hitachi HD44780 datasheet
111
+    // figure 24, pg 46
112
+
113
+    // we start in 8bit mode, try to set 4 bit mode
114
+    write4bits(0x03);
115
+    delayMicroseconds(4500); // wait min 4.1ms
116
+
117
+    // second try
118
+    write4bits(0x03);
119
+    delayMicroseconds(4500); // wait min 4.1ms
120
+    
121
+    // third go!
122
+    write4bits(0x03); 
123
+    delayMicroseconds(150);
124
+
125
+    // finally, set to 4-bit interface
126
+    write4bits(0x02); 
127
+  } else {
128
+    // this is according to the hitachi HD44780 datasheet
129
+    // page 45 figure 23
130
+
131
+    // Send function set command sequence
132
+    command(LCD_FUNCTIONSET | _displayfunction);
133
+    delayMicroseconds(4500);  // wait more than 4.1ms
134
+
135
+    // second try
136
+    command(LCD_FUNCTIONSET | _displayfunction);
137
+    delayMicroseconds(150);
138
+
139
+    // third go
140
+    command(LCD_FUNCTIONSET | _displayfunction);
141
+  }
142
+
143
+  // finally, set # lines, font size, etc.
144
+  command(LCD_FUNCTIONSET | _displayfunction);  
145
+
146
+  // turn the display on with no cursor or blinking default
147
+  _displaycontrol = LCD_DISPLAYON | LCD_CURSOROFF | LCD_BLINKOFF;  
148
+  display();
149
+
150
+  // clear it off
151
+  clear();
152
+
153
+  // Initialize to default text direction (for romance languages)
154
+  _displaymode = LCD_ENTRYLEFT | LCD_ENTRYSHIFTDECREMENT;
155
+  // set the entry mode
156
+  command(LCD_ENTRYMODESET | _displaymode);
157
+
158
+}
159
+
160
+/********** high level commands, for the user! */
161
+void LiquidCrystal::clear()
162
+{
163
+  command(LCD_CLEARDISPLAY);  // clear display, set cursor position to zero
164
+  delayMicroseconds(2000);  // this command takes a long time!
165
+}
166
+
167
+void LiquidCrystal::home()
168
+{
169
+  command(LCD_RETURNHOME);  // set cursor position to zero
170
+  delayMicroseconds(2000);  // this command takes a long time!
171
+}
172
+
173
+void LiquidCrystal::setCursor(uint8_t col, uint8_t row)
174
+{
175
+  int row_offsets[] = { 0x00, 0x40, 0x14, 0x54 };
176
+  if ( row >= _numlines ) {
177
+    row = _numlines-1;    // we count rows starting w/0
178
+  }
179
+  
180
+  command(LCD_SETDDRAMADDR | (col + row_offsets[row]));
181
+}
182
+
183
+// Turn the display on/off (quickly)
184
+void LiquidCrystal::noDisplay() {
185
+  _displaycontrol &= ~LCD_DISPLAYON;
186
+  command(LCD_DISPLAYCONTROL | _displaycontrol);
187
+}
188
+void LiquidCrystal::display() {
189
+  _displaycontrol |= LCD_DISPLAYON;
190
+  command(LCD_DISPLAYCONTROL | _displaycontrol);
191
+}
192
+
193
+// Turns the underline cursor on/off
194
+void LiquidCrystal::noCursor() {
195
+  _displaycontrol &= ~LCD_CURSORON;
196
+  command(LCD_DISPLAYCONTROL | _displaycontrol);
197
+}
198
+void LiquidCrystal::cursor() {
199
+  _displaycontrol |= LCD_CURSORON;
200
+  command(LCD_DISPLAYCONTROL | _displaycontrol);
201
+}
202
+
203
+// Turn on and off the blinking cursor
204
+void LiquidCrystal::noBlink() {
205
+  _displaycontrol &= ~LCD_BLINKON;
206
+  command(LCD_DISPLAYCONTROL | _displaycontrol);
207
+}
208
+void LiquidCrystal::blink() {
209
+  _displaycontrol |= LCD_BLINKON;
210
+  command(LCD_DISPLAYCONTROL | _displaycontrol);
211
+}
212
+
213
+// These commands scroll the display without changing the RAM
214
+void LiquidCrystal::scrollDisplayLeft(void) {
215
+  command(LCD_CURSORSHIFT | LCD_DISPLAYMOVE | LCD_MOVELEFT);
216
+}
217
+void LiquidCrystal::scrollDisplayRight(void) {
218
+  command(LCD_CURSORSHIFT | LCD_DISPLAYMOVE | LCD_MOVERIGHT);
219
+}
220
+
221
+// This is for text that flows Left to Right
222
+void LiquidCrystal::leftToRight(void) {
223
+  _displaymode |= LCD_ENTRYLEFT;
224
+  command(LCD_ENTRYMODESET | _displaymode);
225
+}
226
+
227
+// This is for text that flows Right to Left
228
+void LiquidCrystal::rightToLeft(void) {
229
+  _displaymode &= ~LCD_ENTRYLEFT;
230
+  command(LCD_ENTRYMODESET | _displaymode);
231
+}
232
+
233
+// This will 'right justify' text from the cursor
234
+void LiquidCrystal::autoscroll(void) {
235
+  _displaymode |= LCD_ENTRYSHIFTINCREMENT;
236
+  command(LCD_ENTRYMODESET | _displaymode);
237
+}
238
+
239
+// This will 'left justify' text from the cursor
240
+void LiquidCrystal::noAutoscroll(void) {
241
+  _displaymode &= ~LCD_ENTRYSHIFTINCREMENT;
242
+  command(LCD_ENTRYMODESET | _displaymode);
243
+}
244
+
245
+// Allows us to fill the first 8 CGRAM locations
246
+// with custom characters
247
+void LiquidCrystal::createChar(uint8_t location, uint8_t charmap[]) {
248
+  location &= 0x7; // we only have 8 locations 0-7
249
+  command(LCD_SETCGRAMADDR | (location << 3));
250
+  for (int i=0; i<8; i++) {
251
+    write(charmap[i]);
252
+  }
253
+}
254
+
255
+/*********** mid level commands, for sending data/cmds */
256
+
257
+inline void LiquidCrystal::command(uint8_t value) {
258
+  send(value, LOW);
259
+}
260
+
261
+inline size_t LiquidCrystal::write(uint8_t value) {
262
+  send(value, HIGH);
263
+  return 1; // assume sucess
264
+}
265
+
266
+/************ low level data pushing commands **********/
267
+
268
+// write either command or data, with automatic 4/8-bit selection
269
+void LiquidCrystal::send(uint8_t value, uint8_t mode) {
270
+  digitalWrite(_rs_pin, mode);
271
+
272
+  // if there is a RW pin indicated, set it low to Write
273
+  if (_rw_pin != 255) { 
274
+    digitalWrite(_rw_pin, LOW);
275
+  }
276
+  
277
+  if (_displayfunction & LCD_8BITMODE) {
278
+    write8bits(value); 
279
+  } else {
280
+    write4bits(value>>4);
281
+    write4bits(value);
282
+  }
283
+}
284
+
285
+void LiquidCrystal::pulseEnable(void) {
286
+  digitalWrite(_enable_pin, LOW);
287
+  delayMicroseconds(1);    
288
+  digitalWrite(_enable_pin, HIGH);
289
+  delayMicroseconds(1);    // enable pulse must be >450ns
290
+  digitalWrite(_enable_pin, LOW);
291
+  delayMicroseconds(100);   // commands need > 37us to settle
292
+}
293
+
294
+void LiquidCrystal::write4bits(uint8_t value) {
295
+  for (int i = 0; i < 4; i++) {
296
+    pinMode(_data_pins[i], OUTPUT);
297
+    digitalWrite(_data_pins[i], (value >> i) & 0x01);
298
+  }
299
+
300
+  pulseEnable();
301
+}
302
+
303
+void LiquidCrystal::write8bits(uint8_t value) {
304
+  for (int i = 0; i < 8; i++) {
305
+    pinMode(_data_pins[i], OUTPUT);
306
+    digitalWrite(_data_pins[i], (value >> i) & 0x01);
307
+  }
308
+  
309
+  pulseEnable();
310
+}

+ 106
- 0
ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/LiquidCrystal/LiquidCrystal.h View File

@@ -0,0 +1,106 @@
1
+#ifndef LiquidCrystal_h
2
+#define LiquidCrystal_h
3
+
4
+#include <inttypes.h>
5
+#include "Print.h"
6
+
7
+// commands
8
+#define LCD_CLEARDISPLAY 0x01
9
+#define LCD_RETURNHOME 0x02
10
+#define LCD_ENTRYMODESET 0x04
11
+#define LCD_DISPLAYCONTROL 0x08
12
+#define LCD_CURSORSHIFT 0x10
13
+#define LCD_FUNCTIONSET 0x20
14
+#define LCD_SETCGRAMADDR 0x40
15
+#define LCD_SETDDRAMADDR 0x80
16
+
17
+// flags for display entry mode
18
+#define LCD_ENTRYRIGHT 0x00
19
+#define LCD_ENTRYLEFT 0x02
20
+#define LCD_ENTRYSHIFTINCREMENT 0x01
21
+#define LCD_ENTRYSHIFTDECREMENT 0x00
22
+
23
+// flags for display on/off control
24
+#define LCD_DISPLAYON 0x04
25
+#define LCD_DISPLAYOFF 0x00
26
+#define LCD_CURSORON 0x02
27
+#define LCD_CURSOROFF 0x00
28
+#define LCD_BLINKON 0x01
29
+#define LCD_BLINKOFF 0x00
30
+
31
+// flags for display/cursor shift
32
+#define LCD_DISPLAYMOVE 0x08
33
+#define LCD_CURSORMOVE 0x00
34
+#define LCD_MOVERIGHT 0x04
35
+#define LCD_MOVELEFT 0x00
36
+
37
+// flags for function set
38
+#define LCD_8BITMODE 0x10
39
+#define LCD_4BITMODE 0x00
40
+#define LCD_2LINE 0x08
41
+#define LCD_1LINE 0x00
42
+#define LCD_5x10DOTS 0x04
43
+#define LCD_5x8DOTS 0x00
44
+
45
+class LiquidCrystal : public Print {
46
+public:
47
+  LiquidCrystal(uint8_t rs, uint8_t enable,
48
+		uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
49
+		uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7);
50
+  LiquidCrystal(uint8_t rs, uint8_t rw, uint8_t enable,
51
+		uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
52
+		uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7);
53
+  LiquidCrystal(uint8_t rs, uint8_t rw, uint8_t enable,
54
+		uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3);
55
+  LiquidCrystal(uint8_t rs, uint8_t enable,
56
+		uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3);
57
+
58
+  void init(uint8_t fourbitmode, uint8_t rs, uint8_t rw, uint8_t enable,
59
+	    uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
60
+	    uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7);
61
+    
62
+  void begin(uint8_t cols, uint8_t rows, uint8_t charsize = LCD_5x8DOTS);
63
+
64
+  void clear();
65
+  void home();
66
+
67
+  void noDisplay();
68
+  void display();
69
+  void noBlink();
70
+  void blink();
71
+  void noCursor();
72
+  void cursor();
73
+  void scrollDisplayLeft();
74
+  void scrollDisplayRight();
75
+  void leftToRight();
76
+  void rightToLeft();
77
+  void autoscroll();
78
+  void noAutoscroll();
79
+
80
+  void createChar(uint8_t, uint8_t[]);
81
+  void setCursor(uint8_t, uint8_t); 
82
+  virtual size_t write(uint8_t);
83
+  void command(uint8_t);
84
+  
85
+  using Print::write;
86
+private:
87
+  void send(uint8_t, uint8_t);
88
+  void write4bits(uint8_t);
89
+  void write8bits(uint8_t);
90
+  void pulseEnable();
91
+
92
+  uint8_t _rs_pin; // LOW: command.  HIGH: character.
93
+  uint8_t _rw_pin; // LOW: write to LCD.  HIGH: read from LCD.
94
+  uint8_t _enable_pin; // activated by a HIGH pulse.
95
+  uint8_t _data_pins[8];
96
+
97
+  uint8_t _displayfunction;
98
+  uint8_t _displaycontrol;
99
+  uint8_t _displaymode;
100
+
101
+  uint8_t _initialized;
102
+
103
+  uint8_t _numlines,_currline;
104
+};
105
+
106
+#endif

+ 37
- 0
ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/LiquidCrystal/keywords.txt View File

@@ -0,0 +1,37 @@
1
+#######################################
2
+# Syntax Coloring Map For LiquidCrystal
3
+#######################################
4
+
5
+#######################################
6
+# Datatypes (KEYWORD1)
7
+#######################################
8
+
9
+LiquidCrystal	KEYWORD1
10
+
11
+#######################################
12
+# Methods and Functions (KEYWORD2)
13
+#######################################
14
+
15
+begin	KEYWORD2
16
+clear	KEYWORD2
17
+home	KEYWORD2
18
+print	KEYWORD2
19
+setCursor	KEYWORD2
20
+cursor	KEYWORD2
21
+noCursor	KEYWORD2
22
+blink	KEYWORD2
23
+noBlink	KEYWORD2
24
+display	KEYWORD2
25
+noDisplay	KEYWORD2
26
+autoscroll	KEYWORD2
27
+noAutoscroll	KEYWORD2
28
+leftToRight	KEYWORD2
29
+rightToLeft	KEYWORD2
30
+scrollDisplayLeft	KEYWORD2
31
+scrollDisplayRight	KEYWORD2
32
+createChar	KEYWORD2
33
+
34
+#######################################
35
+# Constants (LITERAL1)
36
+#######################################
37
+

+ 66
- 0
ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/SPI/SPI.cpp View File

@@ -0,0 +1,66 @@
1
+/*
2
+ * Copyright (c) 2010 by Cristian Maglie <c.maglie@bug.st>
3
+ * SPI Master library for arduino.
4
+ *
5
+ * This file is free software; you can redistribute it and/or modify
6
+ * it under the terms of either the GNU General Public License version 2
7
+ * or the GNU Lesser General Public License version 2.1, both as
8
+ * published by the Free Software Foundation.
9
+ */
10
+
11
+#include "pins_arduino.h"
12
+#include "SPI.h"
13
+
14
+SPIClass SPI;
15
+
16
+void SPIClass::begin() {
17
+
18
+  // Set SS to high so a connected chip will be "deselected" by default
19
+  digitalWrite(SS, HIGH);
20
+
21
+  // When the SS pin is set as OUTPUT, it can be used as
22
+  // a general purpose output port (it doesn't influence
23
+  // SPI operations).
24
+  pinMode(SS, OUTPUT);
25
+
26
+  // Warning: if the SS pin ever becomes a LOW INPUT then SPI
27
+  // automatically switches to Slave, so the data direction of
28
+  // the SS pin MUST be kept as OUTPUT.
29
+  SPCR |= _BV(MSTR);
30
+  SPCR |= _BV(SPE);
31
+
32
+  // Set direction register for SCK and MOSI pin.
33
+  // MISO pin automatically overrides to INPUT.
34
+  // By doing this AFTER enabling SPI, we avoid accidentally
35
+  // clocking in a single bit since the lines go directly
36
+  // from "input" to SPI control.  
37
+  // http://code.google.com/p/arduino/issues/detail?id=888
38
+  pinMode(SCK, OUTPUT);
39
+  pinMode(MOSI, OUTPUT);
40
+}
41
+
42
+
43
+void SPIClass::end() {
44
+  SPCR &= ~_BV(SPE);
45
+}
46
+
47
+void SPIClass::setBitOrder(uint8_t bitOrder)
48
+{
49
+  if(bitOrder == LSBFIRST) {
50
+    SPCR |= _BV(DORD);
51
+  } else {
52
+    SPCR &= ~(_BV(DORD));
53
+  }
54
+}
55
+
56
+void SPIClass::setDataMode(uint8_t mode)
57
+{
58
+  SPCR = (SPCR & ~SPI_MODE_MASK) | mode;
59
+}
60
+
61
+void SPIClass::setClockDivider(uint8_t rate)
62
+{
63
+  SPCR = (SPCR & ~SPI_CLOCK_MASK) | (rate & SPI_CLOCK_MASK);
64
+  SPSR = (SPSR & ~SPI_2XCLOCK_MASK) | ((rate >> 2) & SPI_2XCLOCK_MASK);
65
+}
66
+

+ 70
- 0
ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/SPI/SPI.h View File

@@ -0,0 +1,70 @@
1
+/*
2
+ * Copyright (c) 2010 by Cristian Maglie <c.maglie@bug.st>
3
+ * SPI Master library for arduino.
4
+ *
5
+ * This file is free software; you can redistribute it and/or modify
6
+ * it under the terms of either the GNU General Public License version 2
7
+ * or the GNU Lesser General Public License version 2.1, both as
8
+ * published by the Free Software Foundation.
9
+ */
10
+
11
+#ifndef _SPI_H_INCLUDED
12
+#define _SPI_H_INCLUDED
13
+
14
+#include <stdio.h>
15
+#include <Arduino.h>
16
+#include <avr/pgmspace.h>
17
+
18
+#define SPI_CLOCK_DIV4 0x00
19
+#define SPI_CLOCK_DIV16 0x01
20
+#define SPI_CLOCK_DIV64 0x02
21
+#define SPI_CLOCK_DIV128 0x03
22
+#define SPI_CLOCK_DIV2 0x04
23
+#define SPI_CLOCK_DIV8 0x05
24
+#define SPI_CLOCK_DIV32 0x06
25
+//#define SPI_CLOCK_DIV64 0x07
26
+
27
+#define SPI_MODE0 0x00
28
+#define SPI_MODE1 0x04
29
+#define SPI_MODE2 0x08
30
+#define SPI_MODE3 0x0C
31
+
32
+#define SPI_MODE_MASK 0x0C  // CPOL = bit 3, CPHA = bit 2 on SPCR
33
+#define SPI_CLOCK_MASK 0x03  // SPR1 = bit 1, SPR0 = bit 0 on SPCR
34
+#define SPI_2XCLOCK_MASK 0x01  // SPI2X = bit 0 on SPSR
35
+
36
+class SPIClass {
37
+public:
38
+  inline static byte transfer(byte _data);
39
+
40
+  // SPI Configuration methods
41
+
42
+  inline static void attachInterrupt();
43
+  inline static void detachInterrupt(); // Default
44
+
45
+  static void begin(); // Default
46
+  static void end();
47
+
48
+  static void setBitOrder(uint8_t);
49
+  static void setDataMode(uint8_t);
50
+  static void setClockDivider(uint8_t);
51
+};
52
+
53
+extern SPIClass SPI;
54
+
55
+byte SPIClass::transfer(byte _data) {
56
+  SPDR = _data;
57
+  while (!(SPSR & _BV(SPIF)))
58
+    ;
59
+  return SPDR;
60
+}
61
+
62
+void SPIClass::attachInterrupt() {
63
+  SPCR |= _BV(SPIE);
64
+}
65
+
66
+void SPIClass::detachInterrupt() {
67
+  SPCR &= ~_BV(SPIE);
68
+}
69
+
70
+#endif

+ 36
- 0
ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/SPI/keywords.txt View File

@@ -0,0 +1,36 @@
1
+#######################################
2
+# Syntax Coloring Map SPI
3
+#######################################
4
+
5
+#######################################
6
+# Datatypes (KEYWORD1)
7
+#######################################
8
+
9
+SPI	KEYWORD1
10
+
11
+#######################################
12
+# Methods and Functions (KEYWORD2)
13
+#######################################
14
+begin	KEYWORD2
15
+end	KEYWORD2
16
+transfer	KEYWORD2
17
+setBitOrder	KEYWORD2
18
+setDataMode	KEYWORD2
19
+setClockDivider	KEYWORD2
20
+
21
+
22
+#######################################
23
+# Constants (LITERAL1)
24
+#######################################
25
+SPI_CLOCK_DIV4	LITERAL1
26
+SPI_CLOCK_DIV16	LITERAL1
27
+SPI_CLOCK_DIV64	LITERAL1
28
+SPI_CLOCK_DIV128	LITERAL1
29
+SPI_CLOCK_DIV2	LITERAL1
30
+SPI_CLOCK_DIV8	LITERAL1
31
+SPI_CLOCK_DIV32	LITERAL1
32
+SPI_CLOCK_DIV64	LITERAL1
33
+SPI_MODE0	LITERAL1
34
+SPI_MODE1	LITERAL1
35
+SPI_MODE2	LITERAL1
36
+SPI_MODE3	LITERAL1

+ 17
- 0
ArduinoAddons/Arduino_1.6.4+/Marlin/avr/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.6.4+/Marlin/avr/libraries/TMC26XStepper/Doxyfile
File diff suppressed because it is too large
View File


+ 10
- 0
ArduinoAddons/Arduino_1.6.4+/Marlin/avr/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.6.4+/Marlin/avr/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.6.4+/Marlin/avr/libraries/TMC26XStepper/TMC26XStepper.cpp
File diff suppressed because it is too large
View File


+ 607
- 0
ArduinoAddons/Arduino_1.6.4+/Marlin/avr/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.6.4+/Marlin/avr/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.6.4+/Marlin/avr/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.6.4+/Marlin/avr/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.6.4+/Marlin/avr/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.6.4+/Marlin/avr/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.6.4+/Marlin/avr/libraries/TMC26XStepper/documentation/html/bc_s.png View File


+ 117
- 0
ArduinoAddons/Arduino_1.6.4+/Marlin/avr/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.6.4+/Marlin/avr/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.6.4+/Marlin/avr/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.6.4+/Marlin/avr/libraries/TMC26XStepper/documentation/html/closed.png View File


+ 949
- 0
ArduinoAddons/Arduino_1.6.4+/Marlin/avr/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.6.4+/Marlin/avr/libraries/TMC26XStepper/documentation/html/doxygen.png View File


+ 72
- 0
ArduinoAddons/Arduino_1.6.4+/Marlin/avr/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.6.4+/Marlin/avr/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.6.4+/Marlin/avr/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.6.4+/Marlin/avr/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.6.4+/Marlin/avr/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.6.4+/Marlin/avr/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.6.4+/Marlin/avr/libraries/TMC26XStepper/documentation/html/jquery.js
File diff suppressed because it is too large
View File


+ 68
- 0
ArduinoAddons/Arduino_1.6.4+/Marlin/avr/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.6.4+/Marlin/avr/libraries/TMC26XStepper/documentation/html/nav_f.png View File


BIN
ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/TMC26XStepper/documentation/html/nav_h.png View File


BIN
ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/TMC26XStepper/documentation/html/open.png View File


BIN
ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/TMC26XStepper/documentation/html/tab_a.png View File


BIN
ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/TMC26XStepper/documentation/html/tab_b.png View File


BIN
ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/TMC26XStepper/documentation/html/tab_h.png View File


BIN
ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/TMC26XStepper/documentation/html/tab_s.png View File


+ 59
- 0
ArduinoAddons/Arduino_1.6.4+/Marlin/avr/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.6.4+/Marlin/avr/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.6.4+/Marlin/avr/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.6.4+/Marlin/avr/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.6.4+/Marlin/avr/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.6.4+/Marlin/avr/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.6.4+/Marlin/avr/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.6.4+/Marlin/avr/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.6.4+/Marlin/avr/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.6.4+/Marlin/avr/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.6.4+/Marlin/avr/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.6.4+/Marlin/avr/libraries/TMC26XStepper/examples/TMC26XMotorTester/processing/TMC26XMotorTest/data/mc_logo.jpg View File


BIN
ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/TMC26XStepper/examples/TMC26XMotorTester/processing/TMC26XMotorTest/data/tmc_logo.jpg View File


BIN
ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/TMC26XStepper/examples/TMC26XMotorTester/processing/TMC26XMotorTest/hysteresis.png View File


+ 2
- 0
ArduinoAddons/Arduino_1.6.4+/Marlin/avr/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.6.4+/Marlin/avr/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.6.4+/Marlin/avr/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.6.4+/Marlin/avr/libraries/TMC26XStepper/schematics/tmc-260-shield.brd
File diff suppressed because it is too large
View File


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


+ 114
- 0
ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/U8glib/ChangeLog View File

@@ -0,0 +1,114 @@
1
+
2
+u8glib ChangeLog
3
+
4
+2012-01-01      v0.01   Oliver Kraus <olikraus@gmail.com>
5
+  * first beta release for Arduino IDE with simple SSD1325 support
6
+2012-01-04      v0.02   Oliver Kraus <olikraus@gmail.com>
7
+  * support for some more display types
8
+2012-01-07      v0.03   Oliver Kraus <olikraus@gmail.com>
9
+  * fixed some bugs, added more examples
10
+2012-01-07      v0.04   Oliver Kraus <olikraus@gmail.com>
11
+  * single font file
12
+2012-01-08      v0.05   Oliver Kraus <olikraus@gmail.com>
13
+  * Cleanup
14
+  * More examples
15
+  * SSD1325 graylevel support
16
+2012-01-15      v0.06   Oliver Kraus <olikraus@gmail.com>
17
+  * LM6063 support
18
+2012-01-17      v0.07   Oliver Kraus <olikraus@gmail.com>
19
+  * LM6063 support (update)
20
+2012-01-19      v0.08   Oliver Kraus <olikraus@gmail.com>
21
+  * ST7920 beta device
22
+2012-01-21      v0.09   Oliver Kraus <olikraus@gmail.com>
23
+  * ST7920 fixed (192x32)
24
+  * fixed bug in com layer if pins are none
25
+  * str reference position
26
+2012-01-22      v0.10   Oliver Kraus <olikraus@gmail.com>
27
+  * Experimental LM6059 
28
+2012-01-24      v0.11   Oliver Kraus <olikraus@gmail.com>
29
+  * new st7920 memory layout for 128x64 lcd
30
+  * experimental st7920 SPI
31
+2012-01-25      v0.12   Oliver Kraus <olikraus@gmail.com>
32
+  * fixed st7920 memory layout for 128x64 lcd
33
+  * ST7920 SPI performance improvement
34
+2012-01-27	v0.13	Oliver Kraus <olikraus@gmail.com>
35
+  * LM6059 (Adafruit Display) fixed
36
+2012-02-01	v0.14	Oliver Kraus <olikraus@gmail.com>
37
+  * undoRotation()
38
+  * setRot..() can be used without restrictions
39
+  * Class U8GLIB derived from Print class. New function "print" 
40
+  * Fixed memory index bug in the page management procedures
41
+2012-02-12      v1.00	Oliver Kraus <olikraus@gmail.com>
42
+  * XBM support
43
+  * F() macro support
44
+  * str-rotation commands support ref-height and ref-position
45
+2012-03-17      v1.02	Oliver Kraus <olikraus@gmail.com>
46
+  * U8GLIB_ST7687_C144MVGD spi experimental
47
+  * U8GLIB_LC7981_160X80 8bit
48
+  * Intersection test for frame and box procedures
49
+  * 4L double memory architecture  
50
+  * setContrast infrastructure implemented, but not available for all devices
51
+  * drawCircle, drawDisc
52
+  * Bugfix for drawStr270
53
+  * New examples: Chess (ported from dogm128 lib) and GraphicsTest
54
+2012-03-31      v1.03	Oliver Kraus <olikraus@gmail.com>
55
+  * experimental parallel mode atmega
56
+  * more unifont code pages
57
+  * double memory, for NHD OLED and DOGXL160
58
+  * "Menu" example
59
+  * drawLine
60
+2012-04-13      v1.04	Oliver Kraus <olikraus@gmail.com>
61
+  * Adjust U8grelease: Same version number with AVR and Arduino variant
62
+2012-06-10	v1.05	Oliver Kraus <olikraus@gmail.com>
63
+  * m2icon font
64
+  * experimental lc7981_240x64 device
65
+  * experimental ssd1306
66
+  * experimental ssd1322
67
+  * Hardware state backup/restore procedure
68
+2012-06-15	v1.06	Oliver Kraus <olikraus@gmail.com>
69
+  * SBN1661 (SED1520?) support
70
+  * SSD1306 support
71
+  * U8G_PROGMEM bugfix
72
+2012-07-04	v1.07	Oliver Kraus <olikraus@gmail.com>
73
+  * Added Makefiles for AVR release (issue 77)
74
+  * Fixed examples for Arduino Environment (issue 78)
75
+2012-10-02	v1.08	Oliver Kraus <olikraus@gmail.com>
76
+  * Improved delay calculation for strobe pulse (issue 20)
77
+  * Support Chipkit (issue 39)
78
+  * Improved speed for ST7920 parallel mode (issue 79)
79
+  * Overall speed optimization (new page intersection algorithm)
80
+  * Support for Displays Newhaven NHD-C12864, CrystalFontz GFAG20232, Seeedstudio 96x96 OLED
81
+  * Added SPI support for ST7920 with plain AVR (issue 85)
82
+  * Add more LC7981 devices
83
+2012-12-23	v1.09	  Oliver Kraus <olikraus@gmail.com>
84
+  * Support for Displaytech 64128n
85
+  * Support for MINI12864
86
+  * HW SPI for ST7920
87
+  * Add delay after sending a byte with (ST7920 com)
88
+  * Support ATTiny
89
+  * Support I2C for SSD1306
90
+  * bdf2u8g, Windows executable released
91
+  * LC7981 320x64
92
+  * Scalue up: u8g::setScale2x2
93
+  * Added more bitmap fonts
94
+  * u8g::drawRBox(), u8g::drawRFrame()
95
+  * Support for CFAG20232 (st7920_202x32)
96
+  * Fixed ST7920 SW SPI for ChipKit
97
+  * Support for tls8204
98
+2013-02-02	v1.10	  Oliver Kraus <olikraus@gmail.com>
99
+  * Support for SSD1309
100
+  * Support for NHD-C12832A1Z 
101
+  * Bugfix: Fixed reset controll in parallel modes
102
+  * Bugfix: Fixed calculation of cursor position
103
+  * Bugfix: ST7920 parallel mode
104
+2013-03-2	v1.11	  Oliver Kraus <olikraus@gmail.com>
105
+  * Support for T6963
106
+  * Support for Arduino Due
107
+  * Sleep Mode
108
+  * 4x mode for ST7920
109
+  * New C++ interface for ST7920 
110
+
111
+  
112
+  
113
+  
114
+  

+ 21
- 0
ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/U8glib/INSTALL.TXT View File

@@ -0,0 +1,21 @@
1
+
2
+U8GLIB
3
+http://code.google.com/p/u8glib/
4
+
5
+
6
+Install instructions for the Arduino environment.
7
+
8
+  1. Unzip u8glib_arduino_vX.XX.zip into the "libraries" folder
9
+  2. Start Arduino IDE
10
+
11
+Install instructions for the Chipkit (Arduino) environment.
12
+
13
+  1. cd <mpide-... path>/libraries
14
+  2. unzip u8glib_arduino_vX.XX.zip
15
+  3. cd <mpide-... path>///hardware/pic32/libraries
16
+  4. again: u8glib_arduino_vX.XX.zip
17
+  5. Open hardware/pic32/cores/pic32/Print.h
18
+	  Remove line
19
+	    #define BYTE 0
20
+	  from the file, use PRINT_BYTE instead of BYTE. 
21
+	

+ 80
- 0
ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/U8glib/U8glib.cpp View File

@@ -0,0 +1,80 @@
1
+/*
2
+
3
+  U8glib.cpp
4
+
5
+  C++ Interface
6
+
7
+  Universal 8bit Graphics Library
8
+  
9
+  Copyright (c) 2011, olikraus@gmail.com
10
+  All rights reserved.
11
+
12
+  Redistribution and use in source and binary forms, with or without modification, 
13
+  are permitted provided that the following conditions are met:
14
+
15
+  * Redistributions of source code must retain the above copyright notice, this list 
16
+    of conditions and the following disclaimer.
17
+    
18
+  * Redistributions in binary form must reproduce the above copyright notice, this 
19
+    list of conditions and the following disclaimer in the documentation and/or other 
20
+    materials provided with the distribution.
21
+
22
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 
23
+  CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 
24
+  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
25
+  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
26
+  DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 
27
+  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
28
+  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
29
+  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
30
+  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 
31
+  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 
32
+  STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
33
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 
34
+  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
35
+
36
+*/
37
+
38
+#include "U8glib.h"
39
+
40
+
41
+
42
+uint8_t U8GLIB::initSPI(u8g_dev_t *dev, uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset)
43
+{
44
+  prepare();
45
+  return u8g_InitSPI(&u8g, dev, sck, mosi, cs, a0, reset);
46
+}
47
+
48
+uint8_t U8GLIB::initHWSPI(u8g_dev_t *dev, uint8_t cs, uint8_t a0, uint8_t reset)
49
+{
50
+  prepare();
51
+  return u8g_InitHWSPI(&u8g, dev, cs, a0, reset);
52
+}
53
+
54
+uint8_t U8GLIB::initI2C(u8g_dev_t *dev, uint8_t options)
55
+{
56
+  prepare();
57
+  return u8g_InitI2C(&u8g, dev, options);
58
+}
59
+
60
+uint8_t U8GLIB::init8Bit(u8g_dev_t *dev, uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7, 
61
+    uint8_t en, uint8_t cs1, uint8_t cs2, uint8_t di, uint8_t rw, uint8_t reset)
62
+{
63
+  prepare();
64
+  return u8g_Init8Bit(&u8g, dev, d0, d1, d2, d3, d4, d5, d6, d7, en, cs1, cs2, di, rw, reset); 
65
+}
66
+
67
+uint8_t U8GLIB::init8BitFixedPort(u8g_dev_t *dev, uint8_t en, uint8_t cs, uint8_t di, uint8_t rw, uint8_t reset)
68
+{
69
+  prepare();
70
+  return u8g_Init8BitFixedPort(&u8g, dev, en, cs, di, rw, reset);
71
+}
72
+
73
+uint8_t U8GLIB::initRW8Bit(u8g_dev_t *dev, uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7, 
74
+    uint8_t cs, uint8_t a0, uint8_t wr, uint8_t rd, uint8_t reset)
75
+{
76
+  prepare();
77
+  return u8g_InitRW8Bit(&u8g, dev, d0, d1, d2, d3, d4, d5, d6, d7, cs, a0, wr, rd, reset); 
78
+}
79
+
80
+

+ 826
- 0
ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/U8glib/U8glib.h View File

@@ -0,0 +1,826 @@
1
+/*
2
+
3
+  U8glib.h
4
+  
5
+  C++ Interface
6
+
7
+  Universal 8bit Graphics Library
8
+  
9
+  Copyright (c) 2011, olikraus@gmail.com
10
+  All rights reserved.
11
+
12
+  Redistribution and use in source and binary forms, with or without modification, 
13
+  are permitted provided that the following conditions are met:
14
+
15
+  * Redistributions of source code must retain the above copyright notice, this list 
16
+    of conditions and the following disclaimer.
17
+    
18
+  * Redistributions in binary form must reproduce the above copyright notice, this 
19
+    list of conditions and the following disclaimer in the documentation and/or other 
20
+    materials provided with the distribution.
21
+
22
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 
23
+  CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 
24
+  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
25
+  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
26
+  DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 
27
+  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
28
+  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
29
+  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
30
+  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 
31
+  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 
32
+  STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
33
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 
34
+  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
35
+
36
+*/
37
+
38
+#ifndef _CPP_U8GLIB
39
+#define _CPP_U8GLIB
40
+
41
+#include <Print.h>
42
+#include "utility/u8g.h"
43
+
44
+
45
+class U8GLIB : public Print
46
+{
47
+  private:
48
+    u8g_t u8g;
49
+    u8g_uint_t tx, ty;          // current position for the Print base class procedures
50
+    uint8_t is_begin;
51
+
52
+    void prepare(void) { tx = 0; ty = 0; is_begin = 0; }
53
+    void cbegin(void) { if ( is_begin == 0 ) { is_begin = 1; u8g_Begin(&u8g); } }
54
+    uint8_t initSPI(u8g_dev_t *dev, uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE);
55
+    uint8_t initHWSPI(u8g_dev_t *dev, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE);
56
+    uint8_t initI2C(u8g_dev_t *dev, uint8_t options);
57
+  protected:
58
+    uint8_t init8BitFixedPort(u8g_dev_t *dev, uint8_t en, uint8_t cs, uint8_t di, uint8_t rw, uint8_t reset);
59
+  private:
60
+    uint8_t init8Bit(u8g_dev_t *dev, uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7, 
61
+        uint8_t en, uint8_t cs1, uint8_t cs2, uint8_t di, uint8_t rw = U8G_PIN_NONE, uint8_t reset = U8G_PIN_NONE);
62
+    uint8_t initRW8Bit(u8g_dev_t *dev, uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7, 
63
+      uint8_t cs, uint8_t a0, uint8_t wr, uint8_t rd, uint8_t reset);
64
+  public:
65
+  
66
+    /* constructor */
67
+    U8GLIB(void)
68
+      { }
69
+    U8GLIB(u8g_dev_t *dev)
70
+      { prepare(); u8g_Init(&u8g, dev); }
71
+    U8GLIB(u8g_dev_t *dev, uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset) 
72
+      { initSPI(dev, sck, mosi, cs, a0, reset); }
73
+    U8GLIB(u8g_dev_t *dev, uint8_t cs, uint8_t a0, uint8_t reset) 
74
+      { initHWSPI(dev, cs, a0, reset); }
75
+    U8GLIB(u8g_dev_t *dev, uint8_t options) 
76
+      { initI2C(dev, options); }
77
+    U8GLIB(u8g_dev_t *dev, uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7, 
78
+        uint8_t en, uint8_t cs1, uint8_t cs2, uint8_t di, uint8_t rw, uint8_t reset) 
79
+      { init8Bit(dev, d0, d1, d2, d3, d4, d5, d6, d7, en, cs1, cs2, di, rw, reset); }
80
+    U8GLIB(u8g_dev_t *dev, uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7, 
81
+        uint8_t cs, uint8_t a0, uint8_t wr, uint8_t rd, uint8_t reset) 
82
+      { initRW8Bit(dev, d0, d1, d2, d3, d4, d5, d6, d7, cs, a0, wr, rd, reset); }
83
+
84
+    uint8_t begin(void) { is_begin = 1; return u8g_Begin(&u8g); }
85
+      
86
+    void setPrintPos(u8g_uint_t x, u8g_uint_t y) { tx = x; ty = y; }
87
+    u8g_t *getU8g(void) { return &u8g; }
88
+    
89
+    
90
+    /* implementation of the write interface to the print class */
91
+#if defined(ARDUINO) && ARDUINO >= 100
92
+    size_t write(uint8_t c) { tx += u8g_DrawGlyph(&u8g, tx, ty, c); return 1;}
93
+#else
94
+    void write(uint8_t c) { tx += u8g_DrawGlyph(&u8g, tx, ty, c); }
95
+#endif
96
+    
97
+     /* screen rotation */
98
+    void undoRotation(void) { u8g_UndoRotation(&u8g); }
99
+    void setRot90(void) { u8g_SetRot90(&u8g); }
100
+    void setRot180(void) { u8g_SetRot180(&u8g); }
101
+    void setRot270(void) { u8g_SetRot270(&u8g); }
102
+
103
+     /* screen scaling */
104
+    void undoScale(void) { u8g_UndoScale(&u8g); }
105
+    void setScale2x2(void) { u8g_SetScale2x2(&u8g); }
106
+    
107
+     /* picture loop */
108
+    void firstPage(void) { cbegin(); u8g_FirstPage(&u8g); }
109
+    uint8_t nextPage(void) { return u8g_NextPage(&u8g); }
110
+    
111
+    /* system commands */
112
+    uint8_t setContrast(uint8_t contrast) { cbegin(); return u8g_SetContrast(&u8g, contrast); }
113
+    void sleepOn(void) { u8g_SleepOn(&u8g); }
114
+    void sleepOff(void) { u8g_SleepOff(&u8g); }
115
+    
116
+    /* graphic primitives */
117
+    void setColorIndex(uint8_t color_index) { u8g_SetColorIndex(&u8g, color_index); }
118
+    uint8_t getColorIndex(void) { return u8g_GetColorIndex(&u8g); }
119
+    
120
+    void setDefaultForegroundColor(void) { u8g_SetDefaultForegroundColor(&u8g);  }
121
+    void setDefaultBackgroundColor(void) { u8g_SetDefaultBackgroundColor(&u8g);  }
122
+    void setDefaultMidColor(void) { u8g_SetDefaultMidColor(&u8g);  }
123
+    
124
+    u8g_uint_t getWidth(void) { return u8g_GetWidth(&u8g); }
125
+    u8g_uint_t getHeight(void) { return u8g_GetHeight(&u8g); }
126
+    uint8_t getMode(void) { return u8g_GetMode(&u8g); }
127
+
128
+    void drawPixel(u8g_uint_t x, u8g_uint_t y) { return u8g_DrawPixel(&u8g, x, y); }
129
+    void drawHLine(u8g_uint_t x, u8g_uint_t y, u8g_uint_t w) { u8g_DrawHLine(&u8g, x, y, w); }  
130
+    void drawVLine(u8g_uint_t x, u8g_uint_t y, u8g_uint_t h) { u8g_DrawVLine(&u8g, x, y, h); }
131
+    void drawLine(u8g_uint_t x1, u8g_uint_t y1, u8g_uint_t x2, u8g_uint_t y2) { u8g_DrawLine(&u8g, x1, y1, x2, y2); }
132
+    
133
+    void drawFrame(u8g_uint_t x, u8g_uint_t y, u8g_uint_t w, u8g_uint_t h) { u8g_DrawFrame(&u8g, x, y, w, h); }
134
+    void drawRFrame(u8g_uint_t x, u8g_uint_t y, u8g_uint_t w, u8g_uint_t h, u8g_uint_t r) { u8g_DrawRFrame(&u8g, x, y, w, h,r); }
135
+    void drawBox(u8g_uint_t x, u8g_uint_t y, u8g_uint_t w, u8g_uint_t h) { u8g_DrawBox(&u8g, x, y, w, h); }
136
+    void drawRBox(u8g_uint_t x, u8g_uint_t y, u8g_uint_t w, u8g_uint_t h, u8g_uint_t r) { u8g_DrawRBox(&u8g, x, y, w, h,r); }
137
+
138
+    void drawCircle(u8g_uint_t x0, u8g_uint_t y0, u8g_uint_t rad, uint8_t opt = U8G_DRAW_ALL) { u8g_DrawCircle(&u8g, x0, y0, rad, opt); }
139
+    void drawDisc(u8g_uint_t x0, u8g_uint_t y0, u8g_uint_t rad, uint8_t opt = U8G_DRAW_ALL) { u8g_DrawDisc(&u8g, x0, y0, rad, opt); }
140
+     
141
+    /* bitmap handling */
142
+    void drawBitmap(u8g_uint_t x, u8g_uint_t y, u8g_uint_t cnt, u8g_uint_t h, const uint8_t *bitmap) 
143
+      { u8g_DrawBitmap(&u8g, x, y, cnt, h, bitmap); }
144
+    void drawBitmapP(u8g_uint_t x, u8g_uint_t y, u8g_uint_t cnt, u8g_uint_t h, const u8g_pgm_uint8_t *bitmap)
145
+      { u8g_DrawBitmapP(&u8g, x, y, cnt, h, bitmap); }
146
+
147
+    void drawXBM(u8g_uint_t x, u8g_uint_t y, u8g_uint_t w, u8g_uint_t h, const uint8_t *bitmap)
148
+      { u8g_DrawXBM(&u8g, x, y, w, h, bitmap); }
149
+    void drawXBMP(u8g_uint_t x, u8g_uint_t y, u8g_uint_t w, u8g_uint_t h, const u8g_pgm_uint8_t *bitmap)
150
+      { u8g_DrawXBMP(&u8g, x, y, w, h, bitmap); }
151
+    
152
+      
153
+    /* font handling */
154
+    void setFont(const u8g_fntpgm_uint8_t *font) {u8g_SetFont(&u8g, font); }
155
+    int8_t getFontAscent(void) { return u8g_GetFontAscent(&u8g); }
156
+    int8_t getFontDescent(void) { return u8g_GetFontDescent(&u8g); }
157
+    int8_t getFontLineSpacing(void) { return u8g_GetFontLineSpacing(&u8g); }
158
+    
159
+    u8g_uint_t drawStr(u8g_uint_t x, u8g_uint_t y, const char *s) { return u8g_DrawStr(&u8g, x, y, s); }
160
+    u8g_uint_t drawStr90(u8g_uint_t x, u8g_uint_t y, const char *s) { return u8g_DrawStr90(&u8g, x, y, s); }
161
+    u8g_uint_t drawStr180(u8g_uint_t x, u8g_uint_t y, const char *s) { return u8g_DrawStr180(&u8g, x, y, s); }
162
+    u8g_uint_t drawStr270(u8g_uint_t x, u8g_uint_t y, const char *s) { return u8g_DrawStr270(&u8g, x, y, s); }
163
+    u8g_uint_t drawStrP(u8g_uint_t x, u8g_uint_t y, const u8g_pgm_uint8_t *s) { return u8g_DrawStrP(&u8g, x, y, s); }
164
+    u8g_uint_t drawStr90P(u8g_uint_t x, u8g_uint_t y, const u8g_pgm_uint8_t *s) { return u8g_DrawStr90P(&u8g, x, y, s); }
165
+    u8g_uint_t drawStr180P(u8g_uint_t x, u8g_uint_t y, const u8g_pgm_uint8_t *s) { return u8g_DrawStr180P(&u8g, x, y, s); }
166
+    u8g_uint_t drawStr270P(u8g_uint_t x, u8g_uint_t y, const u8g_pgm_uint8_t *s) { return u8g_DrawStr270P(&u8g, x, y, s); }
167
+    
168
+    void setFontPosBaseline(void) { u8g_SetFontPosBaseline(&u8g); }
169
+    void setFontPosBottom(void) { u8g_SetFontPosBottom(&u8g); }
170
+    void setFontPosCenter(void) { u8g_SetFontPosCenter(&u8g); }
171
+    void setFontPosTop(void) { u8g_SetFontPosTop(&u8g); }
172
+
173
+    void setFontRefHeightText(void) { u8g_SetFontRefHeightText(&u8g); }
174
+    void setFontRefHeightExtendedText(void) { u8g_SetFontRefHeightExtendedText(&u8g); }
175
+    void setFontRefHeightAll(void) { u8g_SetFontRefHeightAll(&u8g); }  
176
+    void setFontLineSpacingFactor(uint8_t factor) { u8g_SetFontLineSpacingFactor(&u8g, factor); }
177
+
178
+
179
+    u8g_uint_t getStrPixelWidth(const char *s) { return u8g_GetStrPixelWidth(&u8g, s); }
180
+    u8g_uint_t getStrPixelWidthP(u8g_pgm_uint8_t *s) { return u8g_GetStrPixelWidthP(&u8g, s); }
181
+    u8g_uint_t getStrWidth(const char *s) { return u8g_GetStrWidth(&u8g, s); } 
182
+    u8g_uint_t getStrWidthP(u8g_pgm_uint8_t *s) { return u8g_GetStrWidthP(&u8g, s); }
183
+    
184
+    void setHardwareBackup(u8g_state_cb backup_cb) { u8g_SetHardwareBackup(&u8g, backup_cb); }
185
+    
186
+#if defined(ARDUINO) && ARDUINO >= 100
187
+    // support for the F() macro
188
+    
189
+    u8g_uint_t drawStr(u8g_uint_t x, u8g_uint_t y, const __FlashStringHelper *s) { return u8g_DrawStrP(&u8g, x, y, (u8g_pgm_uint8_t *)s); }
190
+    u8g_uint_t drawStr90(u8g_uint_t x, u8g_uint_t y, const __FlashStringHelper *s) { return u8g_DrawStr90P(&u8g, x, y, (u8g_pgm_uint8_t *)s); }
191
+    u8g_uint_t drawStr180(u8g_uint_t x, u8g_uint_t y, const __FlashStringHelper *s) { return u8g_DrawStr180P(&u8g, x, y, (u8g_pgm_uint8_t *)s); }
192
+    u8g_uint_t drawStr270(u8g_uint_t x, u8g_uint_t y, const __FlashStringHelper *s) { return u8g_DrawStr270P(&u8g, x, y, (u8g_pgm_uint8_t *)s); }
193
+    
194
+    u8g_uint_t getStrPixelWidth(const __FlashStringHelper *s) { return u8g_GetStrPixelWidthP(&u8g, (u8g_pgm_uint8_t *)s); }
195
+    u8g_uint_t getStrWidth(const __FlashStringHelper *s) { return u8g_GetStrWidthP(&u8g, (u8g_pgm_uint8_t *)s); }
196
+#endif
197
+
198
+    /* cursor handling */
199
+    void setCursorFont(const u8g_pgm_uint8_t *cursor_font) { u8g_SetCursorFont(&u8g, cursor_font); }
200
+    void setCursorStyle(uint8_t encoding) { u8g_SetCursorStyle(&u8g, encoding); }
201
+    void setCursorPos(u8g_uint_t cursor_x, u8g_uint_t cursor_y) { u8g_SetCursorPos(&u8g, cursor_x, cursor_y); }
202
+    void setCursorColor(uint8_t fg, uint8_t bg) { u8g_SetCursorColor(&u8g, fg, bg); }
203
+    void enableCursor(void) { u8g_EnableCursor(&u8g); }
204
+    void disableCursor(void) { u8g_DisableCursor(&u8g); }
205
+    void drawCursor(void)  { u8g_DrawCursor(&u8g); }
206
+    
207
+    /* virtual screen */
208
+    
209
+    void setVirtualScreenDimension(u8g_uint_t width, u8g_uint_t height) { u8g_SetVirtualScreenDimension(&u8g, width, height); }
210
+    uint8_t addToVirtualScreen(u8g_uint_t x, u8g_uint_t y, U8GLIB &child_u8g) { return u8g_AddToVirtualScreen(&u8g, x, y, &child_u8g.u8g); }
211
+
212
+};
213
+
214
+
215
+class U8GLIB_DOGS102 : public U8GLIB 
216
+{
217
+  public:
218
+    U8GLIB_DOGS102(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) 
219
+      : U8GLIB(&u8g_dev_uc1701_dogs102_sw_spi, sck, mosi, cs, a0, reset)
220
+      { }
221
+    U8GLIB_DOGS102(uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) 
222
+      : U8GLIB(&u8g_dev_uc1701_dogs102_hw_spi, cs, a0, reset)
223
+      { }
224
+};
225
+
226
+class U8GLIB_MINI12864 : public U8GLIB 
227
+{
228
+  public:
229
+    U8GLIB_MINI12864(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) 
230
+      : U8GLIB(&u8g_dev_uc1701_mini12864_sw_spi, sck, mosi, cs, a0, reset)
231
+      { }
232
+    U8GLIB_MINI12864(uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) 
233
+      : U8GLIB(&u8g_dev_uc1701_mini12864_hw_spi, cs, a0, reset)
234
+      { }
235
+};
236
+
237
+class U8GLIB_DOGM132 : public U8GLIB 
238
+{
239
+  public:
240
+    U8GLIB_DOGM132(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) 
241
+      : U8GLIB(&u8g_dev_st7565_dogm132_sw_spi, sck, mosi, cs, a0, reset)
242
+      { }
243
+    U8GLIB_DOGM132(uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) 
244
+      : U8GLIB(&u8g_dev_st7565_dogm132_hw_spi, cs, a0, reset)
245
+      { }
246
+};
247
+
248
+class U8GLIB_NHD_C12832 : public U8GLIB 
249
+{
250
+  public:
251
+    U8GLIB_NHD_C12832(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) 
252
+      : U8GLIB(&u8g_dev_st7565_nhd_c12832_sw_spi, sck, mosi, cs, a0, reset)
253
+      { }
254
+    U8GLIB_NHD_C12832(uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) 
255
+      : U8GLIB(&u8g_dev_st7565_nhd_c12832_hw_spi, cs, a0, reset)
256
+      { }
257
+    U8GLIB_NHD_C12832(uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7, 
258
+        uint8_t en, uint8_t cs1, uint8_t di, uint8_t rw = U8G_PIN_NONE, uint8_t reset = U8G_PIN_NONE) 
259
+      : U8GLIB(&u8g_dev_st7565_nhd_c12832_parallel, d0, d1, d2, d3, d4, d5, d6, d7, en, cs1, U8G_PIN_NONE, di, rw, reset)
260
+      { }
261
+};
262
+
263
+class U8GLIB_DOGM128 : public U8GLIB 
264
+{
265
+  public:
266
+    U8GLIB_DOGM128(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) 
267
+      : U8GLIB(&u8g_dev_st7565_dogm128_sw_spi, sck, mosi, cs, a0, reset)
268
+      { }
269
+    U8GLIB_DOGM128(uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) 
270
+      : U8GLIB(&u8g_dev_st7565_dogm128_hw_spi, cs, a0, reset)
271
+      { }
272
+};
273
+
274
+class U8GLIB_LM6059 : public U8GLIB 
275
+{
276
+  public:
277
+    U8GLIB_LM6059(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) 
278
+      : U8GLIB(&u8g_dev_st7565_lm6059_sw_spi, sck, mosi, cs, a0, reset)
279
+      { }
280
+    U8GLIB_LM6059(uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) 
281
+      : U8GLIB(&u8g_dev_st7565_lm6059_hw_spi, cs, a0, reset)
282
+      { }
283
+};
284
+
285
+class U8GLIB_LM6063 : public U8GLIB 
286
+{
287
+  public:
288
+    U8GLIB_LM6063(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) 
289
+      : U8GLIB(&u8g_dev_st7565_lm6063_sw_spi, sck, mosi, cs, a0, reset)
290
+      { }
291
+    U8GLIB_LM6063(uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) 
292
+      : U8GLIB(&u8g_dev_st7565_lm6063_hw_spi, cs, a0, reset)
293
+      { }
294
+};
295
+
296
+class U8GLIB_64128N : public U8GLIB 
297
+{
298
+  public:
299
+    U8GLIB_64128N(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) 
300
+      : U8GLIB(&u8g_dev_st7565_64128n_sw_spi, sck, mosi, cs, a0, reset)
301
+      { }
302
+    U8GLIB_64128N(uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) 
303
+      : U8GLIB(&u8g_dev_st7565_64128n_hw_spi, cs, a0, reset)
304
+      { }
305
+};
306
+
307
+class U8GLIB_NHD_C12864 : public U8GLIB 
308
+{
309
+  public:
310
+    U8GLIB_NHD_C12864(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) 
311
+      : U8GLIB(&u8g_dev_st7565_nhd_c12864_sw_spi, sck, mosi, cs, a0, reset)
312
+      { }
313
+    U8GLIB_NHD_C12864(uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) 
314
+      : U8GLIB(&u8g_dev_st7565_nhd_c12864_hw_spi, cs, a0, reset)
315
+      { }
316
+};
317
+
318
+
319
+class U8GLIB_ST7920_128X64 : public U8GLIB 
320
+{
321
+  public:
322
+    U8GLIB_ST7920_128X64(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) 
323
+      : U8GLIB(&u8g_dev_st7920_128x64_sw_spi, sck, mosi, cs, a0, reset)
324
+      { }
325
+    U8GLIB_ST7920_128X64(uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) 
326
+      : U8GLIB(&u8g_dev_st7920_128x64_hw_spi, cs, a0, reset)
327
+      { }
328
+    U8GLIB_ST7920_128X64(uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7, 
329
+        uint8_t en, uint8_t cs1, uint8_t cs2, uint8_t di, uint8_t rw = U8G_PIN_NONE, uint8_t reset = U8G_PIN_NONE) 
330
+      : U8GLIB(&u8g_dev_st7920_128x64_8bit, d0, d1, d2, d3, d4, d5, d6, d7, en, cs1, cs2, di, rw, reset)
331
+      { }
332
+    // U8GLIB_ST7920_128X64(uint8_t cs) 
333
+    //   : U8GLIB(&u8g_dev_st7920_128x64_sw_spi, cs, U8G_PIN_NONE, U8G_PIN_NONE)
334
+    //   { }
335
+};
336
+
337
+class U8GLIB_ST7920_128X64_1X : public U8GLIB 
338
+{
339
+  public:
340
+    U8GLIB_ST7920_128X64_1X(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t reset = U8G_PIN_NONE) 
341
+      : U8GLIB(&u8g_dev_st7920_128x64_sw_spi, sck, mosi, cs, U8G_PIN_NONE, reset)		// a0 = U8G_PIN_NONE
342
+      { }
343
+    U8GLIB_ST7920_128X64_1X(uint8_t cs, uint8_t reset = U8G_PIN_NONE) 
344
+      : U8GLIB(&u8g_dev_st7920_128x64_hw_spi, cs, U8G_PIN_NONE, reset)			// a0 = U8G_PIN_NONE
345
+      { }
346
+    U8GLIB_ST7920_128X64_1X(uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7, 
347
+        uint8_t en, uint8_t di, uint8_t rw = U8G_PIN_NONE, uint8_t reset = U8G_PIN_NONE) 
348
+      : U8GLIB(&u8g_dev_st7920_128x64_8bit, d0, d1, d2, d3, d4, d5, d6, d7, en, U8G_PIN_NONE, U8G_PIN_NONE, di, rw, reset)  // cs1 = cs2 = U8G_PIN_NONE
349
+      { }
350
+};
351
+
352
+class U8GLIB_ST7920_128X64_4X : public U8GLIB 
353
+{
354
+  public:
355
+    U8GLIB_ST7920_128X64_4X(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t reset = U8G_PIN_NONE) 
356
+      : U8GLIB(&u8g_dev_st7920_128x64_4x_sw_spi, sck, mosi, cs, U8G_PIN_NONE, reset)		// a0 = U8G_PIN_NONE
357
+      { }
358
+    U8GLIB_ST7920_128X64_4X(uint8_t cs, uint8_t reset = U8G_PIN_NONE) 
359
+      : U8GLIB(&u8g_dev_st7920_128x64_4x_hw_spi, cs, U8G_PIN_NONE, reset)			// a0 = U8G_PIN_NONE
360
+      { }
361
+    U8GLIB_ST7920_128X64_4X(uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7, 
362
+        uint8_t en, uint8_t di, uint8_t rw = U8G_PIN_NONE, uint8_t reset = U8G_PIN_NONE) 
363
+      : U8GLIB(&u8g_dev_st7920_128x64_4x_8bit, d0, d1, d2, d3, d4, d5, d6, d7, en, U8G_PIN_NONE, U8G_PIN_NONE, di, rw, reset)   // cs1 = cs2 = U8G_PIN_NONE
364
+      { }
365
+};
366
+
367
+
368
+
369
+class U8GLIB_ST7920_192X32 : public U8GLIB  // OBSOLETE, use U8GLIB_ST7920_192X32_1X instead
370
+{ 
371
+  public:
372
+    U8GLIB_ST7920_192X32(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) 
373
+      : U8GLIB(&u8g_dev_st7920_192x32_sw_spi, sck, mosi, cs, a0, reset)
374
+      { }
375
+    U8GLIB_ST7920_192X32(uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) 
376
+      : U8GLIB(&u8g_dev_st7920_192x32_hw_spi, cs, a0, reset)
377
+      { }
378
+    U8GLIB_ST7920_192X32(uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7, 
379
+        uint8_t en, uint8_t cs1, uint8_t cs2, uint8_t di, uint8_t rw = U8G_PIN_NONE, uint8_t reset = U8G_PIN_NONE) 
380
+      : U8GLIB(&u8g_dev_st7920_192x32_8bit, d0, d1, d2, d3, d4, d5, d6, d7, en, cs1, cs2, di, rw, reset)
381
+      { }
382
+};
383
+
384
+class U8GLIB_ST7920_192X32_1X : public U8GLIB 
385
+{
386
+  public:
387
+    U8GLIB_ST7920_192X32_1X(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t reset = U8G_PIN_NONE) 
388
+      : U8GLIB(&u8g_dev_st7920_192x32_sw_spi, sck, mosi, cs, U8G_PIN_NONE, reset)		// a0 = U8G_PIN_NONE
389
+      { }
390
+    U8GLIB_ST7920_192X32_1X(uint8_t cs, uint8_t reset = U8G_PIN_NONE) 
391
+      : U8GLIB(&u8g_dev_st7920_192x32_hw_spi, cs, U8G_PIN_NONE, reset)			// a0 = U8G_PIN_NONE
392
+      { }
393
+    U8GLIB_ST7920_192X32_1X(uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7, 
394
+        uint8_t en, uint8_t di, uint8_t rw = U8G_PIN_NONE, uint8_t reset = U8G_PIN_NONE) 
395
+      : U8GLIB(&u8g_dev_st7920_192x32_8bit, d0, d1, d2, d3, d4, d5, d6, d7, en, U8G_PIN_NONE, U8G_PIN_NONE, di, rw, reset)  // cs1 = cs2 = U8G_PIN_NONE
396
+      { }
397
+};
398
+
399
+class U8GLIB_ST7920_192X32_4X : public U8GLIB 
400
+{
401
+  public:
402
+    U8GLIB_ST7920_192X32_4X(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t reset = U8G_PIN_NONE) 
403
+      : U8GLIB(&u8g_dev_st7920_192x32_4x_sw_spi, sck, mosi, cs, U8G_PIN_NONE, reset)		// a0 = U8G_PIN_NONE
404
+      { }
405
+    U8GLIB_ST7920_192X32_4X(uint8_t cs, uint8_t reset = U8G_PIN_NONE) 
406
+      : U8GLIB(&u8g_dev_st7920_192x32_4x_hw_spi, cs, U8G_PIN_NONE, reset)			// a0 = U8G_PIN_NONE
407
+      { }
408
+    U8GLIB_ST7920_192X32_4X(uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7, 
409
+        uint8_t en, uint8_t di, uint8_t rw = U8G_PIN_NONE, uint8_t reset = U8G_PIN_NONE) 
410
+      : U8GLIB(&u8g_dev_st7920_192x32_4x_8bit, d0, d1, d2, d3, d4, d5, d6, d7, en, U8G_PIN_NONE, U8G_PIN_NONE, di, rw, reset)   // cs1 = cs2 = U8G_PIN_NONE
411
+      { }
412
+};
413
+
414
+
415
+class U8GLIB_ST7920_202X32 : public U8GLIB 
416
+{
417
+  public:
418
+    U8GLIB_ST7920_202X32(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) 
419
+      : U8GLIB(&u8g_dev_st7920_202x32_sw_spi, sck, mosi, cs, a0, reset)
420
+      { }
421
+    U8GLIB_ST7920_202X32(uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) 
422
+      : U8GLIB(&u8g_dev_st7920_202x32_hw_spi, cs, a0, reset)
423
+      { }
424
+    U8GLIB_ST7920_202X32(uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7, 
425
+        uint8_t en, uint8_t cs1, uint8_t cs2, uint8_t di, uint8_t rw = U8G_PIN_NONE, uint8_t reset = U8G_PIN_NONE) 
426
+      : U8GLIB(&u8g_dev_st7920_202x32_8bit, d0, d1, d2, d3, d4, d5, d6, d7, en, cs1, cs2, di, rw, reset)
427
+      { }
428
+};
429
+
430
+class U8GLIB_ST7920_202X32_1X : public U8GLIB 
431
+{
432
+  public:
433
+    U8GLIB_ST7920_202X32_1X(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t reset = U8G_PIN_NONE) 
434
+      : U8GLIB(&u8g_dev_st7920_202x32_sw_spi, sck, mosi, cs, U8G_PIN_NONE, reset)		// a0 = U8G_PIN_NONE
435
+      { }
436
+    U8GLIB_ST7920_202X32_1X(uint8_t cs, uint8_t reset = U8G_PIN_NONE) 
437
+      : U8GLIB(&u8g_dev_st7920_202x32_hw_spi, cs, U8G_PIN_NONE, reset)			// a0 = U8G_PIN_NONE
438
+      { }
439
+    U8GLIB_ST7920_202X32_1X(uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7, 
440
+        uint8_t en, uint8_t di, uint8_t rw = U8G_PIN_NONE, uint8_t reset = U8G_PIN_NONE) 
441
+      : U8GLIB(&u8g_dev_st7920_202x32_8bit, d0, d1, d2, d3, d4, d5, d6, d7, en, U8G_PIN_NONE, U8G_PIN_NONE, di, rw, reset)  // cs1 = cs2 = U8G_PIN_NONE
442
+      { }
443
+};
444
+
445
+class U8GLIB_ST7920_202X32_4X : public U8GLIB 
446
+{
447
+  public:
448
+    U8GLIB_ST7920_202X32_4X(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t reset = U8G_PIN_NONE) 
449
+      : U8GLIB(&u8g_dev_st7920_202x32_4x_sw_spi, sck, mosi, cs, U8G_PIN_NONE, reset)		// a0 = U8G_PIN_NONE
450
+      { }
451
+    U8GLIB_ST7920_202X32_4X(uint8_t cs, uint8_t reset = U8G_PIN_NONE) 
452
+      : U8GLIB(&u8g_dev_st7920_202x32_4x_hw_spi, cs, U8G_PIN_NONE, reset)			// a0 = U8G_PIN_NONE
453
+      { }
454
+    U8GLIB_ST7920_202X32_4X(uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7, 
455
+        uint8_t en, uint8_t di, uint8_t rw = U8G_PIN_NONE, uint8_t reset = U8G_PIN_NONE) 
456
+      : U8GLIB(&u8g_dev_st7920_202x32_4x_8bit, d0, d1, d2, d3, d4, d5, d6, d7, en, U8G_PIN_NONE, U8G_PIN_NONE, di, rw, reset)   // cs1 = cs2 = U8G_PIN_NONE
457
+      { }
458
+};
459
+
460
+
461
+class U8GLIB_LC7981_160X80 : public U8GLIB 
462
+{
463
+  public:
464
+    U8GLIB_LC7981_160X80(uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7, 
465
+        uint8_t en, uint8_t cs1, uint8_t di, uint8_t rw = U8G_PIN_NONE, uint8_t reset = U8G_PIN_NONE) 
466
+      : U8GLIB(&u8g_dev_lc7981_160x80_8bit, d0, d1, d2, d3, d4, d5, d6, d7, en, cs1, U8G_PIN_NONE, di, rw, reset)
467
+      { }
468
+};
469
+
470
+class U8GLIB_LC7981_240X64 : public U8GLIB 
471
+{
472
+  public:
473
+    U8GLIB_LC7981_240X64(uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7, 
474
+        uint8_t en, uint8_t cs1, uint8_t di, uint8_t rw = U8G_PIN_NONE, uint8_t reset = U8G_PIN_NONE) 
475
+      : U8GLIB(&u8g_dev_lc7981_240x64_8bit, d0, d1, d2, d3, d4, d5, d6, d7, en, cs1, U8G_PIN_NONE, di, rw, reset)
476
+      { }
477
+};
478
+
479
+class U8GLIB_LC7981_240X128 : public U8GLIB 
480
+{
481
+  public:
482
+    U8GLIB_LC7981_240X128(uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7, 
483
+        uint8_t en, uint8_t cs1, uint8_t di, uint8_t rw = U8G_PIN_NONE, uint8_t reset = U8G_PIN_NONE) 
484
+      : U8GLIB(&u8g_dev_lc7981_240x128_8bit, d0, d1, d2, d3, d4, d5, d6, d7, en, cs1, U8G_PIN_NONE, di, rw, reset)
485
+      { }
486
+};
487
+
488
+// 16 bit mode required: Remove comment from "#define U8G_16BIT 1" in utility/u8g.h
489
+class U8GLIB_LC7981_320X64 : public U8GLIB 
490
+{
491
+  public:
492
+    U8GLIB_LC7981_320X64(uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7, 
493
+        uint8_t en, uint8_t cs1, uint8_t di, uint8_t rw = U8G_PIN_NONE, uint8_t reset = U8G_PIN_NONE) 
494
+      : U8GLIB(&u8g_dev_lc7981_320x64_8bit, d0, d1, d2, d3, d4, d5, d6, d7, en, cs1, U8G_PIN_NONE, di, rw, reset)
495
+      { }
496
+};
497
+
498
+
499
+
500
+class U8GLIB_DOGXL160_BW : public U8GLIB 
501
+{
502
+  public:
503
+    U8GLIB_DOGXL160_BW(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) 
504
+      : U8GLIB(&u8g_dev_uc1610_dogxl160_bw_sw_spi, sck, mosi, cs, a0, reset)
505
+      { }
506
+    U8GLIB_DOGXL160_BW(uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) 
507
+      : U8GLIB(&u8g_dev_uc1610_dogxl160_bw_hw_spi, cs, a0, reset)
508
+      { }
509
+};
510
+
511
+class U8GLIB_DOGXL160_GR : public U8GLIB 
512
+{
513
+  public:
514
+    U8GLIB_DOGXL160_GR(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) 
515
+      : U8GLIB(&u8g_dev_uc1610_dogxl160_gr_sw_spi, sck, mosi, cs, a0, reset)
516
+      { }
517
+    U8GLIB_DOGXL160_GR(uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) 
518
+      : U8GLIB(&u8g_dev_uc1610_dogxl160_gr_hw_spi, cs, a0, reset)
519
+      { }
520
+};
521
+
522
+class U8GLIB_DOGXL160_2X_BW : public U8GLIB 
523
+{
524
+  public:
525
+    U8GLIB_DOGXL160_2X_BW(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) 
526
+      : U8GLIB(&u8g_dev_uc1610_dogxl160_2x_bw_sw_spi, sck, mosi, cs, a0, reset)
527
+      { }
528
+    U8GLIB_DOGXL160_2X_BW(uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) 
529
+      : U8GLIB(&u8g_dev_uc1610_dogxl160_2x_bw_hw_spi, cs, a0, reset)
530
+      { }
531
+};
532
+
533
+class U8GLIB_DOGXL160_2X_GR : public U8GLIB 
534
+{
535
+  public:
536
+    U8GLIB_DOGXL160_2X_GR(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) 
537
+      : U8GLIB(&u8g_dev_uc1610_dogxl160_2x_gr_sw_spi, sck, mosi, cs, a0, reset)
538
+      { }
539
+    U8GLIB_DOGXL160_2X_GR(uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) 
540
+      : U8GLIB(&u8g_dev_uc1610_dogxl160_2x_gr_hw_spi, cs, a0, reset)
541
+      { }
542
+};
543
+
544
+
545
+class U8GLIB_NHD27OLED_BW : public U8GLIB 
546
+{
547
+  public:
548
+    U8GLIB_NHD27OLED_BW(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) 
549
+      : U8GLIB(&u8g_dev_ssd1325_nhd27oled_bw_sw_spi, sck, mosi, cs, a0, reset)
550
+      { }
551
+    U8GLIB_NHD27OLED_BW(uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) 
552
+      : U8GLIB(&u8g_dev_ssd1325_nhd27oled_bw_hw_spi, cs, a0, reset)
553
+      { }
554
+    U8GLIB_NHD27OLED_BW(uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7, 
555
+        uint8_t cs, uint8_t di, uint8_t rw = U8G_PIN_NONE, uint8_t reset = U8G_PIN_NONE) 
556
+      : U8GLIB(&u8g_dev_ssd1325_nhd27oled_bw_parallel, d0, d1, d2, d3, d4, d5, d6, d7, U8G_PIN_NONE, cs, U8G_PIN_NONE, di, rw, reset)
557
+      { }
558
+};
559
+
560
+class U8GLIB_NHD27OLED_2X_BW : public U8GLIB 
561
+{
562
+  public:
563
+    U8GLIB_NHD27OLED_2X_BW(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) 
564
+      : U8GLIB(&u8g_dev_ssd1325_nhd27oled_2x_bw_sw_spi, sck, mosi, cs, a0, reset)
565
+      { }
566
+    U8GLIB_NHD27OLED_2X_BW(uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) 
567
+      : U8GLIB(&u8g_dev_ssd1325_nhd27oled_2x_bw_hw_spi, cs, a0, reset)
568
+      { }
569
+    U8GLIB_NHD27OLED_2X_BW(uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7, 
570
+        uint8_t cs, uint8_t di, uint8_t rw = U8G_PIN_NONE, uint8_t reset = U8G_PIN_NONE) 
571
+      : U8GLIB(&u8g_dev_ssd1325_nhd27oled_2x_bw_parallel, d0, d1, d2, d3, d4, d5, d6, d7, U8G_PIN_NONE, cs, U8G_PIN_NONE, di, rw, reset)
572
+      { }
573
+};
574
+
575
+class U8GLIB_NHD31OLED_BW : public U8GLIB 
576
+{
577
+  public:
578
+    U8GLIB_NHD31OLED_BW(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) 
579
+      : U8GLIB(&u8g_dev_ssd1322_nhd31oled_bw_sw_spi, sck, mosi, cs, a0, reset)
580
+      { }
581
+    U8GLIB_NHD31OLED_BW(uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) 
582
+      : U8GLIB(&u8g_dev_ssd1322_nhd31oled_bw_hw_spi, cs, a0, reset)
583
+      { }
584
+};
585
+
586
+class U8GLIB_NHD31OLED_2X_BW : public U8GLIB 
587
+{
588
+  public:
589
+    U8GLIB_NHD31OLED_2X_BW(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) 
590
+      : U8GLIB(&u8g_dev_ssd1322_nhd31oled_2x_bw_sw_spi, sck, mosi, cs, a0, reset)
591
+      { }
592
+    U8GLIB_NHD31OLED_2X_BW(uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) 
593
+      : U8GLIB(&u8g_dev_ssd1322_nhd31oled_2x_bw_hw_spi, cs, a0, reset)
594
+      { }
595
+};
596
+
597
+class U8GLIB_NHD31OLED_GR : public U8GLIB 
598
+{
599
+  public:
600
+    U8GLIB_NHD31OLED_GR(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) 
601
+      : U8GLIB(&u8g_dev_ssd1322_nhd31oled_gr_sw_spi, sck, mosi, cs, a0, reset)
602
+      { }
603
+    U8GLIB_NHD31OLED_GR(uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) 
604
+      : U8GLIB(&u8g_dev_ssd1322_nhd31oled_gr_hw_spi, cs, a0, reset)
605
+      { }
606
+};
607
+
608
+class U8GLIB_NHD31OLED_2X_GR : public U8GLIB 
609
+{
610
+  public:
611
+    U8GLIB_NHD31OLED_2X_GR(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) 
612
+      : U8GLIB(&u8g_dev_ssd1322_nhd31oled_2x_gr_sw_spi, sck, mosi, cs, a0, reset)
613
+      { }
614
+    U8GLIB_NHD31OLED_2X_GR(uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) 
615
+      : U8GLIB(&u8g_dev_ssd1322_nhd31oled_2x_gr_hw_spi, cs, a0, reset)
616
+      { }
617
+};
618
+
619
+
620
+class U8GLIB_SSD1306_128X64 : public U8GLIB 
621
+{
622
+  public:
623
+    U8GLIB_SSD1306_128X64(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) 
624
+      : U8GLIB(&u8g_dev_ssd1306_128x64_sw_spi, sck, mosi, cs, a0, reset)
625
+      { }
626
+    U8GLIB_SSD1306_128X64(uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) 
627
+      : U8GLIB(&u8g_dev_ssd1306_128x64_hw_spi, cs, a0, reset)
628
+      { }
629
+    U8GLIB_SSD1306_128X64(uint8_t options = U8G_I2C_OPT_NONE) 
630
+      : U8GLIB(&u8g_dev_ssd1306_128x64_i2c, options)
631
+      { }
632
+      
633
+};
634
+
635
+class U8GLIB_SSD1309_128X64 : public U8GLIB 
636
+{
637
+  public:
638
+    U8GLIB_SSD1309_128X64(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) 
639
+      : U8GLIB(&u8g_dev_ssd1309_128x64_sw_spi, sck, mosi, cs, a0, reset)
640
+      { }
641
+    U8GLIB_SSD1309_128X64(uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) 
642
+      : U8GLIB(&u8g_dev_ssd1309_128x64_hw_spi, cs, a0, reset)
643
+      { }
644
+    U8GLIB_SSD1309_128X64(uint8_t options = U8G_I2C_OPT_NONE) 
645
+      : U8GLIB(&u8g_dev_ssd1309_128x64_i2c, options)
646
+      { }
647
+      
648
+};
649
+
650
+class U8GLIB_SSD1306_128X32 : public U8GLIB 
651
+{
652
+  public:
653
+    U8GLIB_SSD1306_128X32(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) 
654
+      : U8GLIB(&u8g_dev_ssd1306_128x32_sw_spi, sck, mosi, cs, a0, reset)
655
+      { }
656
+    U8GLIB_SSD1306_128X32(uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) 
657
+      : U8GLIB(&u8g_dev_ssd1306_128x32_hw_spi, cs, a0, reset)
658
+      { }
659
+    U8GLIB_SSD1306_128X32(uint8_t options = U8G_I2C_OPT_NONE) 
660
+      : U8GLIB(&u8g_dev_ssd1306_128x32_i2c, options)
661
+      { }
662
+      
663
+};
664
+
665
+
666
+class U8GLIB_NHD27OLED_GR : public U8GLIB 
667
+{
668
+  public:
669
+    U8GLIB_NHD27OLED_GR(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) 
670
+      : U8GLIB(&u8g_dev_ssd1325_nhd27oled_gr_sw_spi, sck, mosi, cs, a0, reset)
671
+      { }
672
+    U8GLIB_NHD27OLED_GR(uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) 
673
+      : U8GLIB(&u8g_dev_ssd1325_nhd27oled_gr_hw_spi, cs, a0, reset)
674
+      { }
675
+};
676
+
677
+class U8GLIB_NHD27OLED_2X_GR : public U8GLIB 
678
+{
679
+  public:
680
+    U8GLIB_NHD27OLED_2X_GR(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) 
681
+      : U8GLIB(&u8g_dev_ssd1325_nhd27oled_2x_gr_sw_spi, sck, mosi, cs, a0, reset)
682
+      { }
683
+    U8GLIB_NHD27OLED_2X_GR(uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) 
684
+      : U8GLIB(&u8g_dev_ssd1325_nhd27oled_2x_gr_hw_spi, cs, a0, reset)
685
+      { }
686
+};
687
+
688
+class U8GLIB_SSD1327_96X96_GR : public U8GLIB 
689
+{
690
+  public:
691
+    U8GLIB_SSD1327_96X96_GR(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) 
692
+      : U8GLIB(&u8g_dev_ssd1327_96x96_gr_sw_spi, sck, mosi, cs, a0, reset)
693
+      { }
694
+    U8GLIB_SSD1327_96X96_GR(uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) 
695
+      : U8GLIB(&u8g_dev_ssd1327_96x96_gr_hw_spi, cs, a0, reset)
696
+      { }
697
+    U8GLIB_SSD1327_96X96_GR(uint8_t options = U8G_I2C_OPT_NONE) 
698
+      : U8GLIB(&u8g_dev_ssd1327_96x96_gr_i2c, options)
699
+      { }
700
+};
701
+
702
+class U8GLIB_SSD1327_96X96_2X_GR : public U8GLIB 
703
+{
704
+  public:
705
+    U8GLIB_SSD1327_96X96_2X_GR(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) 
706
+      : U8GLIB(&u8g_dev_ssd1327_96x96_2x_gr_sw_spi, sck, mosi, cs, a0, reset)
707
+      { }
708
+    U8GLIB_SSD1327_96X96_2X_GR(uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) 
709
+      : U8GLIB(&u8g_dev_ssd1327_96x96_2x_gr_hw_spi, cs, a0, reset)
710
+      { }
711
+    U8GLIB_SSD1327_96X96_2X_GR(uint8_t options = U8G_I2C_OPT_NONE) 
712
+      : U8GLIB(&u8g_dev_ssd1327_96x96_2x_gr_i2c, options)
713
+      { }
714
+};
715
+
716
+class U8GLIB_PCF8812 : public U8GLIB 
717
+{
718
+  public:
719
+    U8GLIB_PCF8812(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) 
720
+      : U8GLIB(&u8g_dev_pcf8812_96x65_sw_spi, sck, mosi, cs, a0, reset)
721
+      { }
722
+};
723
+
724
+class U8GLIB_PCD8544 : public U8GLIB 
725
+{
726
+  public:
727
+    U8GLIB_PCD8544(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) 
728
+      : U8GLIB(&u8g_dev_pcd8544_84x48_sw_spi, sck, mosi, cs, a0, reset)
729
+      { }
730
+};
731
+
732
+class U8GLIB_TLS8204_84X48 : public U8GLIB 
733
+{
734
+  public:
735
+    U8GLIB_TLS8204_84X48(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) 
736
+      : U8GLIB(&u8g_dev_tls8204_84x48_sw_spi, sck, mosi, cs, a0, reset)
737
+      { }
738
+};
739
+
740
+class U8GLIB_KS0108_128 : public U8GLIB 
741
+{
742
+  public:
743
+    U8GLIB_KS0108_128(uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7, 
744
+        uint8_t en, uint8_t cs1, uint8_t cs2, uint8_t di, uint8_t rw = U8G_PIN_NONE, uint8_t reset = U8G_PIN_NONE) 
745
+      : U8GLIB(&u8g_dev_ks0108_128x64_fast, d0, d1, d2, d3, d4, d5, d6, d7, en, cs1, cs2, di, rw, reset)
746
+      { }
747
+};
748
+
749
+class U8GLIB_SBN1661_122X32 : public U8GLIB 
750
+{
751
+  public:
752
+    U8GLIB_SBN1661_122X32(uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7, 
753
+        uint8_t cs1, uint8_t cs2, uint8_t di, uint8_t rw = U8G_PIN_NONE, uint8_t reset = U8G_PIN_NONE) 
754
+      : U8GLIB(&u8g_dev_sbn1661_122x32, d0, d1, d2, d3, d4, d5, d6, d7, U8G_PIN_NONE, cs1, cs2, di, rw, reset)
755
+      { }
756
+};
757
+
758
+class U8GLIB_T6963_240X128 : public U8GLIB 
759
+{
760
+  public:
761
+    U8GLIB_T6963_240X128(uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7, 
762
+        uint8_t cs, uint8_t a0, uint8_t wr, uint8_t rd, uint8_t reset = U8G_PIN_NONE) 
763
+      : U8GLIB(&u8g_dev_t6963_240x128_8bit, d0, d1, d2, d3, d4, d5, d6, d7, cs, a0, wr, rd, reset)
764
+      { }
765
+};
766
+
767
+class U8GLIB_T6963_240X64 : public U8GLIB 
768
+{
769
+  public:
770
+    U8GLIB_T6963_240X64(uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7, 
771
+        uint8_t cs, uint8_t a0, uint8_t wr, uint8_t rd, uint8_t reset = U8G_PIN_NONE) 
772
+      : U8GLIB(&u8g_dev_t6963_240x64_8bit, d0, d1, d2, d3, d4, d5, d6, d7, cs, a0, wr, rd, reset)
773
+      { }
774
+};
775
+
776
+class U8GLIB_T6963_128X64 : public U8GLIB 
777
+{
778
+  public:
779
+    U8GLIB_T6963_128X64(uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7, 
780
+        uint8_t cs, uint8_t a0, uint8_t wr, uint8_t rd, uint8_t reset = U8G_PIN_NONE) 
781
+      : U8GLIB(&u8g_dev_t6963_128x64_8bit, d0, d1, d2, d3, d4, d5, d6, d7, cs, a0, wr, rd, reset)
782
+      { }
783
+};
784
+
785
+
786
+class U8GLIB_ST7687_C144MVGD: public U8GLIB 
787
+{
788
+  public:
789
+    U8GLIB_ST7687_C144MVGD(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) 
790
+      : U8GLIB(&u8g_dev_st7687_c144mvgd_sw_spi, sck, mosi, cs, a0, reset)
791
+      { }
792
+    U8GLIB_ST7687_C144MVGD(uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7, 
793
+        uint8_t en, uint8_t cs, uint8_t a0, uint8_t rw = U8G_PIN_NONE, uint8_t reset = U8G_PIN_NONE) 
794
+      : U8GLIB(&u8g_dev_ks0108_128x64_fast, d0, d1, d2, d3, d4, d5, d6, d7, en, cs, U8G_PIN_NONE, a0, rw, reset)
795
+      { }
796
+};
797
+
798
+class U8GLIB_ILI9325D_320x240 : public U8GLIB 
799
+{
800
+  public:
801
+    /*
802
+    U8GLIB_ILI9325D_320x240(uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7, 
803
+        uint8_t en, uint8_t cs1, uint8_t di, uint8_t rw = U8G_PIN_NONE, uint8_t reset = U8G_PIN_NONE) 
804
+      : U8GLIB(&u8g_dev_ili9325d_320x240_8bit, d0, d1, d2, d3, d4, d5, d6, d7, en, cs1, U8G_PIN_NONE, di, rw, reset)
805
+      { }
806
+  */
807
+    U8GLIB_ILI9325D_320x240( uint8_t en, uint8_t cs1, uint8_t di, uint8_t rw = U8G_PIN_NONE, uint8_t reset = U8G_PIN_NONE) 
808
+      { init8BitFixedPort(&u8g_dev_ili9325d_320x240_8bit, en, cs1, di, rw, reset); }
809
+};
810
+
811
+class U8GLIB_FLIPDISC_2X7 : public U8GLIB 
812
+{
813
+  public:
814
+    U8GLIB_FLIPDISC_2X7(void) : U8GLIB(&u8g_dev_flipdisc_2x7)
815
+      {  }
816
+};
817
+
818
+class U8GLIB_VS : public U8GLIB 
819
+{
820
+  public:
821
+    U8GLIB_VS(void) : U8GLIB(&u8g_dev_vs)
822
+      {  }
823
+};
824
+
825
+
826
+#endif /* _CPP_U8GLIB */

+ 130
- 0
ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/U8glib/examples/Bitmap/Bitmap.pde View File

@@ -0,0 +1,130 @@
1
+/*
2
+
3
+  Bitmap.pde
4
+  
5
+  Show simple bitmap
6
+
7
+  >>> Before compiling: Please remove comment from the constructor of the 
8
+  >>> connected graphics display (see below).
9
+
10
+  Universal 8bit Graphics Library, http://code.google.com/p/u8glib/
11
+  
12
+  Copyright (c) 2011, olikraus@gmail.com
13
+  All rights reserved.
14
+
15
+  Redistribution and use in source and binary forms, with or without modification, 
16
+  are permitted provided that the following conditions are met:
17
+
18
+  * Redistributions of source code must retain the above copyright notice, this list 
19
+    of conditions and the following disclaimer.
20
+    
21
+  * Redistributions in binary form must reproduce the above copyright notice, this 
22
+    list of conditions and the following disclaimer in the documentation and/or other 
23
+    materials provided with the distribution.
24
+
25
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 
26
+  CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 
27
+  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
28
+  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
29
+  DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 
30
+  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
31
+  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
32
+  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
33
+  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 
34
+  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 
35
+  STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
36
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 
37
+  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
38
+  
39
+*/
40
+
41
+
42
+#include "U8glib.h"
43
+
44
+// setup u8g object, please remove comment from one of the following constructor calls
45
+// IMPORTANT NOTE: The complete list of supported devices is here: http://code.google.com/p/u8glib/wiki/device
46
+
47
+//U8GLIB_NHD27OLED_BW u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
48
+//U8GLIB_NHD27OLED_2X_BW u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
49
+//U8GLIB_NHD27OLED_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
50
+//U8GLIB_NHD27OLED_2X_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
51
+//U8GLIB_NHD31OLED_BW u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
52
+//U8GLIB_NHD31OLED_2X_BW u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
53
+//U8GLIB_NHD31OLED_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
54
+//U8GLIB_NHD31OLED_2X_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
55
+//U8GLIB_DOGS102 u8g(13, 11, 10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
56
+//U8GLIB_DOGM132 u8g(13, 11, 10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
57
+//U8GLIB_DOGM128 u8g(13, 11, 10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
58
+//U8GLIB_ST7920_128X64_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
59
+//U8GLIB_ST7920_128X64_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
60
+//U8GLIB_ST7920_128X64_1X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
61
+//U8GLIB_ST7920_128X64_4X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
62
+//U8GLIB_ST7920_192X32_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
63
+//U8GLIB_ST7920_192X32_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
64
+//U8GLIB_ST7920_192X32_1X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
65
+//U8GLIB_ST7920_192X32_4X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
66
+//U8GLIB_ST7920_192X32_1X u8g(13, 11, 10);	// SPI Com: SCK = en = 13, MOSI = rw = 11, CS = di = 10
67
+//U8GLIB_ST7920_192X32_4X u8g(10);		// SPI Com: SCK = en = 13, MOSI = rw = 11, CS = di = 10, HW SPI
68
+//U8GLIB_ST7920_202X32_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
69
+//U8GLIB_ST7920_202X32_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
70
+//U8GLIB_ST7920_202X32_1X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
71
+//U8GLIB_ST7920_202X32_4X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
72
+//U8GLIB_LM6059 u8g(13, 11, 10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
73
+//U8GLIB_LM6063 u8g(13, 11, 10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
74
+//U8GLIB_DOGXL160_BW u8g(10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
75
+//U8GLIB_DOGXL160_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
76
+//U8GLIB_DOGXL160_2X_BW u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
77
+//U8GLIB_DOGXL160_2X_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
78
+//U8GLIB_PCD8544 u8g(13, 11, 10, 9, 8);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, Reset = 8
79
+//U8GLIB_PCF8812 u8g(13, 11, 10, 9, 8);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, Reset = 8
80
+//U8GLIB_KS0108_128 u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 14, 15, 17, 16); 		// 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs1=14, cs2=15,di=17,rw=16
81
+//U8GLIB_LC7981_160X80 u8g(8, 9, 10, 11, 4, 5, 6, 7,  18, 14, 15, 17, 16); 	// 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
82
+//U8GLIB_LC7981_240X64 u8g(8, 9, 10, 11, 4, 5, 6, 7,  18, 14, 15, 17, 16); 	// 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
83
+//U8GLIB_LC7981_240X128 u8g(8, 9, 10, 11, 4, 5, 6, 7,  18, 14, 15, 17, 16); 	// 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
84
+//U8GLIB_ILI9325D_320x240 u8g(18,17,19,U8G_PIN_NONE,16 );  			// 8Bit Com: D0..D7: 0,1,2,3,4,5,6,7 en=wr=18, cs=17, rs=19, rd=U8G_PIN_NONE, reset = 16
85
+//U8GLIB_SBN1661_122X32 u8g(8,9,10,11,4,5,6,7,14,15, 17, U8G_PIN_NONE, 16); 	// 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 cs1=14, cs2=15,di=17,rw=16,reset = 16
86
+//U8GLIB_SSD1306_128X64 u8g(13, 11, 10, 9);	// SW SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
87
+//U8GLIB_SSD1306_128X64 u8g(10, 9);		// HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are  SCK = 13 and MOSI = 11)
88
+//U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE);	// HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are  SCK = 13 and MOSI = 11)
89
+//U8GLIB_SSD1306_128X32 u8g(13, 11, 10, 9);	// SW SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
90
+//U8GLIB_SSD1306_128X32 u8g(10, 9);             // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are  SCK = 13 and MOSI = 11)
91
+//U8GLIB_SSD1306_128X32 u8g(U8G_I2C_OPT_NONE);	// HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are  SCK = 13 and MOSI = 11)
92
+//U8GLIB_SSD1309_128X64 u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
93
+//U8GLIB_SSD1327_96X96_GR u8g(U8G_I2C_OPT_NONE);	// I2C
94
+//U8GLIB_SSD1327_96X96_2X_GR u8g(U8G_I2C_OPT_NONE);	// I2C
95
+//U8GLIB_NHD_C12864 u8g(13, 11, 10, 9, 8);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, RST = 8
96
+//U8GLIB_NHD_C12832 u8g(13, 11, 10, 9, 8);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, RST = 8
97
+//U8GLIB_T6963_240X128 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
98
+//U8GLIB_T6963_240X64 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
99
+//U8GLIB_T6963_128X64 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
100
+
101
+const uint8_t rook_bitmap[] PROGMEM = {
102
+  0x00,         // 00000000 
103
+  0x55,         // 01010101
104
+  0x7f,          // 01111111
105
+  0x3e,         // 00111110
106
+  0x3e,         // 00111110 
107
+  0x3e,         // 00111110
108
+  0x3e,         // 00111110 
109
+  0x7f           // 01111111
110
+};
111
+
112
+void draw(void) {
113
+  // graphic commands to redraw the complete screen should be placed here  
114
+  u8g.drawBitmapP( 0, 0, 1, 8, rook_bitmap);
115
+}
116
+
117
+void setup(void) {
118
+}
119
+
120
+void loop(void) {
121
+  // picture loop
122
+  u8g.firstPage();  
123
+  do {
124
+    draw();
125
+  } while( u8g.nextPage() );
126
+  
127
+  // rebuild the picture after some delay
128
+  delay(1000);
129
+}
130
+

+ 180
- 0
ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/U8glib/examples/Chess/Chess.pde View File

@@ -0,0 +1,180 @@
1
+/*
2
+
3
+  Chess.pde
4
+  
5
+  Little Rook Chess
6
+
7
+  >>> Before compiling: Please remove comment from the constructor of the 
8
+  >>> connected graphics display (see below).
9
+  
10
+  Universal 8bit Graphics Library, http://code.google.com/p/u8glib/
11
+  
12
+  Copyright (c) 2012, olikraus@gmail.com
13
+  All rights reserved.
14
+
15
+  Redistribution and use in source and binary forms, with or without modification, 
16
+  are permitted provided that the following conditions are met:
17
+
18
+  * Redistributions of source code must retain the above copyright notice, this list 
19
+    of conditions and the following disclaimer.
20
+    
21
+  * Redistributions in binary form must reproduce the above copyright notice, this 
22
+    list of conditions and the following disclaimer in the documentation and/or other 
23
+    materials provided with the distribution.
24
+
25
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 
26
+  CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 
27
+  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
28
+  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
29
+  DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 
30
+  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
31
+  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
32
+  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
33
+  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 
34
+  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 
35
+  STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
36
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 
37
+  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
38
+  
39
+
40
+*/
41
+
42
+
43
+#include "U8glib.h"
44
+
45
+// setup u8g object, please remove comment from one of the following constructor calls
46
+// IMPORTANT NOTE: The complete list of supported devices is here: http://code.google.com/p/u8glib/wiki/device
47
+
48
+//U8GLIB_NHD27OLED_BW u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
49
+//U8GLIB_NHD27OLED_2X_BW u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
50
+//U8GLIB_NHD27OLED_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
51
+//U8GLIB_NHD27OLED_2X_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
52
+//U8GLIB_NHD31OLED_BW u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
53
+//U8GLIB_NHD31OLED_2X_BW u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
54
+//U8GLIB_NHD31OLED_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
55
+//U8GLIB_NHD31OLED_2X_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
56
+//U8GLIB_DOGS102 u8g(13, 11, 10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
57
+//U8GLIB_DOGM132 u8g(13, 11, 10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
58
+//U8GLIB_DOGM128 u8g(13, 11, 10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
59
+//U8GLIB_ST7920_128X64_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
60
+//U8GLIB_ST7920_128X64_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
61
+//U8GLIB_ST7920_128X64_1X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
62
+//U8GLIB_ST7920_128X64_4X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
63
+//U8GLIB_ST7920_192X32_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
64
+//U8GLIB_ST7920_192X32_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
65
+//U8GLIB_ST7920_192X32_1X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
66
+//U8GLIB_ST7920_192X32_4X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
67
+//U8GLIB_ST7920_192X32_1X u8g(13, 11, 10);	// SPI Com: SCK = en = 13, MOSI = rw = 11, CS = di = 10
68
+//U8GLIB_ST7920_192X32_4X u8g(10);		// SPI Com: SCK = en = 13, MOSI = rw = 11, CS = di = 10, HW SPI
69
+//U8GLIB_ST7920_202X32_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
70
+//U8GLIB_ST7920_202X32_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
71
+//U8GLIB_ST7920_202X32_1X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
72
+//U8GLIB_ST7920_202X32_4X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
73
+//U8GLIB_LM6059 u8g(13, 11, 10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
74
+//U8GLIB_LM6063 u8g(13, 11, 10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
75
+//U8GLIB_DOGXL160_BW u8g(10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
76
+//U8GLIB_DOGXL160_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
77
+//U8GLIB_DOGXL160_2X_BW u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
78
+//U8GLIB_DOGXL160_2X_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
79
+//U8GLIB_PCD8544 u8g(13, 11, 10, 9, 8);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, Reset = 8
80
+//U8GLIB_PCF8812 u8g(13, 11, 10, 9, 8);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, Reset = 8
81
+//U8GLIB_KS0108_128 u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 14, 15, 17, 16); 		// 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs1=14, cs2=15,di=17,rw=16
82
+//U8GLIB_LC7981_160X80 u8g(8, 9, 10, 11, 4, 5, 6, 7,  18, 14, 15, 17, 16); 	// 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
83
+//U8GLIB_LC7981_240X64 u8g(8, 9, 10, 11, 4, 5, 6, 7,  18, 14, 15, 17, 16); 	// 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
84
+//U8GLIB_LC7981_240X128 u8g(8, 9, 10, 11, 4, 5, 6, 7,  18, 14, 15, 17, 16); 	// 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
85
+//U8GLIB_ILI9325D_320x240 u8g(18,17,19,U8G_PIN_NONE,16 );  			// 8Bit Com: D0..D7: 0,1,2,3,4,5,6,7 en=wr=18, cs=17, rs=19, rd=U8G_PIN_NONE, reset = 16
86
+//U8GLIB_SBN1661_122X32 u8g(8,9,10,11,4,5,6,7,14,15, 17, U8G_PIN_NONE, 16); 	// 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 cs1=14, cs2=15,di=17,rw=16,reset = 16
87
+//U8GLIB_SSD1306_128X64 u8g(13, 11, 10, 9);	// SW SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
88
+//U8GLIB_SSD1306_128X64 u8g(10, 9);		// HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are  SCK = 13 and MOSI = 11)
89
+//U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE);	// HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are  SCK = 13 and MOSI = 11)
90
+//U8GLIB_SSD1306_128X32 u8g(13, 11, 10, 9);	// SW SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
91
+//U8GLIB_SSD1306_128X32 u8g(10, 9);             // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are  SCK = 13 and MOSI = 11)
92
+//U8GLIB_SSD1306_128X32 u8g(U8G_I2C_OPT_NONE);	// HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are  SCK = 13 and MOSI = 11)
93
+//U8GLIB_SSD1309_128X64 u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
94
+//U8GLIB_SSD1327_96X96_GR u8g(U8G_I2C_OPT_NONE);	// I2C
95
+//U8GLIB_SSD1327_96X96_2X_GR u8g(U8G_I2C_OPT_NONE);	// I2C
96
+//U8GLIB_NHD_C12864 u8g(13, 11, 10, 9, 8);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, RST = 8
97
+//U8GLIB_NHD_C12832 u8g(13, 11, 10, 9, 8);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, RST = 8
98
+//U8GLIB_T6963_240X128 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
99
+//U8GLIB_T6963_240X64 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
100
+//U8GLIB_T6963_128X64 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
101
+
102
+
103
+// DOGS102 shield configuration values
104
+uint8_t uiKeyPrev = 2;
105
+uint8_t uiKeyNext = 4;
106
+uint8_t uiKeySelect = 5;
107
+uint8_t uiKeyBack = 3;
108
+
109
+// DOGM128-Shield	 configuration values
110
+// DOGXL60-Shield configuration values
111
+//uint8_t uiKeyPrev = 7;
112
+//uint8_t uiKeyNext = 3;
113
+//uint8_t uiKeySelect = 2;
114
+//uint8_t uiKeyBack = 8;
115
+
116
+uint8_t uiKeyCodeFirst = CHESS_KEY_NONE;
117
+uint8_t uiKeyCodeSecond = CHESS_KEY_NONE;
118
+uint8_t uiKeyCode = CHESS_KEY_NONE;
119
+
120
+
121
+void uiSetup(void) {
122
+  // configure input keys 
123
+  
124
+  pinMode(uiKeyPrev, INPUT);           // set pin to input
125
+  digitalWrite(uiKeyPrev, HIGH);       // turn on pullup resistors
126
+  pinMode(uiKeyNext, INPUT);           // set pin to input
127
+  digitalWrite(uiKeyNext, HIGH);       // turn on pullup resistors
128
+  pinMode(uiKeySelect, INPUT);           // set pin to input
129
+  digitalWrite(uiKeySelect, HIGH);       // turn on pullup resistors
130
+  pinMode(uiKeyBack, INPUT);           // set pin to input
131
+  digitalWrite(uiKeyBack, HIGH);       // turn on pullup resistors
132
+}
133
+
134
+void uiStep(void)
135
+{
136
+  uiKeyCodeSecond = uiKeyCodeFirst;
137
+  if ( digitalRead(uiKeyPrev) == LOW )
138
+    uiKeyCodeFirst = CHESS_KEY_PREV;
139
+  else if ( digitalRead(uiKeyNext) == LOW )
140
+    uiKeyCodeFirst = CHESS_KEY_NEXT;
141
+  else if ( digitalRead(uiKeySelect) == LOW )
142
+    uiKeyCodeFirst = CHESS_KEY_SELECT;
143
+  else if ( digitalRead(uiKeyBack) == LOW )
144
+    uiKeyCodeFirst = CHESS_KEY_BACK;
145
+  else 
146
+    uiKeyCodeFirst = CHESS_KEY_NONE;
147
+  
148
+  if ( uiKeyCodeSecond == uiKeyCodeFirst )
149
+    uiKeyCode = uiKeyCodeFirst;
150
+  else
151
+    uiKeyCode = CHESS_KEY_NONE;
152
+}
153
+
154
+
155
+void setup() {
156
+  // rotate screen, if required
157
+  u8g.setRot180();
158
+  
159
+  uiSetup();
160
+  chess_Init(u8g.getU8g(), 0);
161
+}
162
+
163
+void loop() {  
164
+  uint8_t keyCode = CHESS_KEY_NONE;
165
+  
166
+  u8g.firstPage();
167
+  do {
168
+    chess_Draw();
169
+    uiStep();
170
+    if ( uiKeyCode != CHESS_KEY_NONE )
171
+      keyCode = uiKeyCode;
172
+  } while( u8g.nextPage() );
173
+  
174
+  u8g_Delay(10);
175
+  chess_Step(keyCode);
176
+  uiStep();
177
+  keyCode = uiKeyCode;
178
+}
179
+
180
+

+ 230
- 0
ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/U8glib/examples/Console/Console.pde View File

@@ -0,0 +1,230 @@
1
+/*
2
+
3
+  Console.pde
4
+  
5
+  Read from serial monitor, output to display
6
+  
7
+  >>> Before compiling: Please remove comment from the constructor of the 
8
+  >>> connected graphics display (see below).
9
+  
10
+  Universal 8bit Graphics Library, http://code.google.com/p/u8glib/
11
+  
12
+  Copyright (c) 2011, olikraus@gmail.com
13
+  All rights reserved.
14
+
15
+  Redistribution and use in source and binary forms, with or without modification, 
16
+  are permitted provided that the following conditions are met:
17
+
18
+  * Redistributions of source code must retain the above copyright notice, this list 
19
+    of conditions and the following disclaimer.
20
+    
21
+  * Redistributions in binary form must reproduce the above copyright notice, this 
22
+    list of conditions and the following disclaimer in the documentation and/or other 
23
+    materials provided with the distribution.
24
+
25
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 
26
+  CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 
27
+  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
28
+  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
29
+  DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 
30
+  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
31
+  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
32
+  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
33
+  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 
34
+  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 
35
+  STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
36
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 
37
+  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
38
+  
39
+*/
40
+
41
+
42
+#include "U8glib.h"
43
+
44
+// setup u8g object, please remove comment from one of the following constructor calls
45
+// IMPORTANT NOTE: The complete list of supported devices is here: http://code.google.com/p/u8glib/wiki/device
46
+
47
+//U8GLIB_NHD27OLED_BW u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
48
+//U8GLIB_NHD27OLED_2X_BW u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
49
+//U8GLIB_NHD27OLED_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
50
+//U8GLIB_NHD27OLED_2X_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
51
+//U8GLIB_NHD31OLED_BW u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
52
+//U8GLIB_NHD31OLED_2X_BW u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
53
+//U8GLIB_NHD31OLED_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
54
+//U8GLIB_NHD31OLED_2X_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
55
+//U8GLIB_DOGS102 u8g(13, 11, 10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
56
+//U8GLIB_DOGM132 u8g(13, 11, 10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
57
+//U8GLIB_DOGM128 u8g(13, 11, 10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
58
+//U8GLIB_ST7920_128X64_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
59
+//U8GLIB_ST7920_128X64_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
60
+//U8GLIB_ST7920_128X64_1X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
61
+//U8GLIB_ST7920_128X64_4X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
62
+//U8GLIB_ST7920_192X32_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
63
+//U8GLIB_ST7920_192X32_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
64
+//U8GLIB_ST7920_192X32_1X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
65
+//U8GLIB_ST7920_192X32_4X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
66
+//U8GLIB_ST7920_192X32_1X u8g(13, 11, 10);	// SPI Com: SCK = en = 13, MOSI = rw = 11, CS = di = 10
67
+//U8GLIB_ST7920_192X32_4X u8g(10);		// SPI Com: SCK = en = 13, MOSI = rw = 11, CS = di = 10, HW SPI
68
+//U8GLIB_ST7920_202X32_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
69
+//U8GLIB_ST7920_202X32_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
70
+//U8GLIB_ST7920_202X32_1X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
71
+//U8GLIB_ST7920_202X32_4X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
72
+//U8GLIB_LM6059 u8g(13, 11, 10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
73
+//U8GLIB_LM6063 u8g(13, 11, 10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
74
+//U8GLIB_DOGXL160_BW u8g(10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
75
+//U8GLIB_DOGXL160_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
76
+//U8GLIB_DOGXL160_2X_BW u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
77
+//U8GLIB_DOGXL160_2X_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
78
+//U8GLIB_PCD8544 u8g(13, 11, 10, 9, 8);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, Reset = 8
79
+//U8GLIB_PCF8812 u8g(13, 11, 10, 9, 8);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, Reset = 8
80
+//U8GLIB_KS0108_128 u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 14, 15, 17, 16); 		// 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs1=14, cs2=15,di=17,rw=16
81
+//U8GLIB_LC7981_160X80 u8g(8, 9, 10, 11, 4, 5, 6, 7,  18, 14, 15, 17, 16); 	// 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
82
+//U8GLIB_LC7981_240X64 u8g(8, 9, 10, 11, 4, 5, 6, 7,  18, 14, 15, 17, 16); 	// 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
83
+//U8GLIB_LC7981_240X128 u8g(8, 9, 10, 11, 4, 5, 6, 7,  18, 14, 15, 17, 16); 	// 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
84
+//U8GLIB_ILI9325D_320x240 u8g(18,17,19,U8G_PIN_NONE,16 );  			// 8Bit Com: D0..D7: 0,1,2,3,4,5,6,7 en=wr=18, cs=17, rs=19, rd=U8G_PIN_NONE, reset = 16
85
+//U8GLIB_SBN1661_122X32 u8g(8,9,10,11,4,5,6,7,14,15, 17, U8G_PIN_NONE, 16); 	// 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 cs1=14, cs2=15,di=17,rw=16,reset = 16
86
+//U8GLIB_SSD1306_128X64 u8g(13, 11, 10, 9);	// SW SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
87
+//U8GLIB_SSD1306_128X64 u8g(10, 9);		// HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are  SCK = 13 and MOSI = 11)
88
+//U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE);	// HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are  SCK = 13 and MOSI = 11)
89
+//U8GLIB_SSD1306_128X32 u8g(13, 11, 10, 9);	// SW SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
90
+//U8GLIB_SSD1306_128X32 u8g(10, 9);             // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are  SCK = 13 and MOSI = 11)
91
+//U8GLIB_SSD1306_128X32 u8g(U8G_I2C_OPT_NONE);	// HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are  SCK = 13 and MOSI = 11)
92
+//U8GLIB_SSD1309_128X64 u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
93
+//U8GLIB_SSD1327_96X96_GR u8g(U8G_I2C_OPT_NONE);	// I2C
94
+//U8GLIB_SSD1327_96X96_2X_GR u8g(U8G_I2C_OPT_NONE);	// I2C
95
+//U8GLIB_NHD_C12864 u8g(13, 11, 10, 9, 8);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, RST = 8
96
+//U8GLIB_NHD_C12832 u8g(13, 11, 10, 9, 8);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, RST = 8
97
+//U8GLIB_T6963_240X128 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
98
+//U8GLIB_T6963_240X64 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
99
+//U8GLIB_T6963_128X64 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
100
+
101
+
102
+// setup input buffer
103
+#define LINE_MAX 30 
104
+uint8_t line_buf[LINE_MAX] = "U8GLIB Console";
105
+uint8_t line_pos = 0;
106
+
107
+// setup a text screen to support scrolling
108
+#define ROW_MAX 12
109
+
110
+
111
+uint8_t screen[ROW_MAX][LINE_MAX];
112
+uint8_t rows, cols;
113
+
114
+// line height, which matches the selected font (5x7)
115
+#define LINE_PIXEL_HEIGHT 7
116
+
117
+// clear entire screen, called during setup
118
+void clear_screen(void) {
119
+  uint8_t i, j;
120
+  for( i = 0; i < ROW_MAX; i++ )
121
+    for( j = 0; j < LINE_MAX; j++ )
122
+      screen[i][j] = 0;  
123
+}
124
+
125
+// append a line to the screen, scroll up
126
+void add_line_to_screen(void) {
127
+  uint8_t i, j;
128
+  for( j = 0; j < LINE_MAX; j++ )
129
+    for( i = 0; i < rows-1; i++ )
130
+      screen[i][j] = screen[i+1][j];
131
+  
132
+  for( j = 0; j < LINE_MAX; j++ )
133
+    screen[rows-1][j] = line_buf[j];
134
+}
135
+
136
+// U8GLIB draw procedure: output the screen
137
+void draw(void) {
138
+  uint8_t i, y;
139
+  // graphic commands to redraw the complete screen are placed here    
140
+  y = 0;       // reference is the top left -1 position of the string
141
+  y--;           // correct the -1 position of the drawStr 
142
+  for( i = 0; i < rows; i++ )
143
+  {
144
+    u8g.drawStr( 0, y, (char *)(screen[i]));
145
+    y += u8g.getFontLineSpacing();
146
+  }
147
+}
148
+
149
+void exec_line(void) {
150
+  // echo line to the serial monitor
151
+  Serial.println((const char *)line_buf);
152
+  
153
+  // add the line to the screen
154
+  add_line_to_screen();
155
+  
156
+  // U8GLIB picture loop
157
+  u8g.firstPage();  
158
+  do {
159
+    draw();
160
+  } while( u8g.nextPage() );
161
+}
162
+
163
+// clear current input buffer
164
+void reset_line(void) { 
165
+      line_pos = 0;
166
+      line_buf[line_pos] = '\0';  
167
+}
168
+
169
+// add a single character to the input buffer 
170
+void char_to_line(uint8_t c) {
171
+      line_buf[line_pos] = c;
172
+      line_pos++;
173
+      line_buf[line_pos] = '\0';  
174
+}
175
+
176
+// check serial in and handle the character
177
+void read_line(void) {
178
+  if ( Serial.available() )
179
+  {
180
+    uint8_t c;
181
+    c = Serial.read();
182
+    if ( line_pos >= cols-1 ) {
183
+      exec_line();
184
+      reset_line();
185
+      char_to_line(c);
186
+    } 
187
+    else if ( c == '\n' ) {
188
+      // ignore '\n' 
189
+    }
190
+    else if ( c == '\r' ) {
191
+      exec_line();
192
+      reset_line();
193
+    }
194
+    else {
195
+      char_to_line(c);
196
+    }
197
+  }
198
+}
199
+
200
+// Arduino master setup
201
+void setup(void) {
202
+  // set font for the console window
203
+  u8g.setFont(u8g_font_5x7);
204
+  //u8g.setFont(u8g_font_9x15);
205
+  
206
+  // set upper left position for the string draw procedure
207
+  u8g.setFontPosTop();
208
+  
209
+  // calculate the number of rows for the display
210
+  rows = u8g.getHeight() / u8g.getFontLineSpacing();
211
+  if ( rows > ROW_MAX )
212
+    rows = ROW_MAX; 
213
+  
214
+  // estimate the number of columns for the display
215
+  cols = u8g.getWidth() / u8g.getStrWidth("m");
216
+  if ( cols > LINE_MAX-1 )
217
+    cols = LINE_MAX-1; 
218
+  
219
+  clear_screen();               // clear screen
220
+  delay(1000);                  // do some delay
221
+  Serial.begin(9600);        // init serial
222
+  exec_line();                    // place the input buffer into the screen
223
+  reset_line();                   // clear input buffer
224
+}
225
+
226
+// Arduino main loop
227
+void loop(void) {
228
+  read_line();
229
+}
230
+

+ 139
- 0
ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/U8glib/examples/F/F.pde View File

@@ -0,0 +1,139 @@
1
+/*
2
+
3
+  F.pde
4
+  
5
+  Example code for the F() macro.
6
+  
7
+  >>> This example requires Arduino 1.0 and above.
8
+  
9
+  >>> Before compiling: Please remove comment from the constructor of the 
10
+  >>> connected graphics display (see below).
11
+  
12
+  Universal 8bit Graphics Library, http://code.google.com/p/u8glib/
13
+  
14
+  Copyright (c) 2012, olikraus@gmail.com
15
+  All rights reserved.
16
+
17
+  Redistribution and use in source and binary forms, with or without modification, 
18
+  are permitted provided that the following conditions are met:
19
+
20
+  * Redistributions of source code must retain the above copyright notice, this list 
21
+    of conditions and the following disclaimer.
22
+    
23
+  * Redistributions in binary form must reproduce the above copyright notice, this 
24
+    list of conditions and the following disclaimer in the documentation and/or other 
25
+    materials provided with the distribution.
26
+
27
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 
28
+  CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 
29
+  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
30
+  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
31
+  DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 
32
+  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
33
+  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
34
+  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
35
+  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 
36
+  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 
37
+  STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
38
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 
39
+  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
40
+  
41
+*/
42
+
43
+
44
+#include "U8glib.h"
45
+
46
+// setup u8g object, please remove comment from one of the following constructor calls
47
+// IMPORTANT NOTE: The complete list of supported devices is here: http://code.google.com/p/u8glib/wiki/device
48
+
49
+//U8GLIB_NHD27OLED_BW u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
50
+//U8GLIB_NHD27OLED_2X_BW u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
51
+//U8GLIB_NHD27OLED_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
52
+//U8GLIB_NHD27OLED_2X_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
53
+//U8GLIB_NHD31OLED_BW u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
54
+//U8GLIB_NHD31OLED_2X_BW u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
55
+//U8GLIB_NHD31OLED_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
56
+//U8GLIB_NHD31OLED_2X_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
57
+//U8GLIB_DOGS102 u8g(13, 11, 10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
58
+//U8GLIB_DOGM132 u8g(13, 11, 10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
59
+//U8GLIB_DOGM128 u8g(13, 11, 10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
60
+//U8GLIB_ST7920_128X64_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
61
+//U8GLIB_ST7920_128X64_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
62
+//U8GLIB_ST7920_128X64_1X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
63
+//U8GLIB_ST7920_128X64_4X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
64
+//U8GLIB_ST7920_192X32_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
65
+//U8GLIB_ST7920_192X32_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
66
+//U8GLIB_ST7920_192X32_1X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
67
+//U8GLIB_ST7920_192X32_4X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
68
+//U8GLIB_ST7920_192X32_1X u8g(13, 11, 10);	// SPI Com: SCK = en = 13, MOSI = rw = 11, CS = di = 10
69
+//U8GLIB_ST7920_192X32_4X u8g(10);		// SPI Com: SCK = en = 13, MOSI = rw = 11, CS = di = 10, HW SPI
70
+//U8GLIB_ST7920_202X32_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
71
+//U8GLIB_ST7920_202X32_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
72
+//U8GLIB_ST7920_202X32_1X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
73
+//U8GLIB_ST7920_202X32_4X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
74
+//U8GLIB_LM6059 u8g(13, 11, 10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
75
+//U8GLIB_LM6063 u8g(13, 11, 10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
76
+//U8GLIB_DOGXL160_BW u8g(10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
77
+//U8GLIB_DOGXL160_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
78
+//U8GLIB_DOGXL160_2X_BW u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
79
+//U8GLIB_DOGXL160_2X_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
80
+//U8GLIB_PCD8544 u8g(13, 11, 10, 9, 8);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, Reset = 8
81
+//U8GLIB_PCF8812 u8g(13, 11, 10, 9, 8);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, Reset = 8
82
+//U8GLIB_KS0108_128 u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 14, 15, 17, 16); 		// 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs1=14, cs2=15,di=17,rw=16
83
+//U8GLIB_LC7981_160X80 u8g(8, 9, 10, 11, 4, 5, 6, 7,  18, 14, 15, 17, 16); 	// 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
84
+//U8GLIB_LC7981_240X64 u8g(8, 9, 10, 11, 4, 5, 6, 7,  18, 14, 15, 17, 16); 	// 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
85
+//U8GLIB_LC7981_240X128 u8g(8, 9, 10, 11, 4, 5, 6, 7,  18, 14, 15, 17, 16); 	// 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
86
+//U8GLIB_ILI9325D_320x240 u8g(18,17,19,U8G_PIN_NONE,16 );  			// 8Bit Com: D0..D7: 0,1,2,3,4,5,6,7 en=wr=18, cs=17, rs=19, rd=U8G_PIN_NONE, reset = 16
87
+//U8GLIB_SBN1661_122X32 u8g(8,9,10,11,4,5,6,7,14,15, 17, U8G_PIN_NONE, 16); 	// 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 cs1=14, cs2=15,di=17,rw=16,reset = 16
88
+//U8GLIB_SSD1306_128X64 u8g(13, 11, 10, 9);	// SW SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
89
+//U8GLIB_SSD1306_128X64 u8g(10, 9);		// HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are  SCK = 13 and MOSI = 11)
90
+//U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE);	// HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are  SCK = 13 and MOSI = 11)
91
+//U8GLIB_SSD1306_128X32 u8g(13, 11, 10, 9);	// SW SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
92
+//U8GLIB_SSD1306_128X32 u8g(10, 9);             // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are  SCK = 13 and MOSI = 11)
93
+//U8GLIB_SSD1306_128X32 u8g(U8G_I2C_OPT_NONE);	// HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are  SCK = 13 and MOSI = 11)
94
+//U8GLIB_SSD1309_128X64 u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
95
+//U8GLIB_SSD1327_96X96_GR u8g(U8G_I2C_OPT_NONE);	// I2C
96
+//U8GLIB_SSD1327_96X96_2X_GR u8g(U8G_I2C_OPT_NONE);	// I2C
97
+//U8GLIB_NHD_C12864 u8g(13, 11, 10, 9, 8);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, RST = 8
98
+//U8GLIB_NHD_C12832 u8g(13, 11, 10, 9, 8);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, RST = 8
99
+//U8GLIB_T6963_240X128 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
100
+//U8GLIB_T6963_240X64 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
101
+//U8GLIB_T6963_128X64 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
102
+
103
+void draw(void) {
104
+  // graphic commands to redraw the complete screen should be placed here  
105
+  
106
+  // assign default font
107
+  u8g.setFont(u8g_font_unifont);
108
+  
109
+  // pointer to strings in flash memory can be stored in a special type
110
+  const __FlashStringHelper *flash_ptr;
111
+  
112
+  // the result of the F() macro can be assigned to this pointer
113
+  flash_ptr = F("Hello World!");
114
+  
115
+  // this pointer can be used as argument to the draw procedures
116
+  u8g.drawStr( 0+1, 20+1, flash_ptr);
117
+  u8g.drawStr( 0, 20, flash_ptr);
118
+  
119
+  // of course, the F() macro can be used directly
120
+  u8g.drawStr( 0, 40, F("PROGMEM"));
121
+
122
+}
123
+
124
+void setup(void) {
125
+  // flip screen, if required
126
+  // u8g.setRot180();
127
+}
128
+
129
+void loop(void) {
130
+  // picture loop
131
+  u8g.firstPage();  
132
+  do {
133
+    draw();
134
+  } while( u8g.nextPage() );
135
+  
136
+  // rebuild the picture after some delay
137
+  delay(500);
138
+}
139
+

+ 223
- 0
ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/U8glib/examples/GraphicsTest/GraphicsTest.pde View File

@@ -0,0 +1,223 @@
1
+/*
2
+
3
+  GraphicsTest.pde
4
+  
5
+  >>> Before compiling: Please remove comment from the constructor of the 
6
+  >>> connected graphics display (see below).
7
+  
8
+  Universal 8bit Graphics Library, http://code.google.com/p/u8glib/
9
+  
10
+  Copyright (c) 2012, olikraus@gmail.com
11
+  All rights reserved.
12
+
13
+  Redistribution and use in source and binary forms, with or without modification, 
14
+  are permitted provided that the following conditions are met:
15
+
16
+  * Redistributions of source code must retain the above copyright notice, this list 
17
+    of conditions and the following disclaimer.
18
+    
19
+  * Redistributions in binary form must reproduce the above copyright notice, this 
20
+    list of conditions and the following disclaimer in the documentation and/or other 
21
+    materials provided with the distribution.
22
+
23
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 
24
+  CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 
25
+  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
26
+  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
27
+  DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 
28
+  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
29
+  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
30
+  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
31
+  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 
32
+  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 
33
+  STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
34
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 
35
+  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
36
+
37
+
38
+*/
39
+
40
+
41
+#include "U8glib.h"
42
+
43
+// setup u8g object, please remove comment from one of the following constructor calls
44
+// IMPORTANT NOTE: The complete list of supported devices is here: http://code.google.com/p/u8glib/wiki/device
45
+
46
+//U8GLIB_NHD27OLED_BW u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
47
+//U8GLIB_NHD27OLED_2X_BW u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
48
+//U8GLIB_NHD27OLED_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
49
+//U8GLIB_NHD27OLED_2X_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
50
+//U8GLIB_NHD31OLED_BW u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
51
+//U8GLIB_NHD31OLED_2X_BW u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
52
+//U8GLIB_NHD31OLED_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
53
+//U8GLIB_NHD31OLED_2X_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
54
+//U8GLIB_DOGS102 u8g(13, 11, 10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
55
+//U8GLIB_DOGM132 u8g(13, 11, 10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
56
+//U8GLIB_DOGM128 u8g(13, 11, 10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
57
+//U8GLIB_ST7920_128X64_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
58
+//U8GLIB_ST7920_128X64_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
59
+//U8GLIB_ST7920_128X64_1X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
60
+//U8GLIB_ST7920_128X64_4X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
61
+//U8GLIB_ST7920_192X32_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
62
+//U8GLIB_ST7920_192X32_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
63
+//U8GLIB_ST7920_192X32_1X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
64
+//U8GLIB_ST7920_192X32_4X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
65
+//U8GLIB_ST7920_192X32_1X u8g(13, 11, 10);	// SPI Com: SCK = en = 13, MOSI = rw = 11, CS = di = 10
66
+//U8GLIB_ST7920_192X32_4X u8g(10);		// SPI Com: SCK = en = 13, MOSI = rw = 11, CS = di = 10, HW SPI
67
+//U8GLIB_ST7920_202X32_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
68
+//U8GLIB_ST7920_202X32_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
69
+//U8GLIB_ST7920_202X32_1X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
70
+//U8GLIB_ST7920_202X32_4X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
71
+//U8GLIB_LM6059 u8g(13, 11, 10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
72
+//U8GLIB_LM6063 u8g(13, 11, 10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
73
+//U8GLIB_DOGXL160_BW u8g(10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
74
+//U8GLIB_DOGXL160_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
75
+//U8GLIB_DOGXL160_2X_BW u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
76
+//U8GLIB_DOGXL160_2X_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
77
+//U8GLIB_PCD8544 u8g(13, 11, 10, 9, 8);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, Reset = 8
78
+//U8GLIB_PCF8812 u8g(13, 11, 10, 9, 8);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, Reset = 8
79
+//U8GLIB_KS0108_128 u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 14, 15, 17, 16); 		// 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs1=14, cs2=15,di=17,rw=16
80
+//U8GLIB_LC7981_160X80 u8g(8, 9, 10, 11, 4, 5, 6, 7,  18, 14, 15, 17, 16); 	// 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
81
+//U8GLIB_LC7981_240X64 u8g(8, 9, 10, 11, 4, 5, 6, 7,  18, 14, 15, 17, 16); 	// 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
82
+//U8GLIB_LC7981_240X128 u8g(8, 9, 10, 11, 4, 5, 6, 7,  18, 14, 15, 17, 16); 	// 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
83
+//U8GLIB_ILI9325D_320x240 u8g(18,17,19,U8G_PIN_NONE,16 );  			// 8Bit Com: D0..D7: 0,1,2,3,4,5,6,7 en=wr=18, cs=17, rs=19, rd=U8G_PIN_NONE, reset = 16
84
+//U8GLIB_SBN1661_122X32 u8g(8,9,10,11,4,5,6,7,14,15, 17, U8G_PIN_NONE, 16); 	// 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 cs1=14, cs2=15,di=17,rw=16,reset = 16
85
+//U8GLIB_SSD1306_128X64 u8g(13, 11, 10, 9);	// SW SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
86
+//U8GLIB_SSD1306_128X64 u8g(10, 9);		// HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are  SCK = 13 and MOSI = 11)
87
+//U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE);	// HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are  SCK = 13 and MOSI = 11)
88
+//U8GLIB_SSD1306_128X32 u8g(13, 11, 10, 9);	// SW SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
89
+//U8GLIB_SSD1306_128X32 u8g(10, 9);             // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are  SCK = 13 and MOSI = 11)
90
+//U8GLIB_SSD1306_128X32 u8g(U8G_I2C_OPT_NONE);	// HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are  SCK = 13 and MOSI = 11)
91
+//U8GLIB_SSD1309_128X64 u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
92
+//U8GLIB_SSD1327_96X96_GR u8g(U8G_I2C_OPT_NONE);	// I2C
93
+//U8GLIB_SSD1327_96X96_2X_GR u8g(U8G_I2C_OPT_NONE);	// I2C
94
+//U8GLIB_NHD_C12864 u8g(13, 11, 10, 9, 8);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, RST = 8
95
+//U8GLIB_NHD_C12832 u8g(13, 11, 10, 9, 8);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, RST = 8
96
+//U8GLIB_T6963_240X128 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
97
+//U8GLIB_T6963_240X64 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
98
+//U8GLIB_T6963_128X64 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
99
+
100
+void u8g_prepare(void) {
101
+  u8g.setFont(u8g_font_6x10);
102
+  u8g.setFontRefHeightExtendedText();
103
+  u8g.setDefaultForegroundColor();
104
+  u8g.setFontPosTop();
105
+}
106
+
107
+void u8g_box_frame(uint8_t a) {
108
+  u8g.drawStr( 0, 0, "drawBox");
109
+  u8g.drawBox(5,10,20,10);
110
+  u8g.drawBox(10+a,15,30,7);
111
+  u8g.drawStr( 0, 30, "drawFrame");
112
+  u8g.drawFrame(5,10+30,20,10);
113
+  u8g.drawFrame(10+a,15+30,30,7);
114
+}
115
+
116
+void u8g_disc_circle(uint8_t a) {
117
+  u8g.drawStr( 0, 0, "drawDisc");
118
+  u8g.drawDisc(10,18,9);
119
+  u8g.drawDisc(24+a,16,7);
120
+  u8g.drawStr( 0, 30, "drawCircle");
121
+  u8g.drawCircle(10,18+30,9);
122
+  u8g.drawCircle(24+a,16+30,7);
123
+}
124
+
125
+void u8g_r_frame(uint8_t a) {
126
+  u8g.drawStr( 0, 0, "drawRFrame/Box");
127
+  u8g.drawRFrame(5, 10,40,30, a+1);
128
+  u8g.drawRBox(50, 10,25,40, a+1);
129
+}
130
+
131
+void u8g_string(uint8_t a) {
132
+  u8g.drawStr(30+a,31, " 0");
133
+  u8g.drawStr90(30,31+a, " 90");
134
+  u8g.drawStr180(30-a,31, " 180");
135
+  u8g.drawStr270(30,31-a, " 270");
136
+}
137
+
138
+void u8g_line(uint8_t a) {
139
+  u8g.drawStr( 0, 0, "drawLine");
140
+  u8g.drawLine(7+a, 10, 40, 55);
141
+  u8g.drawLine(7+a*2, 10, 60, 55);
142
+  u8g.drawLine(7+a*3, 10, 80, 55);
143
+  u8g.drawLine(7+a*4, 10, 100, 55);
144
+}
145
+
146
+void u8g_ascii_1() {
147
+  char s[2] = " ";
148
+  uint8_t x, y;
149
+  u8g.drawStr( 0, 0, "ASCII page 1");
150
+  for( y = 0; y < 6; y++ ) {
151
+    for( x = 0; x < 16; x++ ) {
152
+      s[0] = y*16 + x + 32;
153
+      u8g.drawStr(x*7, y*10+10, s);
154
+    }
155
+  }
156
+}
157
+
158
+void u8g_ascii_2() {
159
+  char s[2] = " ";
160
+  uint8_t x, y;
161
+  u8g.drawStr( 0, 0, "ASCII page 2");
162
+  for( y = 0; y < 6; y++ ) {
163
+    for( x = 0; x < 16; x++ ) {
164
+      s[0] = y*16 + x + 160;
165
+      u8g.drawStr(x*7, y*10+10, s);
166
+    }
167
+  }
168
+}
169
+
170
+
171
+uint8_t draw_state = 0;
172
+
173
+void draw(void) {
174
+  u8g_prepare();
175
+  switch(draw_state >> 3) {
176
+    case 0: u8g_box_frame(draw_state&7); break;
177
+    case 1: u8g_disc_circle(draw_state&7); break;
178
+    case 2: u8g_r_frame(draw_state&7); break;
179
+    case 3: u8g_string(draw_state&7); break;
180
+    case 4: u8g_line(draw_state&7); break;
181
+    case 5: u8g_ascii_1(); break;
182
+    case 6: u8g_ascii_2(); break;
183
+  }
184
+}
185
+
186
+void setup(void) {
187
+
188
+  // flip screen, if required
189
+  //u8g.setRot180();
190
+
191
+  // assign default color value
192
+  if ( u8g.getMode() == U8G_MODE_R3G3B2 ) 
193
+    u8g.setColorIndex(255);     // white
194
+  else if ( u8g.getMode() == U8G_MODE_GRAY2BIT )
195
+    u8g.setColorIndex(3);         // max intensity
196
+  else if ( u8g.getMode() == U8G_MODE_BW )
197
+    u8g.setColorIndex(1);         // pixel on
198
+  
199
+  //u8g.setContrast(0x30);
200
+  
201
+  pinMode(13, OUTPUT);           
202
+  digitalWrite(13, HIGH);  
203
+}
204
+
205
+void loop(void) {
206
+  
207
+  // picture loop  
208
+  u8g.firstPage();  
209
+  do {
210
+    draw();
211
+  } while( u8g.nextPage() );
212
+  
213
+  // increase the state
214
+  draw_state++;
215
+  if ( draw_state >= 7*8 )
216
+    draw_state = 0;
217
+  
218
+  // rebuild the picture after some delay
219
+  delay(150);
220
+
221
+}
222
+
223
+

+ 136
- 0
ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/U8glib/examples/HelloWorld/HelloWorld.pde View File

@@ -0,0 +1,136 @@
1
+/*
2
+
3
+  HelloWorld.pde
4
+  
5
+  "Hello World!" example code.
6
+  
7
+  >>> Before compiling: Please remove comment from the constructor of the 
8
+  >>> connected graphics display (see below).
9
+  
10
+  Universal 8bit Graphics Library, http://code.google.com/p/u8glib/
11
+  
12
+  Copyright (c) 2012, olikraus@gmail.com
13
+  All rights reserved.
14
+
15
+  Redistribution and use in source and binary forms, with or without modification, 
16
+  are permitted provided that the following conditions are met:
17
+
18
+  * Redistributions of source code must retain the above copyright notice, this list 
19
+    of conditions and the following disclaimer.
20
+    
21
+  * Redistributions in binary form must reproduce the above copyright notice, this 
22
+    list of conditions and the following disclaimer in the documentation and/or other 
23
+    materials provided with the distribution.
24
+
25
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 
26
+  CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 
27
+  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
28
+  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
29
+  DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 
30
+  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
31
+  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
32
+  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
33
+  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 
34
+  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 
35
+  STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
36
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 
37
+  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
38
+  
39
+*/
40
+
41
+
42
+#include "U8glib.h"
43
+
44
+// setup u8g object, please remove comment from one of the following constructor calls
45
+// IMPORTANT NOTE: The complete list of supported devices is here: http://code.google.com/p/u8glib/wiki/device
46
+
47
+//U8GLIB_NHD27OLED_BW u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
48
+//U8GLIB_NHD27OLED_2X_BW u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
49
+//U8GLIB_NHD27OLED_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
50
+//U8GLIB_NHD27OLED_2X_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
51
+//U8GLIB_NHD31OLED_BW u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
52
+//U8GLIB_NHD31OLED_2X_BW u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
53
+//U8GLIB_NHD31OLED_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
54
+//U8GLIB_NHD31OLED_2X_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
55
+//U8GLIB_DOGS102 u8g(13, 11, 10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
56
+//U8GLIB_DOGM132 u8g(13, 11, 10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
57
+//U8GLIB_DOGM128 u8g(13, 11, 10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
58
+//U8GLIB_ST7920_128X64_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
59
+//U8GLIB_ST7920_128X64_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
60
+//U8GLIB_ST7920_128X64_1X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
61
+//U8GLIB_ST7920_128X64_4X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
62
+//U8GLIB_ST7920_192X32_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
63
+//U8GLIB_ST7920_192X32_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
64
+//U8GLIB_ST7920_192X32_1X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
65
+//U8GLIB_ST7920_192X32_4X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
66
+//U8GLIB_ST7920_192X32_1X u8g(13, 11, 10);	// SPI Com: SCK = en = 13, MOSI = rw = 11, CS = di = 10
67
+//U8GLIB_ST7920_192X32_4X u8g(10);		// SPI Com: SCK = en = 13, MOSI = rw = 11, CS = di = 10, HW SPI
68
+//U8GLIB_ST7920_202X32_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
69
+//U8GLIB_ST7920_202X32_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
70
+//U8GLIB_ST7920_202X32_1X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
71
+//U8GLIB_ST7920_202X32_4X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
72
+//U8GLIB_LM6059 u8g(13, 11, 10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
73
+//U8GLIB_LM6063 u8g(13, 11, 10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
74
+//U8GLIB_DOGXL160_BW u8g(10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
75
+//U8GLIB_DOGXL160_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
76
+//U8GLIB_DOGXL160_2X_BW u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
77
+//U8GLIB_DOGXL160_2X_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
78
+//U8GLIB_PCD8544 u8g(13, 11, 10, 9, 8);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, Reset = 8
79
+//U8GLIB_PCF8812 u8g(13, 11, 10, 9, 8);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, Reset = 8
80
+//U8GLIB_KS0108_128 u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 14, 15, 17, 16); 		// 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs1=14, cs2=15,di=17,rw=16
81
+//U8GLIB_LC7981_160X80 u8g(8, 9, 10, 11, 4, 5, 6, 7,  18, 14, 15, 17, 16); 	// 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
82
+//U8GLIB_LC7981_240X64 u8g(8, 9, 10, 11, 4, 5, 6, 7,  18, 14, 15, 17, 16); 	// 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
83
+//U8GLIB_LC7981_240X128 u8g(8, 9, 10, 11, 4, 5, 6, 7,  18, 14, 15, 17, 16); 	// 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
84
+//U8GLIB_ILI9325D_320x240 u8g(18,17,19,U8G_PIN_NONE,16 );  			// 8Bit Com: D0..D7: 0,1,2,3,4,5,6,7 en=wr=18, cs=17, rs=19, rd=U8G_PIN_NONE, reset = 16
85
+//U8GLIB_SBN1661_122X32 u8g(8,9,10,11,4,5,6,7,14,15, 17, U8G_PIN_NONE, 16); 	// 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 cs1=14, cs2=15,di=17,rw=16,reset = 16
86
+//U8GLIB_SSD1306_128X64 u8g(13, 11, 10, 9);	// SW SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
87
+//U8GLIB_SSD1306_128X64 u8g(10, 9);		// HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are  SCK = 13 and MOSI = 11)
88
+//U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE);	// HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are  SCK = 13 and MOSI = 11)
89
+//U8GLIB_SSD1306_128X32 u8g(13, 11, 10, 9);	// SW SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
90
+//U8GLIB_SSD1306_128X32 u8g(10, 9);             // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are  SCK = 13 and MOSI = 11)
91
+//U8GLIB_SSD1306_128X32 u8g(U8G_I2C_OPT_NONE);	// HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are  SCK = 13 and MOSI = 11)
92
+//U8GLIB_SSD1309_128X64 u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
93
+//U8GLIB_SSD1327_96X96_GR u8g(U8G_I2C_OPT_NONE);	// I2C
94
+//U8GLIB_SSD1327_96X96_2X_GR u8g(U8G_I2C_OPT_NONE);	// I2C
95
+//U8GLIB_NHD_C12864 u8g(13, 11, 10, 9, 8);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, RST = 8
96
+//U8GLIB_NHD_C12832 u8g(13, 11, 10, 9, 8);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, RST = 8
97
+//U8GLIB_T6963_240X128 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
98
+//U8GLIB_T6963_240X64 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
99
+//U8GLIB_T6963_128X64 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
100
+
101
+
102
+void draw(void) {
103
+  // graphic commands to redraw the complete screen should be placed here  
104
+  u8g.setFont(u8g_font_unifont);
105
+  //u8g.setFont(u8g_font_osb21);
106
+  u8g.drawStr( 0, 22, "Hello World!");
107
+}
108
+
109
+void setup(void) {
110
+  
111
+  // flip screen, if required
112
+  // u8g.setRot180();
113
+  
114
+  // set SPI backup if required
115
+  //u8g.setHardwareBackup(u8g_backup_avr_spi);
116
+
117
+  // assign default color value
118
+  if ( u8g.getMode() == U8G_MODE_R3G3B2 ) 
119
+    u8g.setColorIndex(255);     // white
120
+  else if ( u8g.getMode() == U8G_MODE_GRAY2BIT )
121
+    u8g.setColorIndex(3);         // max intensity
122
+  else if ( u8g.getMode() == U8G_MODE_BW )
123
+    u8g.setColorIndex(1);         // pixel on
124
+}
125
+
126
+void loop(void) {
127
+  // picture loop
128
+  u8g.firstPage();  
129
+  do {
130
+    draw();
131
+  } while( u8g.nextPage() );
132
+  
133
+  // rebuild the picture after some delay
134
+  delay(500);
135
+}
136
+

+ 234
- 0
ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/U8glib/examples/Menu/Menu.pde View File

@@ -0,0 +1,234 @@
1
+/*
2
+
3
+  Menu.pde
4
+  
5
+  Simple Menu Selection
6
+
7
+  >>> Before compiling: Please remove comment from the constructor of the 
8
+  >>> connected graphics display (see below).
9
+  
10
+  Universal 8bit Graphics Library, http://code.google.com/p/u8glib/
11
+  
12
+  Copyright (c) 2012, olikraus@gmail.com
13
+  All rights reserved.
14
+
15
+  Redistribution and use in source and binary forms, with or without modification, 
16
+  are permitted provided that the following conditions are met:
17
+
18
+  * Redistributions of source code must retain the above copyright notice, this list 
19
+    of conditions and the following disclaimer.
20
+    
21
+  * Redistributions in binary form must reproduce the above copyright notice, this 
22
+    list of conditions and the following disclaimer in the documentation and/or other 
23
+    materials provided with the distribution.
24
+
25
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 
26
+  CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 
27
+  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
28
+  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
29
+  DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 
30
+  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
31
+  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
32
+  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
33
+  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 
34
+  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 
35
+  STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
36
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 
37
+  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
38
+  
39
+
40
+*/
41
+
42
+
43
+#include "U8glib.h"
44
+
45
+// setup u8g object, please remove comment from one of the following constructor calls
46
+// IMPORTANT NOTE: The complete list of supported devices is here: http://code.google.com/p/u8glib/wiki/device
47
+
48
+//U8GLIB_NHD27OLED_BW u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
49
+//U8GLIB_NHD27OLED_2X_BW u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
50
+//U8GLIB_NHD27OLED_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
51
+//U8GLIB_NHD27OLED_2X_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
52
+//U8GLIB_NHD31OLED_BW u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
53
+//U8GLIB_NHD31OLED_2X_BW u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
54
+//U8GLIB_NHD31OLED_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
55
+//U8GLIB_NHD31OLED_2X_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
56
+//U8GLIB_DOGS102 u8g(13, 11, 10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
57
+//U8GLIB_DOGM132 u8g(13, 11, 10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
58
+//U8GLIB_DOGM128 u8g(13, 11, 10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
59
+//U8GLIB_ST7920_128X64_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
60
+//U8GLIB_ST7920_128X64_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
61
+//U8GLIB_ST7920_128X64_1X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
62
+//U8GLIB_ST7920_128X64_4X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
63
+//U8GLIB_ST7920_192X32_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
64
+//U8GLIB_ST7920_192X32_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
65
+//U8GLIB_ST7920_192X32_1X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
66
+//U8GLIB_ST7920_192X32_4X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
67
+//U8GLIB_ST7920_192X32_1X u8g(13, 11, 10);	// SPI Com: SCK = en = 13, MOSI = rw = 11, CS = di = 10
68
+//U8GLIB_ST7920_192X32_4X u8g(10);		// SPI Com: SCK = en = 13, MOSI = rw = 11, CS = di = 10, HW SPI
69
+//U8GLIB_ST7920_202X32_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
70
+//U8GLIB_ST7920_202X32_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
71
+//U8GLIB_ST7920_202X32_1X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
72
+//U8GLIB_ST7920_202X32_4X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
73
+//U8GLIB_LM6059 u8g(13, 11, 10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
74
+//U8GLIB_LM6063 u8g(13, 11, 10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
75
+//U8GLIB_DOGXL160_BW u8g(10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
76
+//U8GLIB_DOGXL160_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
77
+//U8GLIB_DOGXL160_2X_BW u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
78
+//U8GLIB_DOGXL160_2X_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
79
+//U8GLIB_PCD8544 u8g(13, 11, 10, 9, 8);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, Reset = 8
80
+//U8GLIB_PCF8812 u8g(13, 11, 10, 9, 8);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, Reset = 8
81
+//U8GLIB_KS0108_128 u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 14, 15, 17, 16); 		// 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs1=14, cs2=15,di=17,rw=16
82
+//U8GLIB_LC7981_160X80 u8g(8, 9, 10, 11, 4, 5, 6, 7,  18, 14, 15, 17, 16); 	// 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
83
+//U8GLIB_LC7981_240X64 u8g(8, 9, 10, 11, 4, 5, 6, 7,  18, 14, 15, 17, 16); 	// 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
84
+//U8GLIB_LC7981_240X128 u8g(8, 9, 10, 11, 4, 5, 6, 7,  18, 14, 15, 17, 16); 	// 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
85
+//U8GLIB_ILI9325D_320x240 u8g(18,17,19,U8G_PIN_NONE,16 );  			// 8Bit Com: D0..D7: 0,1,2,3,4,5,6,7 en=wr=18, cs=17, rs=19, rd=U8G_PIN_NONE, reset = 16
86
+//U8GLIB_SBN1661_122X32 u8g(8,9,10,11,4,5,6,7,14,15, 17, U8G_PIN_NONE, 16); 	// 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 cs1=14, cs2=15,di=17,rw=16,reset = 16
87
+//U8GLIB_SSD1306_128X64 u8g(13, 11, 10, 9);	// SW SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
88
+//U8GLIB_SSD1306_128X64 u8g(10, 9);		// HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are  SCK = 13 and MOSI = 11)
89
+//U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE);	// HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are  SCK = 13 and MOSI = 11)
90
+//U8GLIB_SSD1306_128X32 u8g(13, 11, 10, 9);	// SW SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
91
+//U8GLIB_SSD1306_128X32 u8g(10, 9);             // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are  SCK = 13 and MOSI = 11)
92
+//U8GLIB_SSD1306_128X32 u8g(U8G_I2C_OPT_NONE);	// HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are  SCK = 13 and MOSI = 11)
93
+//U8GLIB_SSD1309_128X64 u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
94
+//U8GLIB_SSD1327_96X96_GR u8g(U8G_I2C_OPT_NONE);	// I2C
95
+//U8GLIB_SSD1327_96X96_2X_GR u8g(U8G_I2C_OPT_NONE);	// I2C
96
+//U8GLIB_NHD_C12864 u8g(13, 11, 10, 9, 8);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, RST = 8
97
+//U8GLIB_NHD_C12832 u8g(13, 11, 10, 9, 8);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, RST = 8
98
+//U8GLIB_T6963_240X128 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
99
+//U8GLIB_T6963_240X64 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
100
+//U8GLIB_T6963_128X64 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
101
+
102
+
103
+#define KEY_NONE 0
104
+#define KEY_PREV 1
105
+#define KEY_NEXT 2
106
+#define KEY_SELECT 3
107
+#define KEY_BACK 4
108
+
109
+// DOGS102 shield configuration values
110
+//uint8_t uiKeyPrev = 2;
111
+//uint8_t uiKeyNext = 4;
112
+//uint8_t uiKeySelect = 5;
113
+//uint8_t uiKeyBack = 3;
114
+
115
+// DOGM128-Shield	 configuration values
116
+// DOGXL60-Shield configuration values
117
+uint8_t uiKeyPrev = 7;
118
+uint8_t uiKeyNext = 3;
119
+uint8_t uiKeySelect = 2;
120
+uint8_t uiKeyBack = 8;
121
+
122
+uint8_t uiKeyCodeFirst = KEY_NONE;
123
+uint8_t uiKeyCodeSecond = KEY_NONE;
124
+uint8_t uiKeyCode = KEY_NONE;
125
+
126
+
127
+void uiSetup(void) {
128
+  // configure input keys 
129
+  
130
+  pinMode(uiKeyPrev, INPUT);           // set pin to input
131
+  digitalWrite(uiKeyPrev, HIGH);       // turn on pullup resistors
132
+  pinMode(uiKeyNext, INPUT);           // set pin to input
133
+  digitalWrite(uiKeyNext, HIGH);       // turn on pullup resistors
134
+  pinMode(uiKeySelect, INPUT);           // set pin to input
135
+  digitalWrite(uiKeySelect, HIGH);       // turn on pullup resistors
136
+  pinMode(uiKeyBack, INPUT);           // set pin to input
137
+  digitalWrite(uiKeyBack, HIGH);       // turn on pullup resistors
138
+}
139
+
140
+void uiStep(void) {
141
+  uiKeyCodeSecond = uiKeyCodeFirst;
142
+  if ( digitalRead(uiKeyPrev) == LOW )
143
+    uiKeyCodeFirst = KEY_PREV;
144
+  else if ( digitalRead(uiKeyNext) == LOW )
145
+    uiKeyCodeFirst = KEY_NEXT;
146
+  else if ( digitalRead(uiKeySelect) == LOW )
147
+    uiKeyCodeFirst = KEY_SELECT;
148
+  else if ( digitalRead(uiKeyBack) == LOW )
149
+    uiKeyCodeFirst = KEY_BACK;
150
+  else 
151
+    uiKeyCodeFirst = KEY_NONE;
152
+  
153
+  if ( uiKeyCodeSecond == uiKeyCodeFirst )
154
+    uiKeyCode = uiKeyCodeFirst;
155
+  else
156
+    uiKeyCode = KEY_NONE;
157
+}
158
+
159
+
160
+#define MENU_ITEMS 4
161
+char *menu_strings[MENU_ITEMS] = { "First Line", "Second Item", "3333333", "abcdefg" };
162
+
163
+uint8_t menu_current = 0;
164
+uint8_t menu_redraw_required = 0;
165
+uint8_t last_key_code = KEY_NONE;
166
+
167
+
168
+void drawMenu(void) {
169
+  uint8_t i, h;
170
+  u8g_uint_t w, d;
171
+
172
+  u8g.setFont(u8g_font_6x13);
173
+  u8g.setFontRefHeightText();
174
+  u8g.setFontPosTop();
175
+  
176
+  h = u8g.getFontAscent()-u8g.getFontDescent();
177
+  w = u8g.getWidth();
178
+  for( i = 0; i < MENU_ITEMS; i++ ) {
179
+    d = (w-u8g.getStrWidth(menu_strings[i]))/2;
180
+    u8g.setDefaultForegroundColor();
181
+    if ( i == menu_current ) {
182
+      u8g.drawBox(0, i*h+1, w, h);
183
+      u8g.setDefaultBackgroundColor();
184
+    }
185
+    u8g.drawStr(d, i*h, menu_strings[i]);
186
+  }
187
+}
188
+
189
+void updateMenu(void) {
190
+  if ( uiKeyCode != KEY_NONE && last_key_code == uiKeyCode ) {
191
+    return;
192
+  }
193
+  last_key_code = uiKeyCode;
194
+  
195
+  switch ( uiKeyCode ) {
196
+    case KEY_NEXT:
197
+      menu_current++;
198
+      if ( menu_current >= MENU_ITEMS )
199
+        menu_current = 0;
200
+      menu_redraw_required = 1;
201
+      break;
202
+    case KEY_PREV:
203
+      if ( menu_current == 0 )
204
+        menu_current = MENU_ITEMS;
205
+      menu_current--;
206
+      menu_redraw_required = 1;
207
+      break;
208
+  }
209
+}
210
+
211
+
212
+void setup() {
213
+  // rotate screen, if required
214
+  // u8g.setRot180();
215
+  
216
+  uiSetup();                                // setup key detection and debounce algorithm
217
+  menu_redraw_required = 1;     // force initial redraw
218
+}
219
+
220
+void loop() {  
221
+
222
+  uiStep();                                     // check for key press
223
+    
224
+  if (  menu_redraw_required != 0 ) {
225
+    u8g.firstPage();
226
+    do  {
227
+      drawMenu();
228
+    } while( u8g.nextPage() );
229
+    menu_redraw_required = 0;
230
+  }
231
+
232
+  updateMenu();                            // update menu bar
233
+  
234
+}

+ 124
- 0
ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/U8glib/examples/PrintTest/PrintTest.pde View File

@@ -0,0 +1,124 @@
1
+/*
2
+
3
+  PrintTest.pde
4
+  
5
+  How to use the base class "Print"
6
+  
7
+  >>> Before compiling: Please remove comment from the constructor of the 
8
+  >>> connected graphics display (see below).
9
+  
10
+  Universal 8bit Graphics Library, http://code.google.com/p/u8glib/
11
+  
12
+  Copyright (c) 2012, olikraus@gmail.com
13
+  All rights reserved.
14
+
15
+  Redistribution and use in source and binary forms, with or without modification, 
16
+  are permitted provided that the following conditions are met:
17
+
18
+  * Redistributions of source code must retain the above copyright notice, this list 
19
+    of conditions and the following disclaimer.
20
+    
21
+  * Redistributions in binary form must reproduce the above copyright notice, this 
22
+    list of conditions and the following disclaimer in the documentation and/or other 
23
+    materials provided with the distribution.
24
+
25
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 
26
+  CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 
27
+  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
28
+  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
29
+  DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 
30
+  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
31
+  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
32
+  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
33
+  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 
34
+  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 
35
+  STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
36
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 
37
+  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
38
+  
39
+*/
40
+
41
+
42
+#include "U8glib.h"
43
+
44
+// setup u8g object, please remove comment from one of the following constructor calls
45
+// IMPORTANT NOTE: The complete list of supported devices is here: http://code.google.com/p/u8glib/wiki/device
46
+
47
+//U8GLIB_NHD27OLED_BW u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
48
+//U8GLIB_NHD27OLED_2X_BW u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
49
+//U8GLIB_NHD27OLED_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
50
+//U8GLIB_NHD27OLED_2X_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
51
+//U8GLIB_NHD31OLED_BW u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
52
+//U8GLIB_NHD31OLED_2X_BW u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
53
+//U8GLIB_NHD31OLED_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
54
+//U8GLIB_NHD31OLED_2X_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
55
+//U8GLIB_DOGS102 u8g(13, 11, 10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
56
+//U8GLIB_DOGM132 u8g(13, 11, 10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
57
+//U8GLIB_DOGM128 u8g(13, 11, 10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
58
+//U8GLIB_ST7920_128X64_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
59
+//U8GLIB_ST7920_128X64_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
60
+//U8GLIB_ST7920_128X64_1X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
61
+//U8GLIB_ST7920_128X64_4X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
62
+//U8GLIB_ST7920_192X32_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
63
+//U8GLIB_ST7920_192X32_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
64
+//U8GLIB_ST7920_192X32_1X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
65
+//U8GLIB_ST7920_192X32_4X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
66
+//U8GLIB_ST7920_192X32_1X u8g(13, 11, 10);	// SPI Com: SCK = en = 13, MOSI = rw = 11, CS = di = 10
67
+//U8GLIB_ST7920_192X32_4X u8g(10);		// SPI Com: SCK = en = 13, MOSI = rw = 11, CS = di = 10, HW SPI
68
+//U8GLIB_ST7920_202X32_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
69
+//U8GLIB_ST7920_202X32_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
70
+//U8GLIB_ST7920_202X32_1X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
71
+//U8GLIB_ST7920_202X32_4X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
72
+//U8GLIB_LM6059 u8g(13, 11, 10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
73
+//U8GLIB_LM6063 u8g(13, 11, 10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
74
+//U8GLIB_DOGXL160_BW u8g(10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
75
+//U8GLIB_DOGXL160_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
76
+//U8GLIB_DOGXL160_2X_BW u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
77
+//U8GLIB_DOGXL160_2X_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
78
+//U8GLIB_PCD8544 u8g(13, 11, 10, 9, 8);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, Reset = 8
79
+//U8GLIB_PCF8812 u8g(13, 11, 10, 9, 8);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, Reset = 8
80
+//U8GLIB_KS0108_128 u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 14, 15, 17, 16); 		// 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs1=14, cs2=15,di=17,rw=16
81
+//U8GLIB_LC7981_160X80 u8g(8, 9, 10, 11, 4, 5, 6, 7,  18, 14, 15, 17, 16); 	// 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
82
+//U8GLIB_LC7981_240X64 u8g(8, 9, 10, 11, 4, 5, 6, 7,  18, 14, 15, 17, 16); 	// 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
83
+//U8GLIB_LC7981_240X128 u8g(8, 9, 10, 11, 4, 5, 6, 7,  18, 14, 15, 17, 16); 	// 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
84
+//U8GLIB_ILI9325D_320x240 u8g(18,17,19,U8G_PIN_NONE,16 );  			// 8Bit Com: D0..D7: 0,1,2,3,4,5,6,7 en=wr=18, cs=17, rs=19, rd=U8G_PIN_NONE, reset = 16
85
+//U8GLIB_SBN1661_122X32 u8g(8,9,10,11,4,5,6,7,14,15, 17, U8G_PIN_NONE, 16); 	// 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 cs1=14, cs2=15,di=17,rw=16,reset = 16
86
+//U8GLIB_SSD1306_128X64 u8g(13, 11, 10, 9);	// SW SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
87
+//U8GLIB_SSD1306_128X64 u8g(10, 9);		// HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are  SCK = 13 and MOSI = 11)
88
+//U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE);	// HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are  SCK = 13 and MOSI = 11)
89
+//U8GLIB_SSD1306_128X32 u8g(13, 11, 10, 9);	// SW SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
90
+//U8GLIB_SSD1306_128X32 u8g(10, 9);             // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are  SCK = 13 and MOSI = 11)
91
+//U8GLIB_SSD1306_128X32 u8g(U8G_I2C_OPT_NONE);	// HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are  SCK = 13 and MOSI = 11)
92
+//U8GLIB_SSD1309_128X64 u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
93
+//U8GLIB_SSD1327_96X96_GR u8g(U8G_I2C_OPT_NONE);	// I2C
94
+//U8GLIB_SSD1327_96X96_2X_GR u8g(U8G_I2C_OPT_NONE);	// I2C
95
+//U8GLIB_NHD_C12864 u8g(13, 11, 10, 9, 8);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, RST = 8
96
+//U8GLIB_NHD_C12832 u8g(13, 11, 10, 9, 8);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, RST = 8
97
+//U8GLIB_T6963_240X128 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
98
+//U8GLIB_T6963_240X64 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
99
+//U8GLIB_T6963_128X64 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
100
+
101
+void draw(void) {
102
+  // graphic commands to redraw the complete screen should be placed here  
103
+  u8g.setFont(u8g_font_unifont);
104
+  u8g.setPrintPos(0, 20); 
105
+  // call procedure from base class, http://arduino.cc/en/Serial/Print
106
+  u8g.print("Hello World!");
107
+}
108
+
109
+void setup(void) {
110
+  // flip screen, if required
111
+  // u8g.setRot180();
112
+}
113
+
114
+void loop(void) {
115
+  // picture loop
116
+  u8g.firstPage();  
117
+  do {
118
+    draw();
119
+  } while( u8g.nextPage() );
120
+  
121
+  // rebuild the picture after some delay
122
+  delay(500);
123
+}
124
+

+ 152
- 0
ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/U8glib/examples/Rotation/Rotation.pde View File

@@ -0,0 +1,152 @@
1
+/*
2
+
3
+  HelloWorld.pde
4
+  
5
+  "Hello World!" example code.
6
+  
7
+  >>> Before compiling: Please remove comment from the constructor of the 
8
+  >>> connected graphics display (see below).
9
+  
10
+  Universal 8bit Graphics Library, http://code.google.com/p/u8glib/
11
+  
12
+  Copyright (c) 2012, olikraus@gmail.com
13
+  All rights reserved.
14
+
15
+  Redistribution and use in source and binary forms, with or without modification, 
16
+  are permitted provided that the following conditions are met:
17
+
18
+  * Redistributions of source code must retain the above copyright notice, this list 
19
+    of conditions and the following disclaimer.
20
+    
21
+  * Redistributions in binary form must reproduce the above copyright notice, this 
22
+    list of conditions and the following disclaimer in the documentation and/or other 
23
+    materials provided with the distribution.
24
+
25
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 
26
+  CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 
27
+  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
28
+  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
29
+  DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 
30
+  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
31
+  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
32
+  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
33
+  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 
34
+  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 
35
+  STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
36
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 
37
+  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
38
+  
39
+*/
40
+
41
+
42
+#include "U8glib.h"
43
+
44
+// setup u8g object, please remove comment from one of the following constructor calls
45
+// IMPORTANT NOTE: The complete list of supported devices is here: http://code.google.com/p/u8glib/wiki/device
46
+
47
+//U8GLIB_NHD27OLED_BW u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
48
+//U8GLIB_NHD27OLED_2X_BW u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
49
+//U8GLIB_NHD27OLED_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
50
+//U8GLIB_NHD27OLED_2X_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
51
+//U8GLIB_NHD31OLED_BW u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
52
+//U8GLIB_NHD31OLED_2X_BW u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
53
+//U8GLIB_NHD31OLED_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
54
+//U8GLIB_NHD31OLED_2X_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
55
+//U8GLIB_DOGS102 u8g(13, 11, 10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
56
+//U8GLIB_DOGM132 u8g(13, 11, 10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
57
+//U8GLIB_DOGM128 u8g(13, 11, 10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
58
+//U8GLIB_ST7920_128X64_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
59
+//U8GLIB_ST7920_128X64_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
60
+//U8GLIB_ST7920_128X64_1X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
61
+//U8GLIB_ST7920_128X64_4X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
62
+//U8GLIB_ST7920_192X32_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
63
+//U8GLIB_ST7920_192X32_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
64
+//U8GLIB_ST7920_192X32_1X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
65
+//U8GLIB_ST7920_192X32_4X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
66
+//U8GLIB_ST7920_192X32_1X u8g(13, 11, 10);	// SPI Com: SCK = en = 13, MOSI = rw = 11, CS = di = 10
67
+//U8GLIB_ST7920_192X32_4X u8g(10);		// SPI Com: SCK = en = 13, MOSI = rw = 11, CS = di = 10, HW SPI
68
+//U8GLIB_ST7920_202X32_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
69
+//U8GLIB_ST7920_202X32_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
70
+//U8GLIB_ST7920_202X32_1X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
71
+//U8GLIB_ST7920_202X32_4X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
72
+//U8GLIB_LM6059 u8g(13, 11, 10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
73
+//U8GLIB_LM6063 u8g(13, 11, 10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
74
+//U8GLIB_DOGXL160_BW u8g(10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
75
+//U8GLIB_DOGXL160_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
76
+//U8GLIB_DOGXL160_2X_BW u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
77
+//U8GLIB_DOGXL160_2X_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
78
+//U8GLIB_PCD8544 u8g(13, 11, 10, 9, 8);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, Reset = 8
79
+//U8GLIB_PCF8812 u8g(13, 11, 10, 9, 8);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, Reset = 8
80
+//U8GLIB_KS0108_128 u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 14, 15, 17, 16); 		// 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs1=14, cs2=15,di=17,rw=16
81
+//U8GLIB_LC7981_160X80 u8g(8, 9, 10, 11, 4, 5, 6, 7,  18, 14, 15, 17, 16); 	// 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
82
+//U8GLIB_LC7981_240X64 u8g(8, 9, 10, 11, 4, 5, 6, 7,  18, 14, 15, 17, 16); 	// 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
83
+//U8GLIB_LC7981_240X128 u8g(8, 9, 10, 11, 4, 5, 6, 7,  18, 14, 15, 17, 16); 	// 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
84
+//U8GLIB_ILI9325D_320x240 u8g(18,17,19,U8G_PIN_NONE,16 );  			// 8Bit Com: D0..D7: 0,1,2,3,4,5,6,7 en=wr=18, cs=17, rs=19, rd=U8G_PIN_NONE, reset = 16
85
+//U8GLIB_SBN1661_122X32 u8g(8,9,10,11,4,5,6,7,14,15, 17, U8G_PIN_NONE, 16); 	// 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 cs1=14, cs2=15,di=17,rw=16,reset = 16
86
+//U8GLIB_SSD1306_128X64 u8g(13, 11, 10, 9);	// SW SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
87
+//U8GLIB_SSD1306_128X64 u8g(10, 9);		// HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are  SCK = 13 and MOSI = 11)
88
+//U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE);	// HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are  SCK = 13 and MOSI = 11)
89
+//U8GLIB_SSD1306_128X32 u8g(13, 11, 10, 9);	// SW SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
90
+//U8GLIB_SSD1306_128X32 u8g(10, 9);             // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are  SCK = 13 and MOSI = 11)
91
+//U8GLIB_SSD1306_128X32 u8g(U8G_I2C_OPT_NONE);	// HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are  SCK = 13 and MOSI = 11)
92
+//U8GLIB_SSD1309_128X64 u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
93
+//U8GLIB_SSD1327_96X96_GR u8g(U8G_I2C_OPT_NONE);	// I2C
94
+//U8GLIB_SSD1327_96X96_2X_GR u8g(U8G_I2C_OPT_NONE);	// I2C
95
+//U8GLIB_NHD_C12864 u8g(13, 11, 10, 9, 8);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, RST = 8
96
+//U8GLIB_NHD_C12832 u8g(13, 11, 10, 9, 8);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, RST = 8
97
+//U8GLIB_T6963_240X128 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
98
+//U8GLIB_T6963_240X64 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
99
+//U8GLIB_T6963_128X64 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
100
+
101
+uint8_t offset = 0;
102
+
103
+void draw(void) {
104
+  // graphic commands to redraw the complete screen should be placed here  
105
+  u8g.setFont(u8g_font_unifont);
106
+  u8g.drawStr( 0+0, 20+0, "Hello!");
107
+  u8g.drawStr( 0+2, 20+16, "Hello!");
108
+  
109
+  u8g.drawBox(0, 0, 3, 3);
110
+  u8g.drawBox(u8g.getWidth()-6, 0, 6, 6);
111
+  u8g.drawBox(u8g.getWidth()-9, u8g.getHeight()-9, 9, 9);
112
+  u8g.drawBox(0, u8g.getHeight()-12, 12, 12);  
113
+}
114
+
115
+void setup(void) {
116
+}
117
+
118
+
119
+void rotate(void) {
120
+  static  uint8_t dir = 0;
121
+  static  unsigned long next_rotation = 0;
122
+  
123
+  if ( next_rotation < millis() )
124
+  {
125
+    switch(dir) {
126
+      case 0: u8g.undoRotation(); break;
127
+      case 1: u8g.setRot90(); break;
128
+      case 2: u8g.setRot180(); break;
129
+      case 3: u8g.setRot270(); offset = ( offset + 1 ) & 0x0f; break;
130
+    }
131
+    
132
+    dir++;
133
+    dir &= 3;
134
+    next_rotation = millis();
135
+    next_rotation += 1000;
136
+  }
137
+}
138
+
139
+void loop(void) {
140
+  // screen rotation 
141
+  rotate();
142
+  
143
+  // picture loop
144
+  u8g.firstPage();  
145
+  do {
146
+    draw();
147
+  } while( u8g.nextPage() );
148
+  
149
+  // rebuild the picture after some delay
150
+  delay(100);
151
+}
152
+

+ 141
- 0
ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/U8glib/examples/Scale/Scale.pde View File

@@ -0,0 +1,141 @@
1
+/*
2
+
3
+  HelloWorld.pde
4
+  
5
+  "Hello World!" example code.
6
+  
7
+  >>> Before compiling: Please remove comment from the constructor of the 
8
+  >>> connected graphics display (see below).
9
+  
10
+  Universal 8bit Graphics Library, http://code.google.com/p/u8glib/
11
+  
12
+  Copyright (c) 2012, olikraus@gmail.com
13
+  All rights reserved.
14
+
15
+  Redistribution and use in source and binary forms, with or without modification, 
16
+  are permitted provided that the following conditions are met:
17
+
18
+  * Redistributions of source code must retain the above copyright notice, this list 
19
+    of conditions and the following disclaimer.
20
+    
21
+  * Redistributions in binary form must reproduce the above copyright notice, this 
22
+    list of conditions and the following disclaimer in the documentation and/or other 
23
+    materials provided with the distribution.
24
+
25
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 
26
+  CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 
27
+  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
28
+  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
29
+  DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 
30
+  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
31
+  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
32
+  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
33
+  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 
34
+  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 
35
+  STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
36
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 
37
+  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
38
+  
39
+*/
40
+
41
+
42
+#include "U8glib.h"
43
+
44
+// setup u8g object, please remove comment from one of the following constructor calls
45
+// IMPORTANT NOTE: The complete list of supported devices is here: http://code.google.com/p/u8glib/wiki/device
46
+
47
+//U8GLIB_NHD27OLED_BW u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
48
+//U8GLIB_NHD27OLED_2X_BW u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
49
+//U8GLIB_NHD27OLED_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
50
+//U8GLIB_NHD27OLED_2X_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
51
+//U8GLIB_NHD31OLED_BW u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
52
+//U8GLIB_NHD31OLED_2X_BW u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
53
+//U8GLIB_NHD31OLED_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
54
+//U8GLIB_NHD31OLED_2X_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
55
+//U8GLIB_DOGS102 u8g(13, 11, 10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
56
+//U8GLIB_DOGM132 u8g(13, 11, 10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
57
+//U8GLIB_DOGM128 u8g(13, 11, 10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
58
+//U8GLIB_ST7920_128X64_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
59
+//U8GLIB_ST7920_128X64_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
60
+//U8GLIB_ST7920_128X64_1X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
61
+//U8GLIB_ST7920_128X64_4X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
62
+//U8GLIB_ST7920_192X32_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
63
+//U8GLIB_ST7920_192X32_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
64
+//U8GLIB_ST7920_192X32_1X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
65
+//U8GLIB_ST7920_192X32_4X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
66
+//U8GLIB_ST7920_192X32_1X u8g(13, 11, 10);	// SPI Com: SCK = en = 13, MOSI = rw = 11, CS = di = 10
67
+//U8GLIB_ST7920_192X32_4X u8g(10);		// SPI Com: SCK = en = 13, MOSI = rw = 11, CS = di = 10, HW SPI
68
+//U8GLIB_ST7920_202X32_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
69
+//U8GLIB_ST7920_202X32_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
70
+//U8GLIB_ST7920_202X32_1X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
71
+//U8GLIB_ST7920_202X32_4X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
72
+//U8GLIB_LM6059 u8g(13, 11, 10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
73
+//U8GLIB_LM6063 u8g(13, 11, 10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
74
+//U8GLIB_DOGXL160_BW u8g(10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
75
+//U8GLIB_DOGXL160_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
76
+//U8GLIB_DOGXL160_2X_BW u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
77
+//U8GLIB_DOGXL160_2X_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
78
+//U8GLIB_PCD8544 u8g(13, 11, 10, 9, 8);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, Reset = 8
79
+//U8GLIB_PCF8812 u8g(13, 11, 10, 9, 8);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, Reset = 8
80
+//U8GLIB_KS0108_128 u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 14, 15, 17, 16); 		// 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs1=14, cs2=15,di=17,rw=16
81
+//U8GLIB_LC7981_160X80 u8g(8, 9, 10, 11, 4, 5, 6, 7,  18, 14, 15, 17, 16); 	// 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
82
+//U8GLIB_LC7981_240X64 u8g(8, 9, 10, 11, 4, 5, 6, 7,  18, 14, 15, 17, 16); 	// 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
83
+//U8GLIB_LC7981_240X128 u8g(8, 9, 10, 11, 4, 5, 6, 7,  18, 14, 15, 17, 16); 	// 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
84
+//U8GLIB_ILI9325D_320x240 u8g(18,17,19,U8G_PIN_NONE,16 );  			// 8Bit Com: D0..D7: 0,1,2,3,4,5,6,7 en=wr=18, cs=17, rs=19, rd=U8G_PIN_NONE, reset = 16
85
+//U8GLIB_SBN1661_122X32 u8g(8,9,10,11,4,5,6,7,14,15, 17, U8G_PIN_NONE, 16); 	// 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 cs1=14, cs2=15,di=17,rw=16,reset = 16
86
+//U8GLIB_SSD1306_128X64 u8g(13, 11, 10, 9);	// SW SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
87
+//U8GLIB_SSD1306_128X64 u8g(10, 9);		// HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are  SCK = 13 and MOSI = 11)
88
+//U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE);	// HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are  SCK = 13 and MOSI = 11)
89
+//U8GLIB_SSD1306_128X32 u8g(13, 11, 10, 9);	// SW SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
90
+//U8GLIB_SSD1306_128X32 u8g(10, 9);             // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are  SCK = 13 and MOSI = 11)
91
+//U8GLIB_SSD1306_128X32 u8g(U8G_I2C_OPT_NONE);	// HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are  SCK = 13 and MOSI = 11)
92
+//U8GLIB_SSD1309_128X64 u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
93
+//U8GLIB_SSD1327_96X96_GR u8g(U8G_I2C_OPT_NONE);	// I2C
94
+//U8GLIB_SSD1327_96X96_2X_GR u8g(U8G_I2C_OPT_NONE);	// I2C
95
+//U8GLIB_NHD_C12864 u8g(13, 11, 10, 9, 8);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, RST = 8
96
+//U8GLIB_NHD_C12832 u8g(13, 11, 10, 9, 8);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, RST = 8
97
+//U8GLIB_T6963_240X128 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
98
+//U8GLIB_T6963_240X64 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
99
+//U8GLIB_T6963_128X64 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
100
+
101
+
102
+void draw(void) {
103
+  // graphic commands to redraw the complete screen should be placed here  
104
+  u8g.setFont(u8g_font_unifont);
105
+  u8g.setFontPosTop();
106
+  u8g.drawStr(0, 1, "Hello");
107
+  u8g.drawHLine(0, 1+14, 40);
108
+  u8g.setScale2x2();					// Scale up all draw procedures
109
+  u8g.drawStr(0, 12, "Hello");			// actual display position is (0,24)
110
+  u8g.drawHLine(0, 12+14, 40);		// All other procedures are also affected
111
+  u8g.undoScale();					// IMPORTANT: Switch back to normal mode
112
+}
113
+
114
+void setup(void) {
115
+  
116
+  // flip screen, if required
117
+  u8g.setRot180();
118
+  
119
+  // set SPI backup if required
120
+  //u8g.setHardwareBackup(u8g_backup_avr_spi);
121
+
122
+  // assign default color value
123
+  if ( u8g.getMode() == U8G_MODE_R3G3B2 ) 
124
+    u8g.setColorIndex(255);     // white
125
+  else if ( u8g.getMode() == U8G_MODE_GRAY2BIT )
126
+    u8g.setColorIndex(3);         // max intensity
127
+  else if ( u8g.getMode() == U8G_MODE_BW )
128
+    u8g.setColorIndex(1);         // pixel on
129
+}
130
+
131
+void loop(void) {
132
+  // picture loop
133
+  u8g.firstPage();  
134
+  do {
135
+    draw();
136
+  } while( u8g.nextPage() );
137
+  
138
+  // rebuild the picture after some delay
139
+  delay(500);
140
+}
141
+

+ 154
- 0
ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/U8glib/examples/TextRotX/TextRotX.pde View File

@@ -0,0 +1,154 @@
1
+/*
2
+
3
+  TextRotX.pde
4
+  
5
+  Text rotation example code.
6
+  
7
+  >>> Before compiling: Please remove comment from the constructor of the 
8
+  >>> connected graphics display (see below).
9
+  
10
+  Universal 8bit Graphics Library, http://code.google.com/p/u8glib/
11
+  
12
+  Copyright (c) 2012, olikraus@gmail.com
13
+  All rights reserved.
14
+
15
+  Redistribution and use in source and binary forms, with or without modification, 
16
+  are permitted provided that the following conditions are met:
17
+
18
+  * Redistributions of source code must retain the above copyright notice, this list 
19
+    of conditions and the following disclaimer.
20
+    
21
+  * Redistributions in binary form must reproduce the above copyright notice, this 
22
+    list of conditions and the following disclaimer in the documentation and/or other 
23
+    materials provided with the distribution.
24
+
25
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 
26
+  CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 
27
+  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
28
+  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
29
+  DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 
30
+  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
31
+  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
32
+  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
33
+  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 
34
+  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 
35
+  STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
36
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 
37
+  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
38
+  
39
+*/
40
+
41
+
42
+#include "U8glib.h"
43
+
44
+// setup u8g object, please remove comment from one of the following constructor calls
45
+// IMPORTANT NOTE: The complete list of supported devices is here: http://code.google.com/p/u8glib/wiki/device
46
+
47
+//U8GLIB_NHD27OLED_BW u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
48
+//U8GLIB_NHD27OLED_2X_BW u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
49
+//U8GLIB_NHD27OLED_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
50
+//U8GLIB_NHD27OLED_2X_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
51
+//U8GLIB_NHD31OLED_BW u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
52
+//U8GLIB_NHD31OLED_2X_BW u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
53
+//U8GLIB_NHD31OLED_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
54
+//U8GLIB_NHD31OLED_2X_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
55
+//U8GLIB_DOGS102 u8g(13, 11, 10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
56
+//U8GLIB_DOGM132 u8g(13, 11, 10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
57
+//U8GLIB_DOGM128 u8g(13, 11, 10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
58
+//U8GLIB_ST7920_128X64_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
59
+//U8GLIB_ST7920_128X64_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
60
+//U8GLIB_ST7920_128X64_1X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
61
+//U8GLIB_ST7920_128X64_4X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
62
+//U8GLIB_ST7920_192X32_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
63
+//U8GLIB_ST7920_192X32_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
64
+//U8GLIB_ST7920_192X32_1X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
65
+//U8GLIB_ST7920_192X32_4X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
66
+//U8GLIB_ST7920_192X32_1X u8g(13, 11, 10);	// SPI Com: SCK = en = 13, MOSI = rw = 11, CS = di = 10
67
+//U8GLIB_ST7920_192X32_4X u8g(10);		// SPI Com: SCK = en = 13, MOSI = rw = 11, CS = di = 10, HW SPI
68
+//U8GLIB_ST7920_202X32_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
69
+//U8GLIB_ST7920_202X32_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
70
+//U8GLIB_ST7920_202X32_1X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
71
+//U8GLIB_ST7920_202X32_4X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
72
+//U8GLIB_LM6059 u8g(13, 11, 10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
73
+//U8GLIB_LM6063 u8g(13, 11, 10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
74
+//U8GLIB_DOGXL160_BW u8g(10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
75
+//U8GLIB_DOGXL160_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
76
+//U8GLIB_DOGXL160_2X_BW u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
77
+//U8GLIB_DOGXL160_2X_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
78
+//U8GLIB_PCD8544 u8g(13, 11, 10, 9, 8);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, Reset = 8
79
+//U8GLIB_PCF8812 u8g(13, 11, 10, 9, 8);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, Reset = 8
80
+//U8GLIB_KS0108_128 u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 14, 15, 17, 16); 		// 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs1=14, cs2=15,di=17,rw=16
81
+//U8GLIB_LC7981_160X80 u8g(8, 9, 10, 11, 4, 5, 6, 7,  18, 14, 15, 17, 16); 	// 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
82
+//U8GLIB_LC7981_240X64 u8g(8, 9, 10, 11, 4, 5, 6, 7,  18, 14, 15, 17, 16); 	// 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
83
+//U8GLIB_LC7981_240X128 u8g(8, 9, 10, 11, 4, 5, 6, 7,  18, 14, 15, 17, 16); 	// 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
84
+//U8GLIB_ILI9325D_320x240 u8g(18,17,19,U8G_PIN_NONE,16 );  			// 8Bit Com: D0..D7: 0,1,2,3,4,5,6,7 en=wr=18, cs=17, rs=19, rd=U8G_PIN_NONE, reset = 16
85
+//U8GLIB_SBN1661_122X32 u8g(8,9,10,11,4,5,6,7,14,15, 17, U8G_PIN_NONE, 16); 	// 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 cs1=14, cs2=15,di=17,rw=16,reset = 16
86
+//U8GLIB_SSD1306_128X64 u8g(13, 11, 10, 9);	// SW SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
87
+//U8GLIB_SSD1306_128X64 u8g(10, 9);		// HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are  SCK = 13 and MOSI = 11)
88
+//U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE);	// HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are  SCK = 13 and MOSI = 11)
89
+//U8GLIB_SSD1306_128X32 u8g(13, 11, 10, 9);	// SW SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
90
+//U8GLIB_SSD1306_128X32 u8g(10, 9);             // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are  SCK = 13 and MOSI = 11)
91
+//U8GLIB_SSD1306_128X32 u8g(U8G_I2C_OPT_NONE);	// HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are  SCK = 13 and MOSI = 11)
92
+//U8GLIB_SSD1309_128X64 u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
93
+//U8GLIB_SSD1327_96X96_GR u8g(U8G_I2C_OPT_NONE);	// I2C
94
+//U8GLIB_SSD1327_96X96_2X_GR u8g(U8G_I2C_OPT_NONE);	// I2C
95
+//U8GLIB_NHD_C12864 u8g(13, 11, 10, 9, 8);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, RST = 8
96
+//U8GLIB_NHD_C12832 u8g(13, 11, 10, 9, 8);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, RST = 8
97
+//U8GLIB_T6963_240X128 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
98
+//U8GLIB_T6963_240X64 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
99
+//U8GLIB_T6963_128X64 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
100
+
101
+// graphic commands to redraw the complete screen should be placed here  
102
+void draw(void) {
103
+  u8g_uint_t mx, my;
104
+  
105
+  mx = u8g.getWidth();
106
+  mx >>= 1;
107
+  
108
+  my = u8g.getHeight();
109
+  my >>= 1;
110
+  
111
+  u8g.drawStr( mx, my, "Ag");
112
+  u8g.drawStr90( mx, my, "Ag");
113
+  u8g.drawStr180( mx, my, "Ag");
114
+  u8g.drawStr270( mx, my, "Ag");
115
+}
116
+
117
+void setup(void) {
118
+  u8g.setFont(u8g_font_9x18);
119
+}
120
+
121
+void change_font_pos(void) {
122
+  static  uint8_t dir = 0;
123
+  static  unsigned long next = 0;
124
+
125
+  if ( next < millis() )
126
+  {
127
+    switch(dir) {
128
+      case 0: u8g.setFontPosBottom(); break;
129
+      case 1: u8g.setFontPosBaseline(); break;
130
+      case 2: u8g.setFontPosCenter(); break;
131
+      case 3: u8g.setFontPosTop(); break;
132
+    }
133
+    
134
+    dir++;
135
+    dir &= 3;
136
+    next = millis();
137
+    next += 1000;
138
+  }
139
+}
140
+
141
+void loop(void) {
142
+  // change the font position  
143
+  change_font_pos();
144
+  
145
+  // picture loop
146
+  u8g.firstPage();  
147
+  do {
148
+    draw();
149
+  } while( u8g.nextPage() );
150
+  
151
+  // rebuild the picture after some delay
152
+  delay(100);
153
+}
154
+

+ 179
- 0
ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/U8glib/examples/U8gLogo/U8gLogo.pde View File

@@ -0,0 +1,179 @@
1
+/*
2
+
3
+  U8gLogo.pde
4
+  
5
+  Put the U8GLIB logo on the display.
6
+  
7
+  >>> Before compiling: Please remove comment from the constructor of the 
8
+  >>> connected graphics display (see below).
9
+  
10
+  Universal 8bit Graphics Library, http://code.google.com/p/u8glib/
11
+  
12
+  Copyright (c) 2012, olikraus@gmail.com
13
+  All rights reserved.
14
+
15
+  Redistribution and use in source and binary forms, with or without modification, 
16
+  are permitted provided that the following conditions are met:
17
+
18
+  * Redistributions of source code must retain the above copyright notice, this list 
19
+    of conditions and the following disclaimer.
20
+    
21
+  * Redistributions in binary form must reproduce the above copyright notice, this 
22
+    list of conditions and the following disclaimer in the documentation and/or other 
23
+    materials provided with the distribution.
24
+
25
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 
26
+  CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 
27
+  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
28
+  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
29
+  DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 
30
+  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
31
+  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
32
+  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
33
+  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 
34
+  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 
35
+  STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
36
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 
37
+  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
38
+  
39
+*/
40
+
41
+
42
+#include "U8glib.h"
43
+
44
+// setup u8g object, please remove comment from one of the following constructor calls
45
+// IMPORTANT NOTE: The complete list of supported devices is here: http://code.google.com/p/u8glib/wiki/device
46
+
47
+//U8GLIB_NHD27OLED_BW u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
48
+//U8GLIB_NHD27OLED_2X_BW u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
49
+//U8GLIB_NHD27OLED_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
50
+//U8GLIB_NHD27OLED_2X_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
51
+//U8GLIB_NHD31OLED_BW u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
52
+//U8GLIB_NHD31OLED_2X_BW u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
53
+//U8GLIB_NHD31OLED_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
54
+//U8GLIB_NHD31OLED_2X_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
55
+//U8GLIB_DOGS102 u8g(13, 11, 10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
56
+//U8GLIB_DOGM132 u8g(13, 11, 10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
57
+//U8GLIB_DOGM128 u8g(13, 11, 10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
58
+//U8GLIB_ST7920_128X64_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
59
+//U8GLIB_ST7920_128X64_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
60
+//U8GLIB_ST7920_128X64_1X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
61
+//U8GLIB_ST7920_128X64_4X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
62
+//U8GLIB_ST7920_192X32_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
63
+//U8GLIB_ST7920_192X32_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
64
+//U8GLIB_ST7920_192X32_1X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
65
+//U8GLIB_ST7920_192X32_4X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
66
+//U8GLIB_ST7920_192X32_1X u8g(13, 11, 10);	// SPI Com: SCK = en = 13, MOSI = rw = 11, CS = di = 10
67
+//U8GLIB_ST7920_192X32_4X u8g(10);		// SPI Com: SCK = en = 13, MOSI = rw = 11, CS = di = 10, HW SPI
68
+//U8GLIB_ST7920_202X32_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
69
+//U8GLIB_ST7920_202X32_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
70
+//U8GLIB_ST7920_202X32_1X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
71
+//U8GLIB_ST7920_202X32_4X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
72
+//U8GLIB_LM6059 u8g(13, 11, 10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
73
+//U8GLIB_LM6063 u8g(13, 11, 10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
74
+//U8GLIB_DOGXL160_BW u8g(10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
75
+//U8GLIB_DOGXL160_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
76
+//U8GLIB_DOGXL160_2X_BW u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
77
+//U8GLIB_DOGXL160_2X_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
78
+//U8GLIB_PCD8544 u8g(13, 11, 10, 9, 8);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, Reset = 8
79
+//U8GLIB_PCF8812 u8g(13, 11, 10, 9, 8);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, Reset = 8
80
+//U8GLIB_KS0108_128 u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 14, 15, 17, 16); 		// 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs1=14, cs2=15,di=17,rw=16
81
+//U8GLIB_LC7981_160X80 u8g(8, 9, 10, 11, 4, 5, 6, 7,  18, 14, 15, 17, 16); 	// 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
82
+//U8GLIB_LC7981_240X64 u8g(8, 9, 10, 11, 4, 5, 6, 7,  18, 14, 15, 17, 16); 	// 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
83
+//U8GLIB_LC7981_240X128 u8g(8, 9, 10, 11, 4, 5, 6, 7,  18, 14, 15, 17, 16); 	// 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
84
+//U8GLIB_ILI9325D_320x240 u8g(18,17,19,U8G_PIN_NONE,16 );  			// 8Bit Com: D0..D7: 0,1,2,3,4,5,6,7 en=wr=18, cs=17, rs=19, rd=U8G_PIN_NONE, reset = 16
85
+//U8GLIB_SBN1661_122X32 u8g(8,9,10,11,4,5,6,7,14,15, 17, U8G_PIN_NONE, 16); 	// 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 cs1=14, cs2=15,di=17,rw=16,reset = 16
86
+//U8GLIB_SSD1306_128X64 u8g(13, 11, 10, 9);	// SW SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
87
+//U8GLIB_SSD1306_128X64 u8g(10, 9);		// HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are  SCK = 13 and MOSI = 11)
88
+//U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE);	// HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are  SCK = 13 and MOSI = 11)
89
+//U8GLIB_SSD1306_128X32 u8g(13, 11, 10, 9);	// SW SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
90
+//U8GLIB_SSD1306_128X32 u8g(10, 9);             // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are  SCK = 13 and MOSI = 11)
91
+//U8GLIB_SSD1306_128X32 u8g(U8G_I2C_OPT_NONE);	// HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are  SCK = 13 and MOSI = 11)
92
+//U8GLIB_SSD1309_128X64 u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
93
+//U8GLIB_SSD1327_96X96_GR u8g(U8G_I2C_OPT_NONE);	// I2C
94
+//U8GLIB_SSD1327_96X96_2X_GR u8g(U8G_I2C_OPT_NONE);	// I2C
95
+//U8GLIB_NHD_C12864 u8g(13, 11, 10, 9, 8);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, RST = 8
96
+//U8GLIB_NHD_C12832 u8g(13, 11, 10, 9, 8);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, RST = 8
97
+//U8GLIB_T6963_240X128 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
98
+//U8GLIB_T6963_240X64 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
99
+//U8GLIB_T6963_128X64 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
100
+
101
+
102
+void drawColorBox(void)
103
+{
104
+  u8g_uint_t w,h;
105
+  u8g_uint_t r, g, b;
106
+  
107
+  w = u8g.getWidth()/32;
108
+  h = u8g.getHeight()/8;
109
+  for( b = 0; b < 4; b++ )
110
+    for( g = 0; g < 8; g++ )
111
+      for( r = 0; r < 8; r++ )
112
+      {
113
+        u8g.setColorIndex((r<<5) |  (g<<2) | b );
114
+        u8g.drawBox(g*w + b*w*8, r*h, w, h);
115
+      }
116
+}
117
+
118
+void drawLogo(uint8_t d)
119
+{
120
+  u8g.setFont(u8g_font_gdr25r);
121
+  u8g.drawStr(0+d, 30+d, "U");
122
+  u8g.setFont(u8g_font_gdr30n);
123
+  u8g.drawStr90(23+d,10+d,"8");
124
+  u8g.setFont(u8g_font_gdr25r);
125
+  u8g.drawStr(53+d,30+d,"g");
126
+  
127
+  u8g.drawHLine(2+d, 35+d, 47);
128
+  u8g.drawVLine(45+d, 32+d, 12);
129
+}
130
+
131
+void drawURL(void)
132
+{
133
+  u8g.setFont(u8g_font_4x6);
134
+  if ( u8g.getHeight() < 59 )
135
+  {
136
+    u8g.drawStr(53,9,"code.google.com");
137
+    u8g.drawStr(77,18,"/p/u8glib");
138
+  }
139
+  else
140
+  {
141
+    u8g.drawStr(1,54,"code.google.com/p/u8glib");
142
+  }
143
+}
144
+
145
+
146
+void draw(void) {
147
+  if ( u8g.getMode() == U8G_MODE_R3G3B2 ) {
148
+    drawColorBox();
149
+  }
150
+  u8g.setColorIndex(1);
151
+  if ( U8G_MODE_GET_BITS_PER_PIXEL(u8g.getMode()) > 1 ) {
152
+    drawLogo(2);
153
+    u8g.setColorIndex(2);
154
+    drawLogo(1);
155
+    u8g.setColorIndex(3);
156
+  }
157
+  drawLogo(0);
158
+  drawURL();
159
+  
160
+}
161
+
162
+void setup(void) {
163
+  // flip screen, if required
164
+  //u8g.setRot180();
165
+}
166
+
167
+void loop(void) {
168
+  
169
+  // picture loop
170
+  u8g.firstPage();  
171
+  do {
172
+    draw();
173
+  u8g.setColorIndex(1);
174
+  } while( u8g.nextPage() );
175
+  
176
+  // rebuild the picture after some delay
177
+  delay(200);  
178
+}
179
+

+ 136
- 0
ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/U8glib/examples/XBM/XBM.pde View File

@@ -0,0 +1,136 @@
1
+/*
2
+
3
+  XBM.pde
4
+  
5
+  drawXBM example code.
6
+  
7
+  >>> Before compiling: Please remove comment from the constructor of the 
8
+  >>> connected graphics display (see below).
9
+  
10
+  Universal 8bit Graphics Library, http://code.google.com/p/u8glib/
11
+  
12
+  Copyright (c) 2012, olikraus@gmail.com
13
+  All rights reserved.
14
+
15
+  Redistribution and use in source and binary forms, with or without modification, 
16
+  are permitted provided that the following conditions are met:
17
+
18
+  * Redistributions of source code must retain the above copyright notice, this list 
19
+    of conditions and the following disclaimer.
20
+    
21
+  * Redistributions in binary form must reproduce the above copyright notice, this 
22
+    list of conditions and the following disclaimer in the documentation and/or other 
23
+    materials provided with the distribution.
24
+
25
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 
26
+  CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 
27
+  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
28
+  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
29
+  DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 
30
+  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
31
+  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
32
+  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
33
+  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 
34
+  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 
35
+  STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
36
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 
37
+  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
38
+  
39
+*/
40
+
41
+
42
+#include "U8glib.h"
43
+
44
+// setup u8g object, please remove comment from one of the following constructor calls
45
+// IMPORTANT NOTE: The complete list of supported devices is here: http://code.google.com/p/u8glib/wiki/device
46
+
47
+//U8GLIB_NHD27OLED_BW u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
48
+//U8GLIB_NHD27OLED_2X_BW u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
49
+//U8GLIB_NHD27OLED_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
50
+//U8GLIB_NHD27OLED_2X_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
51
+//U8GLIB_NHD31OLED_BW u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
52
+//U8GLIB_NHD31OLED_2X_BW u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
53
+//U8GLIB_NHD31OLED_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
54
+//U8GLIB_NHD31OLED_2X_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
55
+//U8GLIB_DOGS102 u8g(13, 11, 10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
56
+//U8GLIB_DOGM132 u8g(13, 11, 10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
57
+//U8GLIB_DOGM128 u8g(13, 11, 10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
58
+//U8GLIB_ST7920_128X64_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
59
+//U8GLIB_ST7920_128X64_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
60
+//U8GLIB_ST7920_128X64_1X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
61
+//U8GLIB_ST7920_128X64_4X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
62
+//U8GLIB_ST7920_192X32_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
63
+//U8GLIB_ST7920_192X32_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
64
+//U8GLIB_ST7920_192X32_1X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
65
+//U8GLIB_ST7920_192X32_4X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
66
+//U8GLIB_ST7920_192X32_1X u8g(13, 11, 10);	// SPI Com: SCK = en = 13, MOSI = rw = 11, CS = di = 10
67
+//U8GLIB_ST7920_192X32_4X u8g(10);		// SPI Com: SCK = en = 13, MOSI = rw = 11, CS = di = 10, HW SPI
68
+//U8GLIB_ST7920_202X32_1X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
69
+//U8GLIB_ST7920_202X32_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16);   // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, di=17,rw=16
70
+//U8GLIB_ST7920_202X32_1X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
71
+//U8GLIB_ST7920_202X32_4X u8g(18, 16, 17);	// SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17
72
+//U8GLIB_LM6059 u8g(13, 11, 10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
73
+//U8GLIB_LM6063 u8g(13, 11, 10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
74
+//U8GLIB_DOGXL160_BW u8g(10, 9);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
75
+//U8GLIB_DOGXL160_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
76
+//U8GLIB_DOGXL160_2X_BW u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
77
+//U8GLIB_DOGXL160_2X_GR u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
78
+//U8GLIB_PCD8544 u8g(13, 11, 10, 9, 8);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, Reset = 8
79
+//U8GLIB_PCF8812 u8g(13, 11, 10, 9, 8);		// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, Reset = 8
80
+//U8GLIB_KS0108_128 u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 14, 15, 17, 16); 		// 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs1=14, cs2=15,di=17,rw=16
81
+//U8GLIB_LC7981_160X80 u8g(8, 9, 10, 11, 4, 5, 6, 7,  18, 14, 15, 17, 16); 	// 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
82
+//U8GLIB_LC7981_240X64 u8g(8, 9, 10, 11, 4, 5, 6, 7,  18, 14, 15, 17, 16); 	// 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
83
+//U8GLIB_LC7981_240X128 u8g(8, 9, 10, 11, 4, 5, 6, 7,  18, 14, 15, 17, 16); 	// 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs=14 ,di=15,rw=17, reset = 16
84
+//U8GLIB_ILI9325D_320x240 u8g(18,17,19,U8G_PIN_NONE,16 );  			// 8Bit Com: D0..D7: 0,1,2,3,4,5,6,7 en=wr=18, cs=17, rs=19, rd=U8G_PIN_NONE, reset = 16
85
+//U8GLIB_SBN1661_122X32 u8g(8,9,10,11,4,5,6,7,14,15, 17, U8G_PIN_NONE, 16); 	// 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 cs1=14, cs2=15,di=17,rw=16,reset = 16
86
+//U8GLIB_SSD1306_128X64 u8g(13, 11, 10, 9);	// SW SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
87
+//U8GLIB_SSD1306_128X64 u8g(10, 9);		// HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are  SCK = 13 and MOSI = 11)
88
+//U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE);	// HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are  SCK = 13 and MOSI = 11)
89
+//U8GLIB_SSD1306_128X32 u8g(13, 11, 10, 9);	// SW SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
90
+//U8GLIB_SSD1306_128X32 u8g(10, 9);             // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are  SCK = 13 and MOSI = 11)
91
+//U8GLIB_SSD1306_128X32 u8g(U8G_I2C_OPT_NONE);	// HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are  SCK = 13 and MOSI = 11)
92
+//U8GLIB_SSD1309_128X64 u8g(13, 11, 10, 9);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
93
+//U8GLIB_SSD1327_96X96_GR u8g(U8G_I2C_OPT_NONE);	// I2C
94
+//U8GLIB_SSD1327_96X96_2X_GR u8g(U8G_I2C_OPT_NONE);	// I2C
95
+//U8GLIB_NHD_C12864 u8g(13, 11, 10, 9, 8);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, RST = 8
96
+//U8GLIB_NHD_C12832 u8g(13, 11, 10, 9, 8);	// SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, RST = 8
97
+//U8GLIB_T6963_240X128 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
98
+//U8GLIB_T6963_240X64 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
99
+//U8GLIB_T6963_128X64 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
100
+
101
+#define u8g_logo_width 38
102
+#define u8g_logo_height 24
103
+//static unsigned char u8g_logo_bits[] = {
104
+static unsigned char u8g_logo_bits[] U8G_PROGMEM = {
105
+   0xff, 0xff, 0xff, 0xff, 0x3f, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xe0, 0xe0,
106
+   0xff, 0xff, 0x3f, 0xe3, 0xe1, 0xff, 0xff, 0x3f, 0xf3, 0xf1, 0xff, 0xff,
107
+   0x3f, 0xf3, 0xf1, 0xfe, 0xbf, 0x37, 0xf3, 0x11, 0x1c, 0x1f, 0x30, 0xf3,
108
+   0x01, 0x08, 0x8c, 0x20, 0xf3, 0x01, 0x00, 0xc0, 0x39, 0xf3, 0x81, 0xc7,
109
+   0xc1, 0x39, 0xf3, 0xc1, 0xc7, 0xc9, 0x38, 0xf3, 0xc1, 0xc3, 0x19, 0x3c,
110
+   0xe3, 0x89, 0x01, 0x98, 0x3f, 0xc7, 0x18, 0x00, 0x08, 0x3e, 0x0f, 0x3c,
111
+   0x70, 0x1c, 0x30, 0x3f, 0xff, 0xfc, 0x87, 0x31, 0xff, 0xff, 0xbf, 0xc7,
112
+   0x23, 0x01, 0x00, 0x00, 0xc6, 0x23, 0x03, 0x00, 0x00, 0x0e, 0x30, 0xff,
113
+   0xff, 0x3f, 0x1f, 0x3c, 0xff, 0xff, 0x3f, 0xff, 0x3f, 0xff, 0xff, 0x3f,
114
+   0xff, 0x3f, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xff, 0xff, 0xff, 0xff, 0x3f };
115
+
116
+void draw(void) {
117
+  // graphic commands to redraw the complete screen should be placed here  
118
+  u8g.drawXBMP( 0, 0, u8g_logo_width, u8g_logo_height, u8g_logo_bits);
119
+}
120
+
121
+void setup(void) {
122
+  // flip screen, if required
123
+  // u8g.setRot180();
124
+}
125
+
126
+void loop(void) {
127
+  // picture loop
128
+  u8g.firstPage();  
129
+  do {
130
+    draw();
131
+  } while( u8g.nextPage() );
132
+  
133
+  // rebuild the picture after some delay
134
+  delay(500);
135
+}
136
+

+ 80
- 0
ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/U8glib/license.txt View File

@@ -0,0 +1,80 @@
1
+
2
+The U8glib code (http://code.google.com/p/u8glib/) is licensed under the terms of 
3
+the new-bsd license (two-clause bsd license).
4
+See also: http://www.opensource.org/licenses/bsd-license.php
5
+
6
+The repository and optionally the releases contain icons, which are
7
+derived from the WPZOOM Developer Icon Set:
8
+http://www.wpzoom.com/wpzoom/new-freebie-wpzoom-developer-icon-set-154-free-icons/
9
+WPZOOM Developer Icon Set by WPZOOM is licensed under a Creative Commons 
10
+Attribution-ShareAlike 3.0 Unported License.
11
+
12
+Fonts are licensed under different conditions.
13
+See http://code.google.com/p/u8glib/wiki/fontgroup for
14
+detailed information on the licensing conditions for each font.
15
+
16
+============ X11 Fonts COUR, HELV, NCEN, TIM, SYMB ============
17
+
18
+For fonts derived from the following files, the license below applies.
19
+COURB08.BDF COURB10.BDF COURB12.BDF COURB14.BDF COURB18.BDF 
20
+COURB24.BDF COURR08.BDF COURR10.BDF COURR12.BDF COURR14.BDF 
21
+COURR18.BDF COURR24.BDF HELVB08.BDF HELVB10.BDF HELVB12.BDF HELVB14.BDF 
22
+HELVB18.BDF HELVB24.BDF HELVR08.BDF HELVR10.BDF HELVR12.BDF HELVR14.BDF 
23
+HELVR18.BDF HELVR24.BDF NCENB08.BDF NCENB10.BDF NCENB12.BDF 
24
+NCENB14.BDF NCENB18.BDF NCENB24.BDF NCENR08.BDF NCENR10.BDF 
25
+NCENR12.BDF NCENR14.BDF NCENR18.BDF NCENR24.BDF SYMB08.BDF SYMB10.BDF 
26
+SYMB12.BDF SYMB14.BDF SYMB18.BDF SYMB24.BDF TIMB08.BDF TIMB10.BDF 
27
+TIMB12.BDF TIMB14.BDF TIMB18.BDF TIMB24.BDF TIMR08.BDF TIMR10.BDF 
28
+TIMR12.BDF TIMR14.BDF TIMR18.BDF TIMR24.BDF 
29
+
30
+Copyright 1984-1989, 1994 Adobe Systems Incorporated.
31
+Copyright 1988, 1994 Digital Equipment Corporation.
32
+
33
+Adobe is a trademark of Adobe Systems Incorporated which may be
34
+registered in certain jurisdictions.
35
+Permission to use these trademarks is hereby granted only in
36
+association with the images described in this file.
37
+
38
+Permission to use, copy, modify, distribute and sell this software
39
+and its documentation for any purpose and without fee is hereby
40
+granted, provided that the above copyright notices appear in all
41
+copies and that both those copyright notices and this permission
42
+notice appear in supporting documentation, and that the names of
43
+Adobe Systems and Digital Equipment Corporation not be used in
44
+advertising or publicity pertaining to distribution of the software
45
+without specific, written prior permission.  Adobe Systems and
46
+Digital Equipment Corporation make no representations about the
47
+suitability of this software for any purpose.  It is provided "as
48
+is" without express or implied warranty.
49
+
50
+
51
+============ BSD License for U8glib Code ============
52
+
53
+Universal 8bit Graphics Library (http://code.google.com/p/u8glib/)
54
+
55
+Copyright (c) 2011, olikraus@gmail.com
56
+All rights reserved.
57
+
58
+Redistribution and use in source and binary forms, with or without modification, 
59
+are permitted provided that the following conditions are met:
60
+
61
+* Redistributions of source code must retain the above copyright notice, this list 
62
+  of conditions and the following disclaimer.
63
+  
64
+* Redistributions in binary form must reproduce the above copyright notice, this 
65
+  list of conditions and the following disclaimer in the documentation and/or other 
66
+  materials provided with the distribution.
67
+
68
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 
69
+CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 
70
+INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
71
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
72
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 
73
+CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
74
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
75
+NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
76
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 
77
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 
78
+STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
79
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 
80
+ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  

+ 2392
- 0
ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/U8glib/utility/chessengine.c
File diff suppressed because it is too large
View File


+ 1607
- 0
ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/U8glib/utility/u8g.h
File diff suppressed because it is too large
View File


+ 177
- 0
ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/U8glib/utility/u8g_bitmap.c View File

@@ -0,0 +1,177 @@
1
+/*
2
+
3
+  u8g_bitmap.c
4
+
5
+  Universal 8bit Graphics Library
6
+  
7
+  Copyright (c) 2011, olikraus@gmail.com
8
+  All rights reserved.
9
+
10
+  Redistribution and use in source and binary forms, with or without modification, 
11
+  are permitted provided that the following conditions are met:
12
+
13
+  * Redistributions of source code must retain the above copyright notice, this list 
14
+    of conditions and the following disclaimer.
15
+    
16
+  * Redistributions in binary form must reproduce the above copyright notice, this 
17
+    list of conditions and the following disclaimer in the documentation and/or other 
18
+    materials provided with the distribution.
19
+
20
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 
21
+  CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 
22
+  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
23
+  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
24
+  DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 
25
+  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
26
+  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
27
+  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
28
+  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 
29
+  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 
30
+  STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
31
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 
32
+  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
33
+  
34
+
35
+*/
36
+
37
+#include "u8g.h"
38
+
39
+void u8g_DrawHBitmap(u8g_t *u8g, u8g_uint_t x, u8g_uint_t y, u8g_uint_t cnt, const uint8_t *bitmap)
40
+{
41
+  while( cnt > 0 )
42
+  {
43
+    u8g_Draw8Pixel(u8g, x, y, 0, *bitmap);
44
+    bitmap++;
45
+    cnt--;
46
+    x+=8;
47
+  }
48
+}
49
+
50
+void u8g_DrawBitmap(u8g_t *u8g, u8g_uint_t x, u8g_uint_t y, u8g_uint_t cnt, u8g_uint_t h, const uint8_t *bitmap)
51
+{
52
+  if ( u8g_IsBBXIntersection(u8g, x, y, cnt*8, h) == 0 )
53
+    return;
54
+  while( h > 0 )
55
+  {
56
+    u8g_DrawHBitmap(u8g, x, y, cnt, bitmap);
57
+    bitmap += cnt;
58
+    y++;
59
+    h--;
60
+  }
61
+}
62
+
63
+
64
+void u8g_DrawHBitmapP(u8g_t *u8g, u8g_uint_t x, u8g_uint_t y, u8g_uint_t cnt, const u8g_pgm_uint8_t *bitmap)
65
+{
66
+  while( cnt > 0 )
67
+  {
68
+    u8g_Draw8Pixel(u8g, x, y, 0, u8g_pgm_read(bitmap));
69
+    bitmap++;
70
+    cnt--;
71
+    x+=8;
72
+  }
73
+}
74
+
75
+void u8g_DrawBitmapP(u8g_t *u8g, u8g_uint_t x, u8g_uint_t y, u8g_uint_t cnt, u8g_uint_t h, const u8g_pgm_uint8_t *bitmap)
76
+{
77
+  if ( u8g_IsBBXIntersection(u8g, x, y, cnt*8, h) == 0 )
78
+    return;
79
+  while( h > 0 )
80
+  {
81
+    u8g_DrawHBitmapP(u8g, x, y, cnt, bitmap);
82
+    bitmap += cnt;
83
+    y++;
84
+    h--;
85
+  }
86
+}
87
+
88
+/*=========================================================================*/
89
+
90
+static void u8g_DrawHXBM(u8g_t *u8g, u8g_uint_t x, u8g_uint_t y, u8g_uint_t w, const uint8_t *bitmap)
91
+{
92
+  uint8_t d;
93
+  x+=7;
94
+  while( w >= 8 )
95
+  {
96
+    u8g_Draw8Pixel(u8g, x, y, 2, *bitmap);
97
+    bitmap++;
98
+    w-= 8;
99
+    x+=8;
100
+  }
101
+  if ( w > 0 )
102
+  {
103
+    d = *bitmap;
104
+    x -= 7;
105
+    do
106
+    {
107
+      if ( d & 1 )
108
+        u8g_DrawPixel(u8g, x, y);
109
+      x++;
110
+      w--;
111
+      d >>= 1;      
112
+    } while ( w > 0 );
113
+  }
114
+}
115
+
116
+void u8g_DrawXBM(u8g_t *u8g, u8g_uint_t x, u8g_uint_t y, u8g_uint_t w, u8g_uint_t h, const uint8_t *bitmap)
117
+{
118
+  u8g_uint_t b;
119
+  b = w;
120
+  b += 7;
121
+  b >>= 3;
122
+  
123
+  if ( u8g_IsBBXIntersection(u8g, x, y, w, h) == 0 )
124
+    return;
125
+  
126
+  while( h > 0 )
127
+  {
128
+    u8g_DrawHXBM(u8g, x, y, w, bitmap);
129
+    bitmap += b;
130
+    y++;
131
+    h--;
132
+  }
133
+}
134
+
135
+static void u8g_DrawHXBMP(u8g_t *u8g, u8g_uint_t x, u8g_uint_t y, u8g_uint_t w, const u8g_pgm_uint8_t *bitmap)
136
+{
137
+  uint8_t d;
138
+  x+=7;
139
+  while( w >= 8 )
140
+  {
141
+    u8g_Draw8Pixel(u8g, x, y, 2, u8g_pgm_read(bitmap));
142
+    bitmap++;
143
+    w-= 8;
144
+    x+=8;
145
+  }
146
+  if ( w > 0 )
147
+  {
148
+    d = u8g_pgm_read(bitmap);
149
+    x -= 7;
150
+    do
151
+    {
152
+      if ( d & 1 )
153
+        u8g_DrawPixel(u8g, x, y);
154
+      x++;
155
+      w--;
156
+      d >>= 1;      
157
+    } while ( w > 0 );
158
+  }
159
+}
160
+
161
+void u8g_DrawXBMP(u8g_t *u8g, u8g_uint_t x, u8g_uint_t y, u8g_uint_t w, u8g_uint_t h, const u8g_pgm_uint8_t *bitmap)
162
+{
163
+  u8g_uint_t b;
164
+  b = w;
165
+  b += 7;
166
+  b >>= 3;
167
+  
168
+  if ( u8g_IsBBXIntersection(u8g, x, y, w, h) == 0 )
169
+    return;
170
+  while( h > 0 )
171
+  {
172
+    u8g_DrawHXBMP(u8g, x, y, w, bitmap);
173
+    bitmap += b;
174
+    y++;
175
+    h--;
176
+  }
177
+}

+ 382
- 0
ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/U8glib/utility/u8g_circle.c View File

@@ -0,0 +1,382 @@
1
+/*
2
+
3
+  u8g_circle.c
4
+
5
+  Utility to draw empty and filled circles.
6
+  
7
+  Universal 8bit Graphics Library
8
+  
9
+  Copyright (c) 2011, bjthom@gmail.com
10
+  u8g_DrawCircle & u8g_DrawDisc by olikraus@gmail.com
11
+  
12
+  All rights reserved.
13
+
14
+  Redistribution and use in source and binary forms, with or without modification, 
15
+  are permitted provided that the following conditions are met:
16
+
17
+  * Redistributions of source code must retain the above copyright notice, this list 
18
+    of conditions and the following disclaimer.
19
+    
20
+  * Redistributions in binary form must reproduce the above copyright notice, this 
21
+    list of conditions and the following disclaimer in the documentation and/or other 
22
+    materials provided with the distribution.
23
+
24
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 
25
+  CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 
26
+  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
27
+  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
28
+  DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 
29
+  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
30
+  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
31
+  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
32
+  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 
33
+  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 
34
+  STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
35
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 
36
+  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
37
+  
38
+  Addition to the U8G Library 02/25/12
39
+  
40
+  
41
+*/
42
+
43
+#include "u8g.h"
44
+
45
+#ifdef OLD_CODE
46
+
47
+void circ_upperRight(u8g_t *u8g, u8g_uint_t x, u8g_uint_t y, u8g_uint_t x0, u8g_uint_t y0) {
48
+  u8g_DrawPixel(u8g, x0 + x, y0 - y);
49
+  u8g_DrawPixel(u8g, x0 + y, y0 - x);
50
+}
51
+		
52
+void circ_upperLeft(u8g_t *u8g, u8g_uint_t x, u8g_uint_t y, u8g_uint_t x0, u8g_uint_t y0) {
53
+  u8g_DrawPixel(u8g, x0 - x, y0 - y);
54
+  u8g_DrawPixel(u8g, x0 - y, y0 - x);
55
+}
56
+		
57
+void circ_lowerRight(u8g_t *u8g, u8g_uint_t x, u8g_uint_t y, u8g_uint_t x0, u8g_uint_t y0) {
58
+  u8g_DrawPixel(u8g, x0 + x, y0 + y);
59
+  u8g_DrawPixel(u8g, x0 + y, y0 + x);
60
+}
61
+		
62
+void circ_lowerLeft(u8g_t *u8g, u8g_uint_t x, u8g_uint_t y, u8g_uint_t x0, u8g_uint_t y0) {
63
+  u8g_DrawPixel(u8g, x0 - x, y0 + y);
64
+  u8g_DrawPixel(u8g, x0 - y, y0 + x);
65
+}
66
+			
67
+void circ_all(u8g_t *u8g, u8g_uint_t x, u8g_uint_t y, u8g_uint_t x0, u8g_uint_t y0) {
68
+  circ_upperRight(u8g, x, y, x0, y0);
69
+  circ_upperLeft(u8g, x, y, x0, y0);
70
+  circ_lowerRight(u8g, x, y, x0, y0);
71
+  circ_lowerLeft(u8g, x, y, x0, y0);
72
+}
73
+
74
+void u8g_DrawEmpCirc(u8g_t *u8g, u8g_uint_t x0, u8g_uint_t y0, u8g_uint_t rad, uint8_t option)
75
+{
76
+  if ( u8g_IsBBXIntersection(u8g, x0-rad-1, y0-rad-1, 2*rad+1, 2*rad+1) == 0)
77
+    return;
78
+
79
+  int f = 1 - rad;
80
+  int ddF_x = 1;
81
+  int ddF_y = -2*rad;
82
+  uint8_t x = 0;
83
+  uint8_t y = rad;
84
+
85
+  void ( *circ_util )(u8g_t *, u8g_uint_t, u8g_uint_t, u8g_uint_t, u8g_uint_t);
86
+  
87
+  switch (option)
88
+  {
89
+	case U8G_CIRC_UPPER_RIGHT:
90
+		u8g_DrawPixel(u8g, x0, y0 - rad);
91
+		u8g_DrawPixel(u8g, x0 + rad, y0);
92
+		circ_util = circ_upperRight;
93
+		break;
94
+	case U8G_CIRC_UPPER_LEFT:
95
+		u8g_DrawPixel(u8g, x0, y0 - rad);
96
+		u8g_DrawPixel(u8g, x0 - rad, y0);
97
+		circ_util = circ_upperLeft;
98
+		break;
99
+	case U8G_CIRC_LOWER_RIGHT:
100
+		u8g_DrawPixel(u8g, x0, y0 + rad);
101
+		u8g_DrawPixel(u8g, x0 + rad, y0);
102
+		circ_util = circ_lowerRight;
103
+		break;
104
+	case U8G_CIRC_LOWER_LEFT:
105
+		u8g_DrawPixel(u8g, x0, y0 + rad);
106
+		u8g_DrawPixel(u8g, x0 - rad, y0);
107
+		circ_util = circ_lowerLeft;
108
+		break;
109
+        default:
110
+	case U8G_CIRC_ALL:
111
+		u8g_DrawPixel(u8g, x0, y0 + rad);
112
+		u8g_DrawPixel(u8g, x0, y0 - rad);
113
+		u8g_DrawPixel(u8g, x0 + rad, y0);
114
+		u8g_DrawPixel(u8g, x0 - rad, y0);
115
+		circ_util = circ_all;
116
+		break;
117
+  }
118
+  
119
+  while( x < y )
120
+  {
121
+    if(f >= 0) 
122
+    {
123
+      y--;
124
+      ddF_y += 2;
125
+      f += ddF_y;
126
+    }
127
+    x++;
128
+    ddF_x += 2;
129
+    f += ddF_x;
130
+    
131
+    circ_util(u8g, x, y, x0, y0);
132
+  }
133
+}
134
+
135
+
136
+void u8g_DrawFillCirc(u8g_t *u8g, u8g_uint_t x0, u8g_uint_t y0, u8g_uint_t rad, uint8_t option)
137
+{
138
+  if ( u8g_IsBBXIntersection(u8g, x0-rad-1, y0-rad-1, 2*rad+1, 2*rad+1) == 0)
139
+    return;
140
+
141
+  int f = 1 - rad;
142
+  int ddF_x = 1;
143
+  int ddF_y = -2*rad;
144
+  uint8_t x = 0;
145
+  uint8_t y = rad;
146
+  
147
+  // Draw vertical diameter at the horiz. center
148
+  // u8g_DrawVLine(u8g, x0, y0 - rad, 2*rad+1);
149
+
150
+  if (option == U8G_CIRC_UPPER_LEFT || option == U8G_CIRC_UPPER_RIGHT) {
151
+	u8g_DrawVLine(u8g, x0, y0 - rad, rad+1);
152
+  }
153
+  else if (option == U8G_CIRC_LOWER_LEFT || option == U8G_CIRC_LOWER_RIGHT) {
154
+	u8g_DrawVLine(u8g, x0, y0, rad+1);
155
+  }
156
+  else {
157
+	u8g_DrawVLine(u8g, x0, y0 - rad, 2*rad+1);
158
+  }
159
+  
160
+  while( x < y )
161
+  {
162
+    if(f >= 0) 
163
+    {
164
+      y--;
165
+      ddF_y += 2;
166
+      f += ddF_y;
167
+    }
168
+    x++;
169
+    ddF_x += 2;
170
+    f += ddF_x;
171
+    
172
+	//Draw vertical lines from one point to another
173
+	
174
+	switch (option)
175
+	{
176
+		case U8G_CIRC_UPPER_RIGHT:
177
+			u8g_DrawVLine(u8g, x0+x, y0-y, y+1);
178
+			u8g_DrawVLine(u8g, x0+y, y0-x, x+1);
179
+			break;
180
+		case U8G_CIRC_UPPER_LEFT:
181
+			u8g_DrawVLine(u8g, x0-x, y0-y, y+1);
182
+			u8g_DrawVLine(u8g, x0-y, y0-x, x+1);
183
+			break;
184
+		case U8G_CIRC_LOWER_RIGHT:
185
+			u8g_DrawVLine(u8g, x0+x, y0, y+1);
186
+			u8g_DrawVLine(u8g, x0+y, y0, x+1);
187
+			break;
188
+		case U8G_CIRC_LOWER_LEFT:
189
+			u8g_DrawVLine(u8g, x0-x, y0, y+1);
190
+			u8g_DrawVLine(u8g, x0-y, y0, x+1);
191
+			break;
192
+		case U8G_CIRC_ALL:
193
+			u8g_DrawVLine(u8g, x0+x, y0-y, 2*y+1);
194
+			u8g_DrawVLine(u8g, x0-x, y0-y, 2*y+1);
195
+			u8g_DrawVLine(u8g, x0+y, y0-x, 2*x+1);
196
+			u8g_DrawVLine(u8g, x0-y, y0-x, 2*x+1);
197
+			break;
198
+	}
199
+  }
200
+}
201
+
202
+#endif 
203
+
204
+/*=========================================================================*/
205
+
206
+static void u8g_draw_circle_section(u8g_t *u8g, u8g_uint_t x, u8g_uint_t y, u8g_uint_t x0, u8g_uint_t y0, uint8_t option) U8G_NOINLINE;
207
+
208
+static void u8g_draw_circle_section(u8g_t *u8g, u8g_uint_t x, u8g_uint_t y, u8g_uint_t x0, u8g_uint_t y0, uint8_t option)
209
+{
210
+    /* upper right */
211
+    if ( option & U8G_DRAW_UPPER_RIGHT )
212
+    {
213
+      u8g_DrawPixel(u8g, x0 + x, y0 - y);
214
+      u8g_DrawPixel(u8g, x0 + y, y0 - x);
215
+    }
216
+    
217
+    /* upper left */
218
+    if ( option & U8G_DRAW_UPPER_LEFT )
219
+    {
220
+      u8g_DrawPixel(u8g, x0 - x, y0 - y);
221
+      u8g_DrawPixel(u8g, x0 - y, y0 - x);
222
+    }
223
+    
224
+    /* lower right */
225
+    if ( option & U8G_DRAW_LOWER_RIGHT )
226
+    {
227
+      u8g_DrawPixel(u8g, x0 + x, y0 + y);
228
+      u8g_DrawPixel(u8g, x0 + y, y0 + x);
229
+    }
230
+    
231
+    /* lower left */
232
+    if ( option & U8G_DRAW_LOWER_LEFT )
233
+    {
234
+      u8g_DrawPixel(u8g, x0 - x, y0 + y);
235
+      u8g_DrawPixel(u8g, x0 - y, y0 + x);
236
+    }
237
+}
238
+
239
+void u8g_draw_circle(u8g_t *u8g, u8g_uint_t x0, u8g_uint_t y0, u8g_uint_t rad, uint8_t option)
240
+{
241
+    u8g_int_t f;
242
+    u8g_int_t ddF_x;
243
+    u8g_int_t ddF_y;
244
+    u8g_uint_t x;
245
+    u8g_uint_t y;
246
+
247
+    f = 1;
248
+    f -= rad;
249
+    ddF_x = 1;
250
+    ddF_y = 0;
251
+    ddF_y -= rad;
252
+    ddF_y *= 2;
253
+    x = 0;
254
+    y = rad;
255
+
256
+    u8g_draw_circle_section(u8g, x, y, x0, y0, option);
257
+    
258
+    while ( x < y )
259
+    {
260
+      if (f >= 0) 
261
+      {
262
+        y--;
263
+        ddF_y += 2;
264
+        f += ddF_y;
265
+      }
266
+      x++;
267
+      ddF_x += 2;
268
+      f += ddF_x;
269
+
270
+      u8g_draw_circle_section(u8g, x, y, x0, y0, option);    
271
+    }
272
+}
273
+
274
+void u8g_DrawCircle(u8g_t *u8g, u8g_uint_t x0, u8g_uint_t y0, u8g_uint_t rad, uint8_t option)
275
+{
276
+  /* check for bounding box */
277
+  {
278
+    u8g_uint_t radp, radp2;
279
+    
280
+    radp = rad;
281
+    radp++;
282
+    radp2 = radp;
283
+    radp2 *= 2;
284
+    
285
+    if ( u8g_IsBBXIntersection(u8g, x0-radp, y0-radp, radp2, radp2) == 0)
286
+      return;    
287
+  }
288
+  
289
+  /* draw circle */
290
+  u8g_draw_circle(u8g, x0, y0, rad, option);
291
+}
292
+
293
+static void u8g_draw_disc_section(u8g_t *u8g, u8g_uint_t x, u8g_uint_t y, u8g_uint_t x0, u8g_uint_t y0, uint8_t option) U8G_NOINLINE;
294
+
295
+static void u8g_draw_disc_section(u8g_t *u8g, u8g_uint_t x, u8g_uint_t y, u8g_uint_t x0, u8g_uint_t y0, uint8_t option)
296
+{
297
+    /* upper right */
298
+    if ( option & U8G_DRAW_UPPER_RIGHT )
299
+    {
300
+      u8g_DrawVLine(u8g, x0+x, y0-y, y+1);
301
+      u8g_DrawVLine(u8g, x0+y, y0-x, x+1);
302
+    }
303
+    
304
+    /* upper left */
305
+    if ( option & U8G_DRAW_UPPER_LEFT )
306
+    {
307
+      u8g_DrawVLine(u8g, x0-x, y0-y, y+1);
308
+      u8g_DrawVLine(u8g, x0-y, y0-x, x+1);
309
+    }
310
+    
311
+    /* lower right */
312
+    if ( option & U8G_DRAW_LOWER_RIGHT )
313
+    {
314
+      u8g_DrawVLine(u8g, x0+x, y0, y+1);
315
+      u8g_DrawVLine(u8g, x0+y, y0, x+1);
316
+    }
317
+    
318
+    /* lower left */
319
+    if ( option & U8G_DRAW_LOWER_LEFT )
320
+    {
321
+      u8g_DrawVLine(u8g, x0-x, y0, y+1);
322
+      u8g_DrawVLine(u8g, x0-y, y0, x+1);
323
+    }
324
+}
325
+
326
+void u8g_draw_disc(u8g_t *u8g, u8g_uint_t x0, u8g_uint_t y0, u8g_uint_t rad, uint8_t option)
327
+{
328
+  u8g_int_t f;
329
+  u8g_int_t ddF_x;
330
+  u8g_int_t ddF_y;
331
+  u8g_uint_t x;
332
+  u8g_uint_t y;
333
+
334
+  f = 1;
335
+  f -= rad;
336
+  ddF_x = 1;
337
+  ddF_y = 0;
338
+  ddF_y -= rad;
339
+  ddF_y *= 2;
340
+  x = 0;
341
+  y = rad;
342
+
343
+  u8g_draw_disc_section(u8g, x, y, x0, y0, option);
344
+  
345
+  while ( x < y )
346
+  {
347
+    if (f >= 0) 
348
+    {
349
+      y--;
350
+      ddF_y += 2;
351
+      f += ddF_y;
352
+    }
353
+    x++;
354
+    ddF_x += 2;
355
+    f += ddF_x;
356
+
357
+    u8g_draw_disc_section(u8g, x, y, x0, y0, option);    
358
+  }
359
+}
360
+
361
+void u8g_DrawDisc(u8g_t *u8g, u8g_uint_t x0, u8g_uint_t y0, u8g_uint_t rad, uint8_t option)
362
+{
363
+  /* check for bounding box */
364
+  {
365
+    u8g_uint_t radp, radp2;
366
+    
367
+    radp = rad;
368
+    radp++;
369
+    radp2 = radp;
370
+    radp2 *= 2;
371
+    
372
+    if ( u8g_IsBBXIntersection(u8g, x0-radp, y0-radp, radp2, radp2) == 0)
373
+      return;    
374
+  }
375
+  
376
+  /* draw disc */
377
+  u8g_draw_disc(u8g, x0, y0, rad, option);
378
+}
379
+
380
+
381
+
382
+

+ 0
- 0
ArduinoAddons/Arduino_1.6.4+/Marlin/avr/libraries/U8glib/utility/u8g_clip.c View File


Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save