Use a macro for HAL header redirection (#10380)

This commit is contained in:
Chris Pepper
2018-04-13 02:25:08 +01:00
committed by Scott Lahteine
parent 12785583d0
commit cc6d41e1d3
51 changed files with 152 additions and 285 deletions

View File

@ -28,6 +28,8 @@
#ifndef _HAL_LPC1768_H_
#define _HAL_LPC1768_H_
#define CPU_32_BIT
// --------------------------------------------------------------------------
// Includes
// --------------------------------------------------------------------------
@ -58,6 +60,8 @@ extern "C" volatile uint32_t _millis;
#include <Arduino.h>
#include <pinmapping.h>
#include "../math_32bit.h"
#include "../HAL_SPI.h"
#include "fastio.h"
#include "watchdog.h"
#include "serial.h"

View File

@ -34,8 +34,22 @@
* (Located in Marlin/buildroot/share/pin_interrupt_test/pin_interrupt_test.ino)
*/
#ifndef _ENDSTOP_INTERRUPTS_H_
#define _ENDSTOP_INTERRUPTS_H_
#ifndef _ENDSTOP_INTERRUPTS_H_
#define _ENDSTOP_INTERRUPTS_H_
//Currently this is untested and broken
#error "Please disable Endstop Interrupts LPC176x is currently an unsupported platform"
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(); }
void setup_endstop_interrupts(void) {
#if HAS_X_MAX