From 6e6edc0c88aaf6059f231805e25eeccc8f6639e8 Mon Sep 17 00:00:00 2001 From: luc lebosse Date: Tue, 1 Aug 2017 21:20:51 +0200 Subject: [PATCH] Move pins upper of 127 to 92/93 to avoid overflow in type fix compilation warning for sensitive pin over 128 --- .../sam/1.6.8/variants/arduino_due_x/variant.cpp | 13 +++++++------ src/ArduinoDUE/Repetier/fastio.h | 12 ++++++------ src/ArduinoDUE/Repetier/userpins.h | 6 +++--- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/src/ArduinoDUE/AdditionalArduinoFiles/Arduino - 1.8.0 -Due 1.6.8/Arduino15/packages/arduino/hardware/sam/1.6.8/variants/arduino_due_x/variant.cpp b/src/ArduinoDUE/AdditionalArduinoFiles/Arduino - 1.8.0 -Due 1.6.8/Arduino15/packages/arduino/hardware/sam/1.6.8/variants/arduino_due_x/variant.cpp index 792b7d4..3065366 100644 --- a/src/ArduinoDUE/AdditionalArduinoFiles/Arduino - 1.8.0 -Due 1.6.8/Arduino15/packages/arduino/hardware/sam/1.6.8/variants/arduino_due_x/variant.cpp +++ b/src/ArduinoDUE/AdditionalArduinoFiles/Arduino - 1.8.0 -Due 1.6.8/Arduino15/packages/arduino/hardware/sam/1.6.8/variants/arduino_due_x/variant.cpp @@ -17,7 +17,7 @@ */ #include "variant.h" - +//For Davinci Printer /* * DUE Board pin | PORT | Label * ----------------+--------+------- @@ -269,7 +269,8 @@ extern const PinDescription g_APinDescription[]= { PIOD, PIO_PD4B_TXD3|PIO_PD5B_RXD3, ID_PIOD, PIO_PERIPH_B, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_COMBO), NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // 85 - USB - { PIOB, PIO_PB11A_UOTGID|PIO_PB10A_UOTGVBOF, ID_PIOB, PIO_PERIPH_A, PIO_DEFAULT, PIN_ATTR_DIGITAL,NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // ID - VBOF + //{ PIOB, PIO_PB11A_UOTGID|PIO_PB10A_UOTGVBOF, ID_PIOB, PIO_PERIPH_A, PIO_DEFAULT, PIN_ATTR_DIGITAL,NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // ID - VBOF + { PIOB, PIO_PB11A_UOTGID, ID_PIOB, PIO_PERIPH_A, PIO_DEFAULT, PIN_ATTR_DIGITAL,NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // ID - VBOF // 86 - SPI CS2 { PIOB, PIO_PB21B_SPI0_NPCS2, ID_PIOB, PIO_PERIPH_B, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // NPCS2 @@ -287,8 +288,10 @@ extern const PinDescription g_APinDescription[]= { PIOB, PIO_PB15A_CANRX1|PIO_PB14A_CANTX1, ID_PIOB, PIO_PERIPH_A, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_COMBO), NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // 92 .. 99 placeholders, future-proofing. - { NULL, 0, 0, PIO_NOT_A_PIN, PIO_DEFAULT, 0, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, - { NULL, 0, 0, PIO_NOT_A_PIN, PIO_DEFAULT, 0, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, + // { NULL, 0, 0, PIO_NOT_A_PIN, PIO_DEFAULT, 0, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, + // { NULL, 0, 0, PIO_NOT_A_PIN, PIO_DEFAULT, 0, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, + { PIOB, PIO_PB22, ID_PIOB, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // PIN 92 - PB22 E1 Enabled + { PIOB, PIO_PB10, ID_PIOB, PIO_PERIPH_B, PIO_DEFAULT, PIN_ATTR_DIGITAL,NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // ID 9 { NULL, 0, 0, PIO_NOT_A_PIN, PIO_DEFAULT, 0, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, { NULL, 0, 0, PIO_NOT_A_PIN, PIO_DEFAULT, 0, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, { NULL, 0, 0, PIO_NOT_A_PIN, PIO_DEFAULT, 0, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, @@ -327,8 +330,6 @@ extern const PinDescription g_APinDescription[]= { PIOB, PIO_PB24, ID_PIOB, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // PIN 125 { PIOB, PIO_PB21X1_AD14, ID_PIOB, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_ANALOG, ADC0, ADC14, NOT_ON_PWM, NOT_ON_TIMER }, // PIN 126 - PB21 with enabled ADC { PIOB, PIO_PB13X1_AD9, ID_PIOB, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_ANALOG, ADC0, ADC9, NOT_ON_PWM, NOT_ON_TIMER }, // PIN 127 - PB13 with enabled ACD AD9 - { PIOB, PIO_PB22, ID_PIOB, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // PIN 128 - PB22 E1 Enabled - { PIOB, PIO_PB10B_A18, ID_PIOB, PIO_PERIPH_B, PIO_DEFAULT, PIN_ATTR_DIGITAL,NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // ID 129 // END { NULL, 0, 0, PIO_NOT_A_PIN, PIO_DEFAULT, 0, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER } diff --git a/src/ArduinoDUE/Repetier/fastio.h b/src/ArduinoDUE/Repetier/fastio.h index 32179c3..15cb6c7 100644 --- a/src/ArduinoDUE/Repetier/fastio.h +++ b/src/ArduinoDUE/Repetier/fastio.h @@ -340,12 +340,12 @@ //125 #define DIO125_PORT PIOB #define DIO125_PIN PIO_PB24 -//128 -#define DIO128_PORT PIOB -#define DIO128_PIN PIO_PB22 -//129 -#define DIO129_PORT PIOB -#define DIO129_PIN PIO_PB10B_A18 +//92 +#define DIO92_PORT PIOB +#define DIO92_PIN PIO_PB22 +//93 +#define DIO93_PORT PIOB +#define DIO93_PIN PIO_PB10 #endif #ifndef DIO0_PIN diff --git a/src/ArduinoDUE/Repetier/userpins.h b/src/ArduinoDUE/Repetier/userpins.h index 5f10e97..bfad743 100644 --- a/src/ArduinoDUE/Repetier/userpins.h +++ b/src/ArduinoDUE/Repetier/userpins.h @@ -18,7 +18,7 @@ #if MODEL==0 #define ORIG_Z_MIN_PIN 124 #else -#define ORIG_Z_MIN_PIN 128 +#define ORIG_Z_MIN_PIN 92 #endif #define ORIG_Z_MAX_PIN -1 #define ORIG_Z_ENABLE_PIN 120 @@ -45,7 +45,7 @@ #define TEMP_2_PIN 13// TEMP_0_PIN //switch pin value #define HEATER_0_PIN 20 #define TEMP_0_PIN 9 // ADC channel #, not a PIN # -#define FIL_SENSOR1_PIN 129 +#define FIL_SENSOR1_PIN 93 #define FIL_SENSOR2_PIN 24 #define ORIG_E1_ENABLE_PIN 123//ORIG_E0_ENABLE_PIN //switch pin value #define ORIG_E1_STEP_PIN 122//ORIG_E0_STEP_PIN //switch pin value @@ -53,7 +53,7 @@ #define ORIG_E0_STEP_PIN 53 #define ORIG_E0_DIR_PIN 3 #if MODEL==0 -#define ORIG_E0_ENABLE_PIN 128 +#define ORIG_E0_ENABLE_PIN 92 #else #define ORIG_E0_ENABLE_PIN 124 #endif