My Marlin configs for Fabrikator Mini and CTC i3 Pro B
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

stepper_indirection.h 14KB

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