From 90fa423737448feb75ee59a2afc88a8c891b19ea Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 23 Feb 2018 00:52:52 -0600 Subject: [PATCH] Preliminary cleanup of #include structure (#9763) --- Marlin/src/HAL/HAL.h | 2 +- Marlin/src/HAL/HAL_DUE/HAL_pinsDebug_Due.h | 2 +- Marlin/src/HAL/HAL_LCD_defines.h | 43 ------------------- Marlin/src/HAL/HAL_LPC1768/HAL.h | 4 +- Marlin/src/HAL/HAL_LPC1768/HAL_spi.cpp | 8 ++-- Marlin/src/HAL/HAL_LPC1768/LPC1768_PWM.cpp | 2 +- Marlin/src/HAL/HAL_LPC1768/LPC1768_PWM.h | 2 +- .../{SanityCheck_Re_ARM.h => SanityCheck.h} | 2 +- Marlin/src/HAL/HAL_LPC1768/SoftwareSPI.h | 2 +- Marlin/src/HAL/HAL_LPC1768/SoftwareSerial.cpp | 4 +- Marlin/src/HAL/HAL_LPC1768/SoftwareSerial.h | 2 +- Marlin/src/HAL/HAL_LPC1768/WInterrupts.cpp | 4 +- .../digipot_mcp4451_I2C_routines.c | 0 Marlin/src/HAL/HAL_LPC1768/fastio.h | 4 +- Marlin/src/HAL/HAL_LPC1768/include/Arduino.h | 2 +- .../HAL_LPC1768/{LPC_SPI.h => include/SPI.h} | 5 ++- .../HAL/HAL_LPC1768/{ => include}/Wire.cpp | 2 +- .../HAL_LPC1768/{ => include}/pinmapping.cpp | 4 +- .../HAL_LPC1768/{ => include}/pinmapping.h | 2 +- .../HAL/HAL_LPC1768/{ => include}/serial.h | 0 .../HAL/HAL_LPC1768/lpc1768_flag_script.py | 5 ++- Marlin/src/HAL/HAL_LPC1768/main.cpp | 2 +- .../{ => u8g}/HAL_LCD_I2C_routines.c | 0 .../{ => u8g}/HAL_LCD_I2C_routines.h | 0 .../HAL_LCD_defines.h} | 6 --- .../HAL/HAL_LPC1768/{ => u8g}/HAL_LCD_delay.h | 0 .../{ => u8g}/HAL_LCD_pin_routines.c | 4 +- .../{ => u8g}/HAL_LCD_pin_routines.h | 0 .../u8g_com_HAL_LPC1768_st7920_hw_spi.cpp | 7 ++- Marlin/src/HAL/{SPI.h => HAL_SPI.h} | 12 ++---- .../src/HAL/HAL_STM32F1/HAL_spi_Stm32f1.cpp | 2 +- .../src/HAL/HAL_STM32F7/HAL_spi_STM32F7.cpp | 4 +- Marlin/src/HAL/HAL_SanityCheck.h | 2 +- frameworks/CMSIS/LPC1768/lib/LiquidCrystal.h | 2 +- frameworks/CMSIS/LPC1768/lib/usb/cdcuser.cpp | 2 +- platformio.ini | 14 +++--- 36 files changed, 52 insertions(+), 106 deletions(-) delete mode 100644 Marlin/src/HAL/HAL_LCD_defines.h rename Marlin/src/HAL/HAL_LPC1768/{SanityCheck_Re_ARM.h => SanityCheck.h} (99%) rename Marlin/src/HAL/HAL_LPC1768/{include => }/digipot_mcp4451_I2C_routines.c (100%) rename Marlin/src/HAL/HAL_LPC1768/{LPC_SPI.h => include/SPI.h} (97%) rename Marlin/src/HAL/HAL_LPC1768/{ => include}/Wire.cpp (99%) rename Marlin/src/HAL/HAL_LPC1768/{ => include}/pinmapping.cpp (97%) rename Marlin/src/HAL/HAL_LPC1768/{ => include}/pinmapping.h (99%) rename Marlin/src/HAL/HAL_LPC1768/{ => include}/serial.h (100%) rename Marlin/src/HAL/HAL_LPC1768/{ => u8g}/HAL_LCD_I2C_routines.c (100%) rename Marlin/src/HAL/HAL_LPC1768/{ => u8g}/HAL_LCD_I2C_routines.h (100%) rename Marlin/src/HAL/HAL_LPC1768/{HAL_LPC1768_LCD_defines.h => u8g/HAL_LCD_defines.h} (88%) rename Marlin/src/HAL/HAL_LPC1768/{ => u8g}/HAL_LCD_delay.h (100%) rename Marlin/src/HAL/HAL_LPC1768/{ => u8g}/HAL_LCD_pin_routines.c (98%) rename Marlin/src/HAL/HAL_LPC1768/{ => u8g}/HAL_LCD_pin_routines.h (100%) rename Marlin/src/HAL/{SPI.h => HAL_SPI.h} (95%) diff --git a/Marlin/src/HAL/HAL.h b/Marlin/src/HAL/HAL.h index 154f33c21..ccd0d9888 100644 --- a/Marlin/src/HAL/HAL.h +++ b/Marlin/src/HAL/HAL.h @@ -29,7 +29,7 @@ #ifndef _HAL_H #define _HAL_H -#include "SPI.h" +#include "HAL_SPI.h" #define CPU_32_BIT diff --git a/Marlin/src/HAL/HAL_DUE/HAL_pinsDebug_Due.h b/Marlin/src/HAL/HAL_DUE/HAL_pinsDebug_Due.h index d128087e3..691830b87 100644 --- a/Marlin/src/HAL/HAL_DUE/HAL_pinsDebug_Due.h +++ b/Marlin/src/HAL/HAL_DUE/HAL_pinsDebug_Due.h @@ -28,7 +28,7 @@ * Translation of routines & variables used by pinsDebug.h */ -#include "Arduino.h" +#include /** * Due/Marlin quirks diff --git a/Marlin/src/HAL/HAL_LCD_defines.h b/Marlin/src/HAL/HAL_LCD_defines.h deleted file mode 100644 index 6b2a53d23..000000000 --- a/Marlin/src/HAL/HAL_LCD_defines.h +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016, 2017 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - -#ifndef HAL_LCD_DEFINES_H_ -#define HAL_LCD_DEFINES_H_ - -#ifdef ARDUINO_ARCH_SAM -// #include "HAL_DUE/HAL_DUE_LCD_defines.h" - -#elif defined(IS_32BIT_TEENSY) -// #include "HAL_TEENSY35_36/HAL_TEENSY_LCD_defines.h" - -#elif defined(ARDUINO_ARCH_AVR) -// #include "HAL_AVR/HAL_ARDUINO_LCD_defines.h" - -#elif defined(TARGET_LPC1768) - #include "HAL_LPC1768/HAL_LPC1768_LCD_defines.h" - -#else - #error "Unsupported Platform!" -#endif - -#endif // HAL_LCD_DEFINES_H_ diff --git a/Marlin/src/HAL/HAL_LPC1768/HAL.h b/Marlin/src/HAL/HAL_LPC1768/HAL.h index 87e80ae87..40f3a8e90 100644 --- a/Marlin/src/HAL/HAL_LPC1768/HAL.h +++ b/Marlin/src/HAL/HAL_LPC1768/HAL.h @@ -55,9 +55,9 @@ extern "C" volatile uint32_t _millis; #define B01 1 #define B10 2 -#include "include/Arduino.h" +#include +#include -#include "pinmapping.h" #include "fastio.h" #include "watchdog.h" #include "serial.h" diff --git a/Marlin/src/HAL/HAL_LPC1768/HAL_spi.cpp b/Marlin/src/HAL/HAL_LPC1768/HAL_spi.cpp index bdc0b2053..607c027e3 100644 --- a/Marlin/src/HAL/HAL_LPC1768/HAL_spi.cpp +++ b/Marlin/src/HAL/HAL_LPC1768/HAL_spi.cpp @@ -26,7 +26,6 @@ */ /** - * * For TARGET_LPC1768 */ @@ -47,16 +46,15 @@ * https://github.com/MarlinFirmware/Marlin/tree/071c7a78f27078fd4aee9a3ef365fcf5e143531e */ -#include "../../inc/MarlinConfig.h" - #ifdef TARGET_LPC1768 +#include "../../inc/MarlinConfig.h" + // -------------------------------------------------------------------------- // Includes // -------------------------------------------------------------------------- -#include "LPC_SPI.h" -#include "../SPI.h" +#include // -------------------------------------------------------------------------- // Public functions diff --git a/Marlin/src/HAL/HAL_LPC1768/LPC1768_PWM.cpp b/Marlin/src/HAL/HAL_LPC1768/LPC1768_PWM.cpp index 8f0c33ea8..c49d5e185 100644 --- a/Marlin/src/HAL/HAL_LPC1768/LPC1768_PWM.cpp +++ b/Marlin/src/HAL/HAL_LPC1768/LPC1768_PWM.cpp @@ -74,7 +74,7 @@ #include "../../inc/MarlinConfig.h" #include #include "LPC1768_PWM.h" -#include "Arduino.h" +#include #define NUM_ISR_PWMS 20 diff --git a/Marlin/src/HAL/HAL_LPC1768/LPC1768_PWM.h b/Marlin/src/HAL/HAL_LPC1768/LPC1768_PWM.h index 98b2be0fd..6c1a2480b 100644 --- a/Marlin/src/HAL/HAL_LPC1768/LPC1768_PWM.h +++ b/Marlin/src/HAL/HAL_LPC1768/LPC1768_PWM.h @@ -63,7 +63,7 @@ #ifndef _LPC1768_PWM_H_ #define _LPC1768_PWM_H_ -#include "pinmapping.h" +#include #include #define LPC_PWM1_MR0 19999 // base repetition rate minus one count - 20mS diff --git a/Marlin/src/HAL/HAL_LPC1768/SanityCheck_Re_ARM.h b/Marlin/src/HAL/HAL_LPC1768/SanityCheck.h similarity index 99% rename from Marlin/src/HAL/HAL_LPC1768/SanityCheck_Re_ARM.h rename to Marlin/src/HAL/HAL_LPC1768/SanityCheck.h index cce367d20..38ef2bcde 100644 --- a/Marlin/src/HAL/HAL_LPC1768/SanityCheck_Re_ARM.h +++ b/Marlin/src/HAL/HAL_LPC1768/SanityCheck.h @@ -68,4 +68,4 @@ #error "SPINDLE_LASER_PWM_PIN is used by CONTROLLERFAN_PIN." #endif #endif -#endif // SPINDLE_LASER_ENABLE \ No newline at end of file +#endif // SPINDLE_LASER_ENABLE diff --git a/Marlin/src/HAL/HAL_LPC1768/SoftwareSPI.h b/Marlin/src/HAL/HAL_LPC1768/SoftwareSPI.h index 6631c0f32..49136e2aa 100644 --- a/Marlin/src/HAL/HAL_LPC1768/SoftwareSPI.h +++ b/Marlin/src/HAL/HAL_LPC1768/SoftwareSPI.h @@ -23,7 +23,7 @@ #ifndef _SOFTWARE_SPI_H_ #define _SOFTWARE_SPI_H_ -#include "pinmapping.h" +#include // -------------------------------------------------------------------------- // Software SPI diff --git a/Marlin/src/HAL/HAL_LPC1768/SoftwareSerial.cpp b/Marlin/src/HAL/HAL_LPC1768/SoftwareSerial.cpp index 337ca4492..79867d39a 100644 --- a/Marlin/src/HAL/HAL_LPC1768/SoftwareSerial.cpp +++ b/Marlin/src/HAL/HAL_LPC1768/SoftwareSerial.cpp @@ -39,8 +39,8 @@ #include "../../inc/MarlinConfig.h" #include #include -#include "include/Arduino.h" -#include "pinmapping.h" +#include +#include #include "fastio.h" #include "SoftwareSerial.h" diff --git a/Marlin/src/HAL/HAL_LPC1768/SoftwareSerial.h b/Marlin/src/HAL/HAL_LPC1768/SoftwareSerial.h index 8c6e5ba14..93df76b53 100644 --- a/Marlin/src/HAL/HAL_LPC1768/SoftwareSerial.h +++ b/Marlin/src/HAL/HAL_LPC1768/SoftwareSerial.h @@ -33,7 +33,7 @@ #ifndef SOFTWARESERIAL_H #define SOFTWARESERIAL_H -#include "include/Arduino.h" +#include #include //#include "serial.h" #include diff --git a/Marlin/src/HAL/HAL_LPC1768/WInterrupts.cpp b/Marlin/src/HAL/HAL_LPC1768/WInterrupts.cpp index 36d3cc628..3bedb71e9 100644 --- a/Marlin/src/HAL/HAL_LPC1768/WInterrupts.cpp +++ b/Marlin/src/HAL/HAL_LPC1768/WInterrupts.cpp @@ -19,8 +19,8 @@ #ifdef TARGET_LPC1768 #include "../../inc/MarlinConfig.h" -#include "include/Arduino.h" -#include "pinmapping.h" +#include +#include //#include "HAL_timers.h" #include "fastio.h" diff --git a/Marlin/src/HAL/HAL_LPC1768/include/digipot_mcp4451_I2C_routines.c b/Marlin/src/HAL/HAL_LPC1768/digipot_mcp4451_I2C_routines.c similarity index 100% rename from Marlin/src/HAL/HAL_LPC1768/include/digipot_mcp4451_I2C_routines.c rename to Marlin/src/HAL/HAL_LPC1768/digipot_mcp4451_I2C_routines.c diff --git a/Marlin/src/HAL/HAL_LPC1768/fastio.h b/Marlin/src/HAL/HAL_LPC1768/fastio.h index 513b77601..221ecdbce 100644 --- a/Marlin/src/HAL/HAL_LPC1768/fastio.h +++ b/Marlin/src/HAL/HAL_LPC1768/fastio.h @@ -36,8 +36,8 @@ #define _FASTIO_LPC1768_H #include -#include "include/Arduino.h" -#include "pinmapping.h" +#include +#include bool useable_hardware_PWM(pin_t pin); #define USEABLE_HARDWARE_PWM(pin) useable_hardware_PWM(pin) diff --git a/Marlin/src/HAL/HAL_LPC1768/include/Arduino.h b/Marlin/src/HAL/HAL_LPC1768/include/Arduino.h index 7ce8ff1b4..645a9c79e 100644 --- a/Marlin/src/HAL/HAL_LPC1768/include/Arduino.h +++ b/Marlin/src/HAL/HAL_LPC1768/include/Arduino.h @@ -26,7 +26,7 @@ #include #include -#include "../pinmapping.h" +#include #define HIGH 0x01 #define LOW 0x00 diff --git a/Marlin/src/HAL/HAL_LPC1768/LPC_SPI.h b/Marlin/src/HAL/HAL_LPC1768/include/SPI.h similarity index 97% rename from Marlin/src/HAL/HAL_LPC1768/LPC_SPI.h rename to Marlin/src/HAL/HAL_LPC1768/include/SPI.h index 281d1ca2d..7de136633 100644 --- a/Marlin/src/HAL/HAL_LPC1768/LPC_SPI.h +++ b/Marlin/src/HAL/HAL_LPC1768/include/SPI.h @@ -21,7 +21,9 @@ */ #pragma once -#ifdef TARGET_LPC1768 + +#include "../../HAL_SPI.h" + #include #define MSBFIRST 1 @@ -42,4 +44,3 @@ class SPIClass { }; extern SPIClass SPI; -#endif diff --git a/Marlin/src/HAL/HAL_LPC1768/Wire.cpp b/Marlin/src/HAL/HAL_LPC1768/include/Wire.cpp similarity index 99% rename from Marlin/src/HAL/HAL_LPC1768/Wire.cpp rename to Marlin/src/HAL/HAL_LPC1768/include/Wire.cpp index e3b97ccdb..fa8149f53 100644 --- a/Marlin/src/HAL/HAL_LPC1768/Wire.cpp +++ b/Marlin/src/HAL/HAL_LPC1768/include/Wire.cpp @@ -28,7 +28,7 @@ extern "C" { #include } -#include "Wire.h" +#include #define USEDI2CDEV_M 1 diff --git a/Marlin/src/HAL/HAL_LPC1768/pinmapping.cpp b/Marlin/src/HAL/HAL_LPC1768/include/pinmapping.cpp similarity index 97% rename from Marlin/src/HAL/HAL_LPC1768/pinmapping.cpp rename to Marlin/src/HAL/HAL_LPC1768/include/pinmapping.cpp index c9ae9de5d..f05fa00ac 100644 --- a/Marlin/src/HAL/HAL_LPC1768/pinmapping.cpp +++ b/Marlin/src/HAL/HAL_LPC1768/include/pinmapping.cpp @@ -22,9 +22,9 @@ #ifdef TARGET_LPC1768 -#include "pinmapping.h" +#include -#include "../../gcode/parser.h" +#include "../../../gcode/parser.h" // Get the digital pin for an analog index pin_t analogInputToDigitalPin(const int8_t p) { diff --git a/Marlin/src/HAL/HAL_LPC1768/pinmapping.h b/Marlin/src/HAL/HAL_LPC1768/include/pinmapping.h similarity index 99% rename from Marlin/src/HAL/HAL_LPC1768/pinmapping.h rename to Marlin/src/HAL/HAL_LPC1768/include/pinmapping.h index b54d285ba..11fdf5cc3 100644 --- a/Marlin/src/HAL/HAL_LPC1768/pinmapping.h +++ b/Marlin/src/HAL/HAL_LPC1768/include/pinmapping.h @@ -23,7 +23,7 @@ #ifndef _PINMAPPING_H_ #define _PINMAPPING_H_ -#include "../../inc/MarlinConfigPre.h" +#include "../../../inc/MarlinConfigPre.h" #include diff --git a/Marlin/src/HAL/HAL_LPC1768/serial.h b/Marlin/src/HAL/HAL_LPC1768/include/serial.h similarity index 100% rename from Marlin/src/HAL/HAL_LPC1768/serial.h rename to Marlin/src/HAL/HAL_LPC1768/include/serial.h diff --git a/Marlin/src/HAL/HAL_LPC1768/lpc1768_flag_script.py b/Marlin/src/HAL/HAL_LPC1768/lpc1768_flag_script.py index 4f888aa9f..53e500898 100644 --- a/Marlin/src/HAL/HAL_LPC1768/lpc1768_flag_script.py +++ b/Marlin/src/HAL/HAL_LPC1768/lpc1768_flag_script.py @@ -17,9 +17,12 @@ if __name__ == "__main__": "--specs=nano.specs", "--specs=nosys.specs", - "-IMarlin/src/HAL", + # For external libraries "-IMarlin/src/HAL/HAL_LPC1768/include", + # For MarlinFirmware/U8glib-HAL + "-IMarlin/src/HAL/HAL_LPC1768/u8g", + "-MMD", "-MP", "-DTARGET_LPC1768" diff --git a/Marlin/src/HAL/HAL_LPC1768/main.cpp b/Marlin/src/HAL/HAL_LPC1768/main.cpp index 681f2b9fc..1d4dde091 100644 --- a/Marlin/src/HAL/HAL_LPC1768/main.cpp +++ b/Marlin/src/HAL/HAL_LPC1768/main.cpp @@ -30,7 +30,7 @@ extern "C" { #include "HAL_timers.h" #include #include -#include "include/Arduino.h" +#include #include "serial.h" #include "LPC1768_PWM.h" diff --git a/Marlin/src/HAL/HAL_LPC1768/HAL_LCD_I2C_routines.c b/Marlin/src/HAL/HAL_LPC1768/u8g/HAL_LCD_I2C_routines.c similarity index 100% rename from Marlin/src/HAL/HAL_LPC1768/HAL_LCD_I2C_routines.c rename to Marlin/src/HAL/HAL_LPC1768/u8g/HAL_LCD_I2C_routines.c diff --git a/Marlin/src/HAL/HAL_LPC1768/HAL_LCD_I2C_routines.h b/Marlin/src/HAL/HAL_LPC1768/u8g/HAL_LCD_I2C_routines.h similarity index 100% rename from Marlin/src/HAL/HAL_LPC1768/HAL_LCD_I2C_routines.h rename to Marlin/src/HAL/HAL_LPC1768/u8g/HAL_LCD_I2C_routines.h diff --git a/Marlin/src/HAL/HAL_LPC1768/HAL_LPC1768_LCD_defines.h b/Marlin/src/HAL/HAL_LPC1768/u8g/HAL_LCD_defines.h similarity index 88% rename from Marlin/src/HAL/HAL_LPC1768/HAL_LPC1768_LCD_defines.h rename to Marlin/src/HAL/HAL_LPC1768/u8g/HAL_LCD_defines.h index 496f8810d..fc7d3a1e4 100644 --- a/Marlin/src/HAL/HAL_LPC1768/HAL_LPC1768_LCD_defines.h +++ b/Marlin/src/HAL/HAL_LPC1768/u8g/HAL_LCD_defines.h @@ -24,12 +24,6 @@ * LPC1768 LCD-specific defines */ -// pointers to low level routines - must always supply these -//#define U8G_HAL_LINKS -#define HAL_LCD_pin_routines "HAL_LPC1768/HAL_LCD_pin_routines.h" -#define HAL_LCD_I2C_routines "HAL_LPC1768/HAL_LCD_I2C_routines.h" -#define HAL_LCD_delay "HAL_LPC1768/HAL_LCD_delay.h" - // The following are optional depending on the platform. // definitions of HAL specific com and device drivers. diff --git a/Marlin/src/HAL/HAL_LPC1768/HAL_LCD_delay.h b/Marlin/src/HAL/HAL_LPC1768/u8g/HAL_LCD_delay.h similarity index 100% rename from Marlin/src/HAL/HAL_LPC1768/HAL_LCD_delay.h rename to Marlin/src/HAL/HAL_LPC1768/u8g/HAL_LCD_delay.h diff --git a/Marlin/src/HAL/HAL_LPC1768/HAL_LCD_pin_routines.c b/Marlin/src/HAL/HAL_LPC1768/u8g/HAL_LCD_pin_routines.c similarity index 98% rename from Marlin/src/HAL/HAL_LPC1768/HAL_LCD_pin_routines.c rename to Marlin/src/HAL/HAL_LPC1768/u8g/HAL_LCD_pin_routines.c index 0a347b9dc..aa76f9434 100644 --- a/Marlin/src/HAL/HAL_LPC1768/HAL_LCD_pin_routines.c +++ b/Marlin/src/HAL/HAL_LPC1768/u8g/HAL_LCD_pin_routines.c @@ -34,8 +34,8 @@ #include #include -#include "../core/macros.h" -//#include "pinmapping.h" +#include "../../../core/macros.h" +//#include #define LPC_PORT_OFFSET (0x0020) #define LPC_PIN(pin) (1UL << pin) diff --git a/Marlin/src/HAL/HAL_LPC1768/HAL_LCD_pin_routines.h b/Marlin/src/HAL/HAL_LPC1768/u8g/HAL_LCD_pin_routines.h similarity index 100% rename from Marlin/src/HAL/HAL_LPC1768/HAL_LCD_pin_routines.h rename to Marlin/src/HAL/HAL_LPC1768/u8g/HAL_LCD_pin_routines.h diff --git a/Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_st7920_hw_spi.cpp b/Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_st7920_hw_spi.cpp index dbec34f94..508ff259b 100644 --- a/Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_st7920_hw_spi.cpp +++ b/Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_st7920_hw_spi.cpp @@ -57,10 +57,9 @@ #ifdef TARGET_LPC1768 -// #include - -// #include "src/core/macros.h" -// #include "Configuration.h" + //#include + //#include "src/core/macros.h" + //#include "Configuration.h" #include diff --git a/Marlin/src/HAL/SPI.h b/Marlin/src/HAL/HAL_SPI.h similarity index 95% rename from Marlin/src/HAL/SPI.h rename to Marlin/src/HAL/HAL_SPI.h index 0a4367e6c..c011436b7 100644 --- a/Marlin/src/HAL/SPI.h +++ b/Marlin/src/HAL/HAL_SPI.h @@ -21,12 +21,12 @@ */ /** - * HAL/SPI.h + * HAL/HAL_SPI.h * Core Marlin definitions for SPI, implemented in the HALs */ -#ifndef _SPI_H_ -#define _SPI_H_ +#ifndef _HAL_SPI_H_ +#define _HAL_SPI_H_ #include @@ -79,8 +79,4 @@ void spiSendBlock(uint8_t token, const uint8_t* buf); /** Begin SPI transaction, set clock, bit order, data mode */ void spiBeginTransaction(uint32_t spiClock, uint8_t bitOrder, uint8_t dataMode); -#ifdef TARGET_LPC1768 - #include "HAL_LPC1768/LPC_SPI.h" -#endif - -#endif // _SPI_H_ +#endif // _HAL_SPI_H_ diff --git a/Marlin/src/HAL/HAL_STM32F1/HAL_spi_Stm32f1.cpp b/Marlin/src/HAL/HAL_STM32F1/HAL_spi_Stm32f1.cpp index c38cee2e9..7406c2d78 100644 --- a/Marlin/src/HAL/HAL_STM32F1/HAL_spi_Stm32f1.cpp +++ b/Marlin/src/HAL/HAL_STM32F1/HAL_spi_Stm32f1.cpp @@ -37,7 +37,7 @@ // -------------------------------------------------------------------------- #include "../HAL.h" -#include "SPI.h" +#include "../HAL_SPI.h" #include "pins_arduino.h" #include "spi_pins.h" #include "../../core/macros.h" diff --git a/Marlin/src/HAL/HAL_STM32F7/HAL_spi_STM32F7.cpp b/Marlin/src/HAL/HAL_STM32F7/HAL_spi_STM32F7.cpp index 47fe8743e..623cfb9fa 100644 --- a/Marlin/src/HAL/HAL_STM32F7/HAL_spi_STM32F7.cpp +++ b/Marlin/src/HAL/HAL_STM32F7/HAL_spi_STM32F7.cpp @@ -37,9 +37,7 @@ // -------------------------------------------------------------------------- #include "../HAL.h" -//#include "../SPI.h" -#include "SPI.h" -//#include +#include "../HAL_SPI.h" #include "pins_arduino.h" #include "spi_pins.h" #include "../../core/macros.h" diff --git a/Marlin/src/HAL/HAL_SanityCheck.h b/Marlin/src/HAL/HAL_SanityCheck.h index e6859a780..7f5400d42 100644 --- a/Marlin/src/HAL/HAL_SanityCheck.h +++ b/Marlin/src/HAL/HAL_SanityCheck.h @@ -32,7 +32,7 @@ #include "HAL_TEENSY35_36/SanityCheck_Teensy_35_36.h" #elif defined(TARGET_LPC1768) - #include "HAL_LPC1768/SanityCheck_Re_ARM.h" + #include "HAL_LPC1768/SanityCheck.h" #elif defined(__STM32F1__) #include "HAL_STM32F1/SanityCheck_Stm32f1.h" diff --git a/frameworks/CMSIS/LPC1768/lib/LiquidCrystal.h b/frameworks/CMSIS/LPC1768/lib/LiquidCrystal.h index 2373eeee3..bdf521cfc 100644 --- a/frameworks/CMSIS/LPC1768/lib/LiquidCrystal.h +++ b/frameworks/CMSIS/LPC1768/lib/LiquidCrystal.h @@ -4,7 +4,7 @@ #include #include "binary.h" #include "Print.h" -#include +#include // commands #define LCD_CLEARDISPLAY 0x01 diff --git a/frameworks/CMSIS/LPC1768/lib/usb/cdcuser.cpp b/frameworks/CMSIS/LPC1768/lib/usb/cdcuser.cpp index 015ca7dfb..a5b96c6f0 100644 --- a/frameworks/CMSIS/LPC1768/lib/usb/cdcuser.cpp +++ b/frameworks/CMSIS/LPC1768/lib/usb/cdcuser.cpp @@ -28,7 +28,7 @@ extern "C" { #include "cdc.h" #include "cdcuser.h" -#include +#include unsigned char BulkBufIn[USB_CDC_BUFSIZE]; // Buffer to store USB IN packet unsigned char BulkBufOut[USB_CDC_BUFSIZE]; // Buffer to store USB OUT packet diff --git a/platformio.ini b/platformio.ini index b493907b4..0f352ee7b 100644 --- a/platformio.ini +++ b/platformio.ini @@ -24,14 +24,14 @@ env_default = megaatmega2560 [common] lib_deps = - U8glib-HAL + https://github.com/MarlinFirmware/U8glib-HAL/archive/dev.zip LiquidCrystal_I2C@1.1.2 TMC2130Stepper - https://github.com/teemuatlut/TMC2208Stepper.git + https://github.com/teemuatlut/TMC2208Stepper/archive/v0.0.3.zip Adafruit NeoPixel@1.1.3 - https://github.com/lincomatic/LiquidTWI2.git - https://github.com/trinamic/TMC26XStepper.git - https://github.com/ameyer/Arduino-L6470.git + https://github.com/lincomatic/LiquidTWI2/archive/master.zip + https://github.com/trinamic/TMC26XStepper/archive/master.zip + https://github.com/ameyer/Arduino-L6470/archive/master.zip default_src_filter = + - @@ -125,7 +125,7 @@ build_unflags = -Wall lib_ldf_mode = off lib_extra_dirs = frameworks lib_deps = CMSIS-LPC1768 - U8glib-HAL + https://github.com/MarlinFirmware/U8glib-HAL/archive/dev.zip TMC2130Stepper@>=2.1.1 extra_scripts = Marlin/src/HAL/HAL_LPC1768/lpc1768_flag_script.py src_filter = ${common.default_src_filter} @@ -145,7 +145,7 @@ build_flags = !python Marlin/src/HAL/HAL_LPC1768/lpc1768_flag_script.py lib_ldf_mode = off lib_extra_dirs = frameworks lib_deps = CMSIS-LPC1768 - U8glib-HAL + https://github.com/MarlinFirmware/U8glib-HAL/archive/dev.zip src_filter = ${common.default_src_filter} extra_scripts = Marlin/src/HAL/HAL_LPC1768/debug_extra_script.py, Marlin/src/HAL/HAL_LPC1768/lpc1768_flag_script.py debug_tool = custom