Preliminary cleanup of #include structure (#9763)
This commit is contained in:
parent
a6b7e721cf
commit
90fa423737
36 changed files with 52 additions and 106 deletions
|
@ -29,7 +29,7 @@
|
|||
#ifndef _HAL_H
|
||||
#define _HAL_H
|
||||
|
||||
#include "SPI.h"
|
||||
#include "HAL_SPI.h"
|
||||
|
||||
#define CPU_32_BIT
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
* Translation of routines & variables used by pinsDebug.h
|
||||
*/
|
||||
|
||||
#include "Arduino.h"
|
||||
#include <Arduino.h>
|
||||
|
||||
/**
|
||||
* Due/Marlin quirks
|
||||
|
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#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_
|
|
@ -55,9 +55,9 @@ extern "C" volatile uint32_t _millis;
|
|||
#define B01 1
|
||||
#define B10 2
|
||||
|
||||
#include "include/Arduino.h"
|
||||
#include <Arduino.h>
|
||||
#include <pinmapping.h>
|
||||
|
||||
#include "pinmapping.h"
|
||||
#include "fastio.h"
|
||||
#include "watchdog.h"
|
||||
#include "serial.h"
|
||||
|
|
|
@ -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 <SPI.h>
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// Public functions
|
||||
|
|
|
@ -74,7 +74,7 @@
|
|||
#include "../../inc/MarlinConfig.h"
|
||||
#include <lpc17xx_pinsel.h>
|
||||
#include "LPC1768_PWM.h"
|
||||
#include "Arduino.h"
|
||||
#include <Arduino.h>
|
||||
|
||||
#define NUM_ISR_PWMS 20
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
#ifndef _LPC1768_PWM_H_
|
||||
#define _LPC1768_PWM_H_
|
||||
|
||||
#include "pinmapping.h"
|
||||
#include <pinmapping.h>
|
||||
#include <lpc17xx_clkpwr.h>
|
||||
|
||||
#define LPC_PWM1_MR0 19999 // base repetition rate minus one count - 20mS
|
||||
|
|
|
@ -68,4 +68,4 @@
|
|||
#error "SPINDLE_LASER_PWM_PIN is used by CONTROLLERFAN_PIN."
|
||||
#endif
|
||||
#endif
|
||||
#endif // SPINDLE_LASER_ENABLE
|
||||
#endif // SPINDLE_LASER_ENABLE
|
|
@ -23,7 +23,7 @@
|
|||
#ifndef _SOFTWARE_SPI_H_
|
||||
#define _SOFTWARE_SPI_H_
|
||||
|
||||
#include "pinmapping.h"
|
||||
#include <pinmapping.h>
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// Software SPI
|
||||
|
|
|
@ -39,8 +39,8 @@
|
|||
#include "../../inc/MarlinConfig.h"
|
||||
#include <stdint.h>
|
||||
#include <stdarg.h>
|
||||
#include "include/Arduino.h"
|
||||
#include "pinmapping.h"
|
||||
#include <Arduino.h>
|
||||
#include <pinmapping.h>
|
||||
#include "fastio.h"
|
||||
#include "SoftwareSerial.h"
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
#ifndef SOFTWARESERIAL_H
|
||||
#define SOFTWARESERIAL_H
|
||||
|
||||
#include "include/Arduino.h"
|
||||
#include <Arduino.h>
|
||||
#include <stdint.h>
|
||||
//#include "serial.h"
|
||||
#include <Stream.h>
|
||||
|
|
|
@ -19,8 +19,8 @@
|
|||
#ifdef TARGET_LPC1768
|
||||
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
#include "include/Arduino.h"
|
||||
#include "pinmapping.h"
|
||||
#include <Arduino.h>
|
||||
#include <pinmapping.h>
|
||||
//#include "HAL_timers.h"
|
||||
#include "fastio.h"
|
||||
|
||||
|
|
|
@ -36,8 +36,8 @@
|
|||
#define _FASTIO_LPC1768_H
|
||||
|
||||
#include <LPC17xx.h>
|
||||
#include "include/Arduino.h"
|
||||
#include "pinmapping.h"
|
||||
#include <Arduino.h>
|
||||
#include <pinmapping.h>
|
||||
|
||||
bool useable_hardware_PWM(pin_t pin);
|
||||
#define USEABLE_HARDWARE_PWM(pin) useable_hardware_PWM(pin)
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#include <stdint.h>
|
||||
#include <math.h>
|
||||
|
||||
#include "../pinmapping.h"
|
||||
#include <pinmapping.h>
|
||||
|
||||
#define HIGH 0x01
|
||||
#define LOW 0x00
|
||||
|
|
|
@ -21,7 +21,9 @@
|
|||
*/
|
||||
|
||||
#pragma once
|
||||
#ifdef TARGET_LPC1768
|
||||
|
||||
#include "../../HAL_SPI.h"
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#define MSBFIRST 1
|
||||
|
@ -42,4 +44,3 @@ class SPIClass {
|
|||
};
|
||||
|
||||
extern SPIClass SPI;
|
||||
#endif
|
|
@ -28,7 +28,7 @@ extern "C" {
|
|||
#include <lpc17xx_libcfg_default.h>
|
||||
}
|
||||
|
||||
#include "Wire.h"
|
||||
#include <Wire.h>
|
||||
|
||||
#define USEDI2CDEV_M 1
|
||||
|
|
@ -22,9 +22,9 @@
|
|||
|
||||
#ifdef TARGET_LPC1768
|
||||
|
||||
#include "pinmapping.h"
|
||||
#include <pinmapping.h>
|
||||
|
||||
#include "../../gcode/parser.h"
|
||||
#include "../../../gcode/parser.h"
|
||||
|
||||
// Get the digital pin for an analog index
|
||||
pin_t analogInputToDigitalPin(const int8_t p) {
|
|
@ -23,7 +23,7 @@
|
|||
#ifndef _PINMAPPING_H_
|
||||
#define _PINMAPPING_H_
|
||||
|
||||
#include "../../inc/MarlinConfigPre.h"
|
||||
#include "../../../inc/MarlinConfigPre.h"
|
||||
|
||||
#include <stdint.h>
|
||||
|
|
@ -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"
|
||||
|
|
|
@ -30,7 +30,7 @@ extern "C" {
|
|||
#include "HAL_timers.h"
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include "include/Arduino.h"
|
||||
#include <Arduino.h>
|
||||
#include "serial.h"
|
||||
#include "LPC1768_PWM.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.
|
|
@ -34,8 +34,8 @@
|
|||
|
||||
#include <LPC17xx.h>
|
||||
#include <lpc17xx_pinsel.h>
|
||||
#include "../core/macros.h"
|
||||
//#include "pinmapping.h"
|
||||
#include "../../../core/macros.h"
|
||||
//#include <pinmapping.h>
|
||||
|
||||
#define LPC_PORT_OFFSET (0x0020)
|
||||
#define LPC_PIN(pin) (1UL << pin)
|
|
@ -57,10 +57,9 @@
|
|||
|
||||
#ifdef TARGET_LPC1768
|
||||
|
||||
// #include <inttypes.h>
|
||||
|
||||
// #include "src/core/macros.h"
|
||||
// #include "Configuration.h"
|
||||
//#include <inttypes.h>
|
||||
//#include "src/core/macros.h"
|
||||
//#include "Configuration.h"
|
||||
|
||||
#include <U8glib.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 <stdint.h>
|
||||
|
||||
|
@ -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_
|
|
@ -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"
|
||||
|
|
|
@ -37,9 +37,7 @@
|
|||
// --------------------------------------------------------------------------
|
||||
|
||||
#include "../HAL.h"
|
||||
//#include "../SPI.h"
|
||||
#include "SPI.h"
|
||||
//#include <SPI.h>
|
||||
#include "../HAL_SPI.h"
|
||||
#include "pins_arduino.h"
|
||||
#include "spi_pins.h"
|
||||
#include "../../core/macros.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"
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include <inttypes.h>
|
||||
#include "binary.h"
|
||||
#include "Print.h"
|
||||
#include <HAL_LPC1768/pinmapping.h>
|
||||
#include <pinmapping.h>
|
||||
|
||||
// commands
|
||||
#define LCD_CLEARDISPLAY 0x01
|
||||
|
|
|
@ -28,7 +28,7 @@ extern "C" {
|
|||
#include "cdc.h"
|
||||
#include "cdcuser.h"
|
||||
|
||||
#include <HAL_LPC1768/serial.h>
|
||||
#include <serial.h>
|
||||
|
||||
unsigned char BulkBufIn[USB_CDC_BUFSIZE]; // Buffer to store USB IN packet
|
||||
unsigned char BulkBufOut[USB_CDC_BUFSIZE]; // Buffer to store USB OUT packet
|
||||
|
|
|
@ -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 = +<src/*> -<src/config>
|
||||
|
||||
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue