Pins parity with 1.1.x

This commit is contained in:
Scott Lahteine 2018-02-26 01:17:50 -06:00
parent 1c13cc9b48
commit ae1a2ff16f
3 changed files with 91 additions and 2 deletions

View File

@ -270,3 +270,63 @@
#define SPINDLE_LASER_ENABLE_PIN 66 // K4 Pin should have a pullup! #define SPINDLE_LASER_ENABLE_PIN 66 // K4 Pin should have a pullup!
#define SPINDLE_LASER_PWM_PIN 8 // H5 MUST BE HARDWARE PWM #define SPINDLE_LASER_PWM_PIN 8 // H5 MUST BE HARDWARE PWM
#define SPINDLE_DIR_PIN 67 // K5 #define SPINDLE_DIR_PIN 67 // K5
// Check if all pins are defined in mega/pins_arduino.h
#include <Arduino.h>
static_assert(NUM_DIGITAL_PINS > MAX_PIN, "add missing pins to [arduino dir]/hardware/arduino/avr/variants/mega/pins_arduino.h based on fastio.h"
"to digital_pin_to_port_PGM, digital_pin_to_bit_mask_PGM, digital_pin_to_timer_PGM, NUM_DIGITAL_PINS, see below");
/* in [arduino dir]/hardware/arduino/avr/variants/mega/pins_arduino.h
change:
#define NUM_DIGITAL_PINS 70
to:
#define NUM_DIGITAL_PINS 80
to digital_pin_to_port_PGM add at the end:
const uint8_t PROGMEM digital_pin_to_port_PGM[] = {
....
PG , // PG 4 ** 70 **
PG , // PG 3 ** 71 **
PJ , // PJ 2 ** 72 **
PJ , // PJ 3 ** 73 **
PJ , // PJ 7 ** 74 **
PJ , // PJ 4 ** 75 **
PJ , // PJ 5 ** 76 **
PJ , // PJ 6 ** 77 **
PE , // PE 2 ** 78 **
PE , // PE 6 ** 79 **
};
to digital_pin_to_bit_mask_PGM add at the end:
const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[] = {
....
_BV( 4 ) , // PG 4 ** 70 **
_BV( 3 ) , // PG 3 ** 71 **
_BV( 2 ) , // PJ 2 ** 72 **
_BV( 3 ) , // PJ 3 ** 73 **
_BV( 7 ) , // PJ 7 ** 74 **
_BV( 4 ) , // PJ 4 ** 75 **
_BV( 5 ) , // PJ 5 ** 76 **
_BV( 6 ) , // PJ 6 ** 77 **
_BV( 2 ) , // PE 2 ** 78 **
_BV( 6 ) , // PE 6 ** 79 **
};
to digital_pin_to_timer_PGM add at the end:
const uint8_t PROGMEM digital_pin_to_timer_PGM[] = {
....
NOT_ON_TIMER , // PG 4 ** 70 **
NOT_ON_TIMER , // PG 3 ** 71 **
NOT_ON_TIMER , // PJ 2 ** 72 **
NOT_ON_TIMER , // PJ 3 ** 73 **
NOT_ON_TIMER , // PJ 7 ** 74 **
NOT_ON_TIMER , // PJ 4 ** 75 **
NOT_ON_TIMER , // PJ 5 ** 76 **
NOT_ON_TIMER , // PJ 6 ** 77 **
NOT_ON_TIMER , // PE 2 ** 78 **
NOT_ON_TIMER , // PE 6 ** 79 **
};
*/

View File

@ -292,8 +292,8 @@
#define PS_ON_PIN 12 #define PS_ON_PIN 12
#endif #endif
#if ENABLED(CASE_LIGHT_ENABLE) && !PIN_EXISTS(CASE_LIGHT) && !defined(SPINDLE_LASER_ENABLE_PIN) #if ENABLED(CASE_LIGHT_ENABLE) && !defined(CASE_LIGHT_PIN) && !defined(SPINDLE_LASER_ENABLE_PIN)
#if !defined(NUM_SERVOS) || NUM_SERVOS <= 1 // try to use servo connector first #if NUM_SERVOS <= 1 // try to use servo connector first
#define CASE_LIGHT_PIN 6 // MUST BE HARDWARE PWM #define CASE_LIGHT_PIN 6 // MUST BE HARDWARE PWM
#elif !(ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL) \ #elif !(ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL) \
&& (ENABLED(PANEL_ONE) || ENABLED(VIKI2) || ENABLED(miniVIKI) || ENABLED(MINIPANEL) || ENABLED(REPRAPWORLD_KEYPAD))) // try to use AUX 2 && (ENABLED(PANEL_ONE) || ENABLED(VIKI2) || ENABLED(miniVIKI) || ENABLED(MINIPANEL) || ENABLED(REPRAPWORLD_KEYPAD))) // try to use AUX 2

View File

@ -0,0 +1,29 @@
/**
* 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/>.
*
*/
#if HOTENDS > 1 || E_STEPPERS > 1
#error "Ender-4 supports only 1 hotend / E-stepper. Comment out this line to continue."
#endif
#define BOARD_NAME "Ender-4"
#include "pins_RAMPS.h"