From ad5638f78ca0260da2854a19893fec501411fffe Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 22 May 2017 13:12:52 -0500 Subject: [PATCH] Cleanup some fastio code --- Marlin/fastio.h | 16 +++++++++------- Marlin/fastio_AT90USB-Teensy.h | 1 - 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Marlin/fastio.h b/Marlin/fastio.h index 62daa409d..430a06626 100644 --- a/Marlin/fastio.h +++ b/Marlin/fastio.h @@ -21,24 +21,24 @@ */ /** - * Contributed by Triffid_Hunter, modified by Kliment, extended by the Marlin team - * Why double up on these macros? see http://gcc.gnu.org/onlinedocs/cpp/Stringification.html + * Fast I/O Routines + * Use direct port manipulation to save scads of processor time. + * Contributed by Triffid_Hunter. Modified by Kliment and the Marlin team. */ -#ifndef _FASTIO_ARDUINO_H +#ifndef _FASTIO_ARDUINO_H #define _FASTIO_ARDUINO_H #include -/** - * Include Ports and Functions - */ - /** * Enable this option to use Teensy++ 2.0 assignments for AT90USB processors. */ //#define AT90USBxx_TEENSYPP_ASSIGNMENTS +/** + * Include Ports and Functions + */ #if defined(__AVR_ATmega168__) || defined(__AVR_ATmega328__) || defined(__AVR_ATmega328P__) #include "fastio_168.h" #elif defined(__AVR_ATmega644__) || defined(__AVR_ATmega644P__) || defined(__AVR_ATmega644PA__) || defined(__AVR_ATmega1284P__) @@ -65,6 +65,8 @@ * Magic I/O routines * * Now you can simply SET_OUTPUT(PIN); WRITE(PIN, HIGH); WRITE(PIN, LOW); + * + * Why double up on these macros? see http://gcc.gnu.org/onlinedocs/cpp/Stringification.html */ #define _READ(IO) ((bool)(DIO ## IO ## _RPORT & _BV(DIO ## IO ## _PIN))) diff --git a/Marlin/fastio_AT90USB-Teensy.h b/Marlin/fastio_AT90USB-Teensy.h index 7cafa6901..0cf94454a 100644 --- a/Marlin/fastio_AT90USB-Teensy.h +++ b/Marlin/fastio_AT90USB-Teensy.h @@ -679,5 +679,4 @@ #define PF7_PWM NULL #define PF7_DDR DDRF -#endif // AT90USBxx_TEENSYPP_ASSIGNMENTS Teensyduino assignments #endif // _FASTIO_AT90USB