Skip to content

Commit

Permalink
Adjust HAL platform defines, comments
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Oct 16, 2020
1 parent 8d090cb commit 4d1357e
Show file tree
Hide file tree
Showing 44 changed files with 106 additions and 78 deletions.
4 changes: 1 addition & 3 deletions Marlin/src/HAL/DUE/HAL.cpp
Expand Up @@ -19,9 +19,7 @@
*/

/**
* Description: HAL for Arduino Due and compatible (SAM3X8E)
*
* For ARDUINO_ARCH_SAM
* HAL for Arduino Due and compatible (SAM3X8E)
*/

#ifdef ARDUINO_ARCH_SAM
Expand Down
4 changes: 1 addition & 3 deletions Marlin/src/HAL/DUE/HAL.h
Expand Up @@ -22,9 +22,7 @@
#pragma once

/**
* Description: HAL for Arduino Due and compatible (SAM3X8E)
*
* For ARDUINO_ARCH_SAM
* HAL for Arduino Due and compatible (SAM3X8E)
*/

#define CPU_32_BIT
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/HAL/DUE/HAL_SPI.cpp
Expand Up @@ -30,7 +30,7 @@
*/

/**
* Description: HAL for Arduino Due and compatible (SAM3X8E)
* HAL for Arduino Due and compatible (SAM3X8E)
*
* For ARDUINO_ARCH_SAM
*/
Expand Down
4 changes: 1 addition & 3 deletions Marlin/src/HAL/DUE/timers.cpp
Expand Up @@ -21,9 +21,7 @@
*/

/**
* Description: HAL for Arduino Due and compatible (SAM3X8E)
*
* For ARDUINO_ARCH_SAM
* HAL Timers for Arduino Due and compatible (SAM3X8E)
*/

#ifdef ARDUINO_ARCH_SAM
Expand Down
4 changes: 1 addition & 3 deletions Marlin/src/HAL/DUE/timers.h
Expand Up @@ -21,9 +21,7 @@
#pragma once

/**
* HAL for Arduino Due and compatible (SAM3X8E)
*
* For ARDUINO_ARCH_SAM
* HAL Timers for Arduino Due and compatible (SAM3X8E)
*/

#include <stdint.h>
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/HAL/ESP32/HAL.h
Expand Up @@ -20,7 +20,7 @@
#pragma once

/**
* Description: HAL for Espressif ESP32 WiFi
* HAL for Espressif ESP32 WiFi
*/

#define CPU_32_BIT
Expand Down
3 changes: 1 addition & 2 deletions Marlin/src/HAL/TEENSY31_32/HAL.cpp
Expand Up @@ -20,9 +20,8 @@
*
*/


/**
* Description: HAL for Teensy32 (MK20DX256)
* HAL for Teensy 3.2 (MK20DX256)
*/

#ifdef __MK20DX256__
Expand Down
7 changes: 4 additions & 3 deletions Marlin/src/HAL/TEENSY31_32/HAL.h
Expand Up @@ -22,7 +22,7 @@
#pragma once

/**
* Description: HAL for Teensy 3.5 and Teensy 3.6
* HAL for Teensy 3.2 (MK20DX256)
*/

#define CPU_32_BIT
Expand All @@ -44,8 +44,9 @@
//#undef MOTHERBOARD
//#define MOTHERBOARD BOARD_TEENSY31_32

#ifdef __MK20DX256__
#define IS_32BIT_TEENSY 1
#define IS_32BIT_TEENSY 1
#define IS_TEENSY_31_32 1
#ifndef IS_TEENSY31
#define IS_TEENSY32 1
#endif

Expand Down
1 change: 0 additions & 1 deletion Marlin/src/HAL/TEENSY31_32/Servo.cpp
Expand Up @@ -51,5 +51,4 @@ void libServo::move(const int value) {
}

#endif // HAS_SERVOS

#endif // __MK20DX256__
3 changes: 1 addition & 2 deletions Marlin/src/HAL/TEENSY31_32/eeprom.cpp
Expand Up @@ -23,8 +23,7 @@
#if USE_WIRED_EEPROM

/**
* PersistentStore for Arduino-style EEPROM interface
* with implementations supplied by the framework.
* HAL PersistentStore for Teensy 3.2 (MK20DX256)
*/

#include "../shared/eeprom_api.h"
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/HAL/TEENSY31_32/timers.cpp
Expand Up @@ -21,7 +21,7 @@
*/

/**
* Teensy3.2 __MK20DX256__
* HAL Timers for Teensy 3.2 (MK20DX256)
*/

#ifdef __MK20DX256__
Expand Down
3 changes: 1 addition & 2 deletions Marlin/src/HAL/TEENSY31_32/timers.h
Expand Up @@ -22,8 +22,7 @@
#pragma once

/**
* Description: HAL for
* Teensy3.2 (__MK20DX256__)
* HAL Timers for Teensy 3.2 (MK20DX256)
*/

#include <stdint.h>
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/HAL/TEENSY35_36/HAL.cpp
Expand Up @@ -21,7 +21,7 @@
*/

/**
* Description: HAL for Teensy35 (MK64FX512)
* HAL for Teensy 3.5 (MK64FX512) and Teensy 3.6 (MK66FX1M0)
*/

#if defined(__MK64FX512__) || defined(__MK66FX1M0__)
Expand Down
11 changes: 5 additions & 6 deletions Marlin/src/HAL/TEENSY35_36/HAL.h
Expand Up @@ -22,7 +22,7 @@
#pragma once

/**
* Description: HAL for Teensy 3.5 and Teensy 3.6
* HAL for Teensy 3.5 (MK64FX512) and Teensy 3.6 (MK66FX1M0)
*/

#define CPU_32_BIT
Expand All @@ -45,13 +45,12 @@
// Defines
// ------------------------

#ifdef __MK64FX512__
#define IS_32BIT_TEENSY 1
#define IS_TEENSY35 1
#endif
#define IS_32BIT_TEENSY 1
#define IS_TEENSY_35_36 1
#ifdef __MK66FX1M0__
#define IS_32BIT_TEENSY 1
#define IS_TEENSY36 1
#else // __MK64FX512__
#define IS_TEENSY35 1
#endif

#define _MSERIAL(X) Serial##X
Expand Down
5 changes: 5 additions & 0 deletions Marlin/src/HAL/TEENSY35_36/HAL_SPI.cpp
Expand Up @@ -19,6 +19,11 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/

/**
* HAL SPI for Teensy 3.5 (MK64FX512) and Teensy 3.6 (MK66FX1M0)
*/

#if defined(__MK64FX512__) || defined(__MK66FX1M0__)

#include "HAL.h"
Expand Down
6 changes: 5 additions & 1 deletion Marlin/src/HAL/TEENSY35_36/Servo.cpp
Expand Up @@ -19,6 +19,11 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/

/**
* HAL Servo for Teensy 3.5 (MK64FX512) and Teensy 3.6 (MK66FX1M0)
*/

#if defined(__MK64FX512__) || defined(__MK66FX1M0__)

#include "../../inc/MarlinConfig.h"
Expand Down Expand Up @@ -51,5 +56,4 @@ void libServo::move(const int value) {
}

#endif // HAS_SERVOS

#endif // __MK64FX512__ || __MK66FX1M0__
4 changes: 4 additions & 0 deletions Marlin/src/HAL/TEENSY35_36/Servo.h
Expand Up @@ -21,6 +21,10 @@
*/
#pragma once

/**
* HAL Servo for Teensy 3.5 (MK64FX512) and Teensy 3.6 (MK66FX1M0)
*/

#include <Servo.h>

// Inherit and expand on core Servo library
Expand Down
9 changes: 4 additions & 5 deletions Marlin/src/HAL/TEENSY35_36/eeprom.cpp
Expand Up @@ -22,15 +22,14 @@
*/
#if defined(__MK64FX512__) || defined(__MK66FX1M0__)

/**
* HAL PersistentStore for Teensy 3.5 (MK64FX512) and Teensy 3.6 (MK66FX1M0)
*/

#include "../../inc/MarlinConfig.h"

#if USE_WIRED_EEPROM

/**
* PersistentStore for Arduino-style EEPROM interface
* with implementations supplied by the framework.
*/

#include "../shared/eeprom_api.h"
#include <avr/eeprom.h>

Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/HAL/TEENSY35_36/endstop_interrupts.h
Expand Up @@ -22,7 +22,7 @@
#pragma once

/**
* Endstop Interrupts
* HAL Endstop Interrupts for Teensy 3.5 (MK64FX512) and Teensy 3.6 (MK66FX1M0)
*
* Without endstop interrupts the endstop pins must be polled continually in
* the temperature-ISR via endstops.update(), most of the time finding no change.
Expand Down
4 changes: 4 additions & 0 deletions Marlin/src/HAL/TEENSY35_36/pinsDebug.h
Expand Up @@ -18,6 +18,10 @@
*/
#pragma once

/**
* HAL Pins Debugging for Teensy 3.5 (MK64FX512) and Teensy 3.6 (MK66FX1M0)
*/

#define NUMBER_PINS_TOTAL NUM_DIGITAL_PINS
#define MULTI_NAME_PAD 16 // space needed to be pretty if not first name assigned to a pin

Expand Down
4 changes: 4 additions & 0 deletions Marlin/src/HAL/TEENSY35_36/spi_pins.h
Expand Up @@ -21,6 +21,10 @@
*/
#pragma once

/**
* HAL SPI Pins for Teensy 3.5 (MK64FX512) and Teensy 3.6 (MK66FX1M0)
*/

#define SCK_PIN 13
#define MISO_PIN 12
#define MOSI_PIN 11
Expand Down
3 changes: 1 addition & 2 deletions Marlin/src/HAL/TEENSY35_36/timers.cpp
Expand Up @@ -21,8 +21,7 @@
*/

/**
* Teensy3.5 __MK64FX512__
* Teensy3.6 __MK66FX1M0__
* HAL Timers for Teensy 3.5 (MK64FX512) and Teensy 3.6 (MK66FX1M0)
*/

#if defined(__MK64FX512__) || defined(__MK66FX1M0__)
Expand Down
4 changes: 1 addition & 3 deletions Marlin/src/HAL/TEENSY35_36/timers.h
Expand Up @@ -21,9 +21,7 @@
#pragma once

/**
* Description: HAL for
* Teensy3.5 (__MK64FX512__)
* Teensy3.6 (__MK66FX1M0__)
* HAL Timers for Teensy 3.5 (MK64FX512) and Teensy 3.6 (MK66FX1M0)
*/

#include <stdint.h>
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/HAL/TEENSY40_41/HAL.cpp
Expand Up @@ -21,7 +21,7 @@
*/

/**
* Description: HAL for Teensy40 (IMXRT1062)
* HAL for Teensy 4.0 / 4.1 (IMXRT1062)
*/

#ifdef __IMXRT1062__
Expand Down
7 changes: 4 additions & 3 deletions Marlin/src/HAL/TEENSY40_41/HAL.h
Expand Up @@ -22,7 +22,7 @@
#pragma once

/**
* Description: HAL for Teensy 4.0 and Teensy 4.1
* HAL for Teensy 4.0 (IMXRT1062DVL6A) / 4.1 (IMXRT1062DVJ6A)
*/

#define CPU_32_BIT
Expand All @@ -45,8 +45,9 @@
// Defines
// ------------------------

#ifdef __IMXRT1062__
#define IS_32BIT_TEENSY 1
#define IS_32BIT_TEENSY 1
#define IS_TEENSY_40_41 1
#ifndef IS_TEENSY40
#define IS_TEENSY41 1
#endif

Expand Down
5 changes: 5 additions & 0 deletions Marlin/src/HAL/TEENSY40_41/HAL_SPI.cpp
Expand Up @@ -19,6 +19,11 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/

/**
* HAL SPI for Teensy 4.0 (IMXRT1062DVL6A) / 4.1 (IMXRT1062DVJ6A)
*/

#ifdef __IMXRT1062__

#include "HAL.h"
Expand Down
6 changes: 5 additions & 1 deletion Marlin/src/HAL/TEENSY40_41/Servo.cpp
Expand Up @@ -19,6 +19,11 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/

/**
* HAL Servo for Teensy 4.0 (IMXRT1062DVL6A) / 4.1 (IMXRT1062DVJ6A)
*/

#ifdef __IMXRT1062__

#include "../../inc/MarlinConfig.h"
Expand Down Expand Up @@ -53,5 +58,4 @@ void libServo::detach() {
}

#endif // HAS_SERVOS

#endif // __IMXRT1062__
4 changes: 4 additions & 0 deletions Marlin/src/HAL/TEENSY40_41/Servo.h
Expand Up @@ -21,6 +21,10 @@
*/
#pragma once

/**
* HAL Servo for Teensy 4.0 (IMXRT1062DVL6A) / 4.1 (IMXRT1062DVJ6A)
*/

#include <PWMServo.h>

// Inherit and expand on core Servo library
Expand Down
3 changes: 1 addition & 2 deletions Marlin/src/HAL/TEENSY40_41/eeprom.cpp
Expand Up @@ -27,8 +27,7 @@
#if USE_WIRED_EEPROM

/**
* PersistentStore for Arduino-style EEPROM interface
* with implementations supplied by the framework.
* HAL PersistentStore for Teensy 4.0 (IMXRT1062DVL6A) / 4.1 (IMXRT1062DVJ6A)
*/

#include "../shared/eeprom_api.h"
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/HAL/TEENSY40_41/endstop_interrupts.h
Expand Up @@ -22,7 +22,7 @@
#pragma once

/**
* Endstop Interrupts
* HAL Endstop Interrupts for Teensy 4.0 (IMXRT1062DVL6A) / 4.1 (IMXRT1062DVJ6A)
*
* Without endstop interrupts the endstop pins must be polled continually in
* the temperature-ISR via endstops.update(), most of the time finding no change.
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/HAL/TEENSY40_41/fastio.h
Expand Up @@ -23,7 +23,7 @@
#pragma once

/**
* Fast I/O interfaces for Teensy 4
* Fast I/O interfaces for Teensy 4.0 (IMXRT1062DVL6A) / 4.1 (IMXRT1062DVJ6A)
* These use GPIO functions instead of Direct Port Manipulation, as on AVR.
*/

Expand Down
4 changes: 4 additions & 0 deletions Marlin/src/HAL/TEENSY40_41/pinsDebug.h
Expand Up @@ -18,6 +18,10 @@
*/
#pragma once

/**
* HAL Pins Debugging for Teensy 4.0 (IMXRT1062DVL6A) / 4.1 (IMXRT1062DVJ6A)
*/

#warning "PINS_DEBUGGING is not fully supported for Teensy 4.0 / 4.1 so 'M43' may cause hangs."

#define NUMBER_PINS_TOTAL NUM_DIGITAL_PINS
Expand Down
4 changes: 4 additions & 0 deletions Marlin/src/HAL/TEENSY40_41/spi_pins.h
Expand Up @@ -21,6 +21,10 @@
*/
#pragma once

/**
* HAL SPI Pins for Teensy 4.0 (IMXRT1062DVL6A) / 4.1 (IMXRT1062DVJ6A)
*/

#define SCK_PIN 13
#define MISO_PIN 12
#define MOSI_PIN 11
Expand Down

0 comments on commit 4d1357e

Please sign in to comment.