committed by
Scott Lahteine
51 changed files with 152 additions and 285 deletions
@ -1,59 +0,0 @@ |
|||||
/* **************************************************************************
|
|
||||
|
|
||||
Marlin 3D Printer Firmware |
|
||||
Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
|
||||
Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com |
|
||||
|
|
||||
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/>.
|
|
||||
****************************************************************************/ |
|
||||
|
|
||||
/**
|
|
||||
* Description: HAL wrapper |
|
||||
* |
|
||||
* Supports platforms : |
|
||||
* ARDUINO_ARCH_SAM : For Arduino Due and other boards based on Atmel SAM3X8E |
|
||||
* __AVR__ : For all Atmel AVR boards |
|
||||
*/ |
|
||||
|
|
||||
#ifndef _HAL_H |
|
||||
#define _HAL_H |
|
||||
|
|
||||
#include "HAL_SPI.h" |
|
||||
|
|
||||
#define CPU_32_BIT |
|
||||
|
|
||||
#ifdef __AVR__ |
|
||||
#undef CPU_32_BIT |
|
||||
#include "HAL_AVR/HAL_AVR.h" |
|
||||
#elif defined(ARDUINO_ARCH_SAM) |
|
||||
#include "HAL_DUE/HAL_Due.h" |
|
||||
#include "math_32bit.h" |
|
||||
#elif defined(__MK64FX512__) || defined(__MK66FX1M0__) |
|
||||
#include "HAL_TEENSY35_36/HAL_Teensy.h" |
|
||||
#include "math_32bit.h" |
|
||||
#elif defined(TARGET_LPC1768) |
|
||||
#include "math_32bit.h" |
|
||||
#include "HAL_LPC1768/HAL.h" |
|
||||
#elif defined(__STM32F1__) || defined(TARGET_STM32F1) |
|
||||
#include "math_32bit.h" |
|
||||
#include "HAL_STM32F1/HAL_Stm32f1.h" |
|
||||
#elif defined(STM32F7) |
|
||||
#define CPU_32_BIT |
|
||||
#include "math_32bit.h" |
|
||||
#include "HAL_STM32F7/HAL_STM32F7.h" |
|
||||
#else |
|
||||
#error "Unsupported Platform!" |
|
||||
#endif |
|
||||
|
|
||||
#endif // _HAL_H
|
|
@ -0,0 +1 @@ |
|||||
|
#error Debug pins is not supported on this Platform! |
@ -0,0 +1 @@ |
|||||
|
#error Debug pins is not supported on this Platform! |
@ -1,47 +0,0 @@ |
|||||
/**
|
|
||||
* Marlin 3D Printer Firmware |
|
||||
* Copyright (C) 2016 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_SANITYCHECK_H |
|
||||
|
|
||||
#ifdef __AVR__ |
|
||||
#include "HAL_AVR/SanityCheck_AVR_8_bit.h" |
|
||||
|
|
||||
#elif defined(ARDUINO_ARCH_SAM) |
|
||||
#include "HAL_DUE/SanityCheck_Due.h" |
|
||||
|
|
||||
#elif IS_32BIT_TEENSY |
|
||||
#include "HAL_TEENSY35_36/SanityCheck_Teensy_35_36.h" |
|
||||
|
|
||||
#elif defined(TARGET_LPC1768) |
|
||||
#include "HAL_LPC1768/SanityCheck.h" |
|
||||
|
|
||||
#elif defined(__STM32F1__) |
|
||||
#include "HAL_STM32F1/SanityCheck_Stm32f1.h" |
|
||||
|
|
||||
#elif defined(STM32F7) |
|
||||
#include "HAL_STM32F7/SanityCheck_STM32F7.h" |
|
||||
|
|
||||
#else |
|
||||
#error Unsupported Platform! |
|
||||
#endif |
|
||||
|
|
||||
#endif |
|
@ -1,63 +0,0 @@ |
|||||
/**
|
|
||||
* Marlin 3D Printer Firmware |
|
||||
* Copyright (C) 2016 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_ENDSTOP_INTERRUPTS_H_ |
|
||||
#define HAL_ENDSTOP_INTERRUPTS_H_ |
|
||||
|
|
||||
volatile uint8_t e_hit = 0; // Different from 0 when the endstops should be tested in detail.
|
|
||||
// Must be reset to 0 by the test function when finished.
|
|
||||
|
|
||||
// This is what is really done inside the interrupts.
|
|
||||
FORCE_INLINE void endstop_ISR_worker( void ) { |
|
||||
e_hit = 2; // Because the detection of a e-stop hit has a 1 step debouncer it has to be called at least twice.
|
|
||||
} |
|
||||
|
|
||||
// One ISR for all EXT-Interrupts
|
|
||||
void endstop_ISR(void) { endstop_ISR_worker(); } |
|
||||
|
|
||||
#ifdef __AVR__ |
|
||||
|
|
||||
#include "HAL_AVR/endstop_interrupts.h" |
|
||||
|
|
||||
#elif defined(ARDUINO_ARCH_SAM) |
|
||||
|
|
||||
#include "HAL_DUE/endstop_interrupts.h" |
|
||||
|
|
||||
#elif IS_32BIT_TEENSY |
|
||||
|
|
||||
#include "HAL_TEENSY35_36/endstop_interrupts.h" |
|
||||
|
|
||||
#elif defined(__STM32F1__) |
|
||||
|
|
||||
#include "HAL_STM32F1/endstop_interrupts.h" |
|
||||
|
|
||||
#elif defined(STM32F7) |
|
||||
|
|
||||
#include "HAL_STM32F7/endstop_interrupts.h" |
|
||||
|
|
||||
#else |
|
||||
|
|
||||
#error Unsupported Platform! |
|
||||
|
|
||||
#endif |
|
||||
|
|
||||
#endif /* HAL_ENDSTOP_INTERRUPTS_H_ */ |
|
@ -1,38 +0,0 @@ |
|||||
/**
|
|
||||
* Marlin 3D Printer Firmware |
|
||||
* Copyright (C) 2016 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_PINSDEBUG_H |
|
||||
#define HAL_PINSDEBUG_H |
|
||||
|
|
||||
#ifdef __AVR__ |
|
||||
#include "HAL_AVR/pinsDebug_AVR_8_bit.h" |
|
||||
#elif defined(ARDUINO_ARCH_SAM) |
|
||||
#include "HAL_DUE/HAL_pinsDebug_Due.h" |
|
||||
#elif IS_32BIT_TEENSY |
|
||||
#include "HAL_TEENSY35_36/HAL_pinsDebug_Teensy.h" |
|
||||
#elif defined(TARGET_LPC1768) |
|
||||
#include "HAL_LPC1768/pinsDebug_LPC1768.h" |
|
||||
#else |
|
||||
#error Unsupported Platform! |
|
||||
#endif |
|
||||
|
|
||||
#endif // HAL_PINSDEBUG_H
|
|
@ -1,48 +0,0 @@ |
|||||
/**
|
|
||||
* Marlin 3D Printer Firmware |
|
||||
* Copyright (C) 2016 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_SPI_PINS_H_ |
|
||||
#define HAL_SPI_PINS_H_ |
|
||||
|
|
||||
#ifdef ARDUINO_ARCH_SAM |
|
||||
#include "HAL_DUE/spi_pins.h" |
|
||||
|
|
||||
#elif defined(IS_32BIT_TEENSY) |
|
||||
#include "HAL_TEENSY35_36/spi_pins.h" |
|
||||
|
|
||||
#elif defined(__AVR__) |
|
||||
#include "HAL_AVR/spi_pins.h" |
|
||||
|
|
||||
#elif defined(TARGET_LPC1768) |
|
||||
#include "HAL_LPC1768/spi_pins.h" |
|
||||
|
|
||||
#elif defined(__STM32F1__) |
|
||||
#include "HAL_STM32F1/spi_pins.h" |
|
||||
|
|
||||
#elif defined(STM32F7) |
|
||||
#include "HAL_STM32F7/spi_pins.h" |
|
||||
|
|
||||
#else |
|
||||
#error "Unsupported Platform!" |
|
||||
#endif |
|
||||
|
|
||||
#endif // HAL_SPI_PINS_H_
|
|
@ -0,0 +1,28 @@ |
|||||
|
#ifndef _HAL_PLATFORMS_H_ |
||||
|
#define _HAL_PLATFORMS_H_ |
||||
|
|
||||
|
#ifndef HAL_PLATFORM |
||||
|
|
||||
|
#ifdef __AVR__ |
||||
|
#define HAL_PLATFORM HAL_AVR |
||||
|
#elif defined(ARDUINO_ARCH_SAM) |
||||
|
#define HAL_PLATFORM HAL_DUE |
||||
|
#elif defined(__MK64FX512__) || defined(__MK66FX1M0__) |
||||
|
#define HAL_PLATFORM HAL_TEENSY35_36 |
||||
|
#elif defined(TARGET_LPC1768) |
||||
|
#define HAL_PLATFORM HAL_LPC1768 |
||||
|
#elif defined(__STM32F1__) || defined(TARGET_STM32F1) |
||||
|
#define HAL_PLATFORM HAL_STM32F1 |
||||
|
#elif defined(STM32F7) |
||||
|
#define HAL_PLATFORM HAL_STM32F7 |
||||
|
#else |
||||
|
#error "Unsupported Platform!" |
||||
|
#endif |
||||
|
|
||||
|
#endif // HAL_PLATFORM
|
||||
|
|
||||
|
#define XSTR_(M) #M |
||||
|
#define XSTR(M) XSTR_(M) |
||||
|
#define HAL_PATH(PATH, NAME) XSTR(PATH/HAL_PLATFORM/NAME) |
||||
|
|
||||
|
#endif // _HAL_PLATFORMS_H_
|
Loading…
Reference in new issue