Browse Source

Cleanup some fastio code

Scott Lahteine 7 years ago
parent
commit
ad5638f78c
2 changed files with 9 additions and 8 deletions
  1. 9
    7
      Marlin/fastio.h
  2. 0
    1
      Marlin/fastio_AT90USB-Teensy.h

+ 9
- 7
Marlin/fastio.h View File

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
 #define _FASTIO_ARDUINO_H
30
 #define _FASTIO_ARDUINO_H
30
 
31
 
31
 #include <avr/io.h>
32
 #include <avr/io.h>
32
 
33
 
33
 /**
34
 /**
34
- * Include Ports and Functions
35
- */
36
-
37
-/**
38
  * Enable this option to use Teensy++ 2.0 assignments for AT90USB processors.
35
  * Enable this option to use Teensy++ 2.0 assignments for AT90USB processors.
39
  */
36
  */
40
 //#define AT90USBxx_TEENSYPP_ASSIGNMENTS
37
 //#define AT90USBxx_TEENSYPP_ASSIGNMENTS
41
 
38
 
39
+/**
40
+ * Include Ports and Functions
41
+ */
42
 #if defined(__AVR_ATmega168__) || defined(__AVR_ATmega328__) || defined(__AVR_ATmega328P__)
42
 #if defined(__AVR_ATmega168__) || defined(__AVR_ATmega328__) || defined(__AVR_ATmega328P__)
43
   #include "fastio_168.h"
43
   #include "fastio_168.h"
44
 #elif defined(__AVR_ATmega644__) || defined(__AVR_ATmega644P__) || defined(__AVR_ATmega644PA__) || defined(__AVR_ATmega1284P__)
44
 #elif defined(__AVR_ATmega644__) || defined(__AVR_ATmega644P__) || defined(__AVR_ATmega644PA__) || defined(__AVR_ATmega1284P__)
65
  * Magic I/O routines
65
  * Magic I/O routines
66
  *
66
  *
67
  * Now you can simply SET_OUTPUT(PIN); WRITE(PIN, HIGH); WRITE(PIN, LOW);
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
 #define _READ(IO) ((bool)(DIO ## IO ## _RPORT & _BV(DIO ## IO ## _PIN)))
72
 #define _READ(IO) ((bool)(DIO ## IO ## _RPORT & _BV(DIO ## IO ## _PIN)))

+ 0
- 1
Marlin/fastio_AT90USB-Teensy.h View File

679
 #define PF7_PWM     NULL
679
 #define PF7_PWM     NULL
680
 #define PF7_DDR     DDRF
680
 #define PF7_DDR     DDRF
681
 
681
 
682
-#endif // AT90USBxx_TEENSYPP_ASSIGNMENTS Teensyduino assignments
683
 #endif // _FASTIO_AT90USB
682
 #endif // _FASTIO_AT90USB

Loading…
Cancel
Save