|
@@ -21,24 +21,24 @@
|
21
|
21
|
*/
|
22
|
22
|
|
23
|
23
|
/**
|
24
|
|
- * Contributed by Triffid_Hunter, modified by Kliment, extended by the Marlin team
|
25
|
|
- * Why double up on these macros? see http://gcc.gnu.org/onlinedocs/cpp/Stringification.html
|
|
24
|
+ * Fast I/O Routines
|
|
25
|
+ * Use direct port manipulation to save scads of processor time.
|
|
26
|
+ * Contributed by Triffid_Hunter. Modified by Kliment and the Marlin team.
|
26
|
27
|
*/
|
27
|
28
|
|
28
|
|
-#ifndef _FASTIO_ARDUINO_H
|
|
29
|
+#ifndef _FASTIO_ARDUINO_H
|
29
|
30
|
#define _FASTIO_ARDUINO_H
|
30
|
31
|
|
31
|
32
|
#include <avr/io.h>
|
32
|
33
|
|
33
|
34
|
/**
|
34
|
|
- * Include Ports and Functions
|
35
|
|
- */
|
36
|
|
-
|
37
|
|
-/**
|
38
|
35
|
* Enable this option to use Teensy++ 2.0 assignments for AT90USB processors.
|
39
|
36
|
*/
|
40
|
37
|
//#define AT90USBxx_TEENSYPP_ASSIGNMENTS
|
41
|
38
|
|
|
39
|
+/**
|
|
40
|
+ * Include Ports and Functions
|
|
41
|
+ */
|
42
|
42
|
#if defined(__AVR_ATmega168__) || defined(__AVR_ATmega328__) || defined(__AVR_ATmega328P__)
|
43
|
43
|
#include "fastio_168.h"
|
44
|
44
|
#elif defined(__AVR_ATmega644__) || defined(__AVR_ATmega644P__) || defined(__AVR_ATmega644PA__) || defined(__AVR_ATmega1284P__)
|
|
@@ -65,6 +65,8 @@
|
65
|
65
|
* Magic I/O routines
|
66
|
66
|
*
|
67
|
67
|
* Now you can simply SET_OUTPUT(PIN); WRITE(PIN, HIGH); WRITE(PIN, LOW);
|
|
68
|
+ *
|
|
69
|
+ * Why double up on these macros? see http://gcc.gnu.org/onlinedocs/cpp/Stringification.html
|
68
|
70
|
*/
|
69
|
71
|
|
70
|
72
|
#define _READ(IO) ((bool)(DIO ## IO ## _RPORT & _BV(DIO ## IO ## _PIN)))
|