Przeglądaj źródła

Cleanup some fastio code

Scott Lahteine 7 lat temu
rodzic
commit
ad5638f78c
2 zmienionych plików z 9 dodań i 8 usunięć
  1. 9
    7
      Marlin/fastio.h
  2. 0
    1
      Marlin/fastio_AT90USB-Teensy.h

+ 9
- 7
Marlin/fastio.h Wyświetl plik

@@ -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)))

+ 0
- 1
Marlin/fastio_AT90USB-Teensy.h Wyświetl plik

@@ -679,5 +679,4 @@
679 679
 #define PF7_PWM     NULL
680 680
 #define PF7_DDR     DDRF
681 681
 
682
-#endif // AT90USBxx_TEENSYPP_ASSIGNMENTS Teensyduino assignments
683 682
 #endif // _FASTIO_AT90USB

Ładowanie…
Anuluj
Zapisz